mirror of
https://github.com/blendogames/quadrilateralcowboy.git
synced 2025-01-28 19:50:42 +00:00
Initial commit
This commit is contained in:
commit
47a1010d23
2096 changed files with 1075990 additions and 0 deletions
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
19
.gitignore
vendored
Normal file
19
.gitignore
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
*.props
|
||||
*.user
|
||||
*.suo
|
||||
*.ncb
|
||||
*.sdf
|
||||
*.xml
|
||||
*.filters
|
||||
*.plg
|
||||
*.opt
|
||||
*.db
|
||||
.vs/
|
||||
debug/
|
||||
debugaxp/
|
||||
release/
|
||||
releaseaxp/
|
||||
ipch/
|
||||
_upgradereport_files/
|
||||
steam/
|
||||
makefile
|
674
LICENSE
Normal file
674
LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
986
MayaImport.vcxproj
Normal file
986
MayaImport.vcxproj
Normal file
|
@ -0,0 +1,986 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug with inlines and memory log|Win32">
|
||||
<Configuration>Debug with inlines and memory log</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug with inlines|Win32">
|
||||
<Configuration>Debug with inlines</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Dedicated Debug with inlines|Win32">
|
||||
<Configuration>Dedicated Debug with inlines</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Dedicated Debug|Win32">
|
||||
<Configuration>Dedicated Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Dedicated Release|Win32">
|
||||
<Configuration>Dedicated Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release NO STEAM|Win32">
|
||||
<Configuration>Release NO STEAM</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>MayaImport</ProjectName>
|
||||
<ProjectGuid>{49BEC5C6-B964-417A-851E-808886B574F1}</ProjectGuid>
|
||||
<RootNamespace>MayaImport</RootNamespace>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release NO STEAM|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseOfMfc>false</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Dedicated.props" />
|
||||
<Import Project="_Release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Dedicated.props" />
|
||||
<Import Project="_Debug.props" />
|
||||
<Import Project="_WithInlines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Dedicated.props" />
|
||||
<Import Project="_Debug.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Debug.props" />
|
||||
<Import Project="_WithInlines.props" />
|
||||
<Import Project="_WithMemoryLog.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Debug.props" />
|
||||
<Import Project="_WithInlines.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release NO STEAM|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Release.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="_Common.props" />
|
||||
<Import Project="_MayaImport.props" />
|
||||
<Import Project="_Debug.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release NO STEAM|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release NO STEAM|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release NO STEAM|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>Yes</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>Yes</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release NO STEAM|Win32'">
|
||||
<ClCompile>
|
||||
<MultiProcessorCompilation>Yes</MultiProcessorCompilation>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="MayaImport\Maya4.5\maya.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\flib.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\ilib.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\M3dView.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAngle.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAnimControl.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAnimCurveChange.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAnimCurveClipboard.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAnimCurveClipboardItem.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAnimCurveClipboardItemArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAnimMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAnimUtil.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MApiVersion.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MArgDatabase.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MArgList.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MArgParser.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MArrayDataBuilder.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MArrayDataHandle.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAttributeIndex.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAttributeSpec.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MAttributeSpecArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MBoundingBox.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MColor.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MColorArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MCommandResult.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MComputation.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MConditionMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MCursor.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDagMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDagModifier.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDagPath.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDagPathArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDataBlock.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDataHandle.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDeviceChannel.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDeviceState.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDGContext.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDGMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDGModifier.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDistance.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDoubleArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDrawData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDrawInfo.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDrawRequest.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDrawRequestQueue.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDynSweptLine.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MDynSweptTriangle.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MEulerRotation.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MEvent.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MEventMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFeedbackLine.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFileIO.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFileObject.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFloatArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFloatMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFloatPoint.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFloatPointArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFloatVector.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFloatVectorArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFn.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnAirField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnAmbientLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnAnimCurve.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnAreaLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnArrayAttrsData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnBase.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnBlendShapeDeformer.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnBlinnShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnCamera.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnCharacter.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnCircleSweepManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnClip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnComponentListData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnCompoundAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnCurveSegmentManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDagNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDependencyNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDirectionalLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDirectionManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDiscManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDistanceManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDoubleArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDoubleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDragField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnDynSweptGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnEnumAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnExpression.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnFluid.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnFreePointTriadManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnGenericAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnGeometryFilter.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnGravityField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnIkEffector.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnIkHandle.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnIkJoint.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnIkSolver.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnIntArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnLambertShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnLattice.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnLatticeData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnLatticeDeformer.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnLightDataAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnManip3D.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnMatrixAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnMatrixData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnMesh.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnMeshData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnMessageAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnMotionPath.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNewtonField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNonAmbientLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNonExtendedLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNumericAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNumericData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNurbsCurve.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNurbsCurveData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNurbsSurface.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnNurbsSurfaceData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPartition.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPhongShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPlugin.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPluginData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPointArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPointLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPointOnCurveManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnPointOnSurfaceManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnRadialField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnReflectShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSet.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSingleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSkinCluster.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSphereData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSpotLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnStateManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnStringArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnStringData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSubd.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSubdData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnSubdNames.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnToggleManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnTransform.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnTripleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnTurbulenceField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnTypedAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnUInt64ArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnUniformField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnUnitAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnVectorArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnVolumeAxisField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnVortexField.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnWeightGeometryFilter.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MFnWireDeformer.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MGlobal.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MIkHandleGroup.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MIkSystem.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MImage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MIntArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItCurveCV.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItDag.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItDependencyGraph.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItDependencyNodes.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItGeometry.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItInstancer.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItKeyframe.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItMeshEdge.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItMeshFaceVertex.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItMeshPolygon.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItMeshVertex.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItSelectionList.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MItSurfaceCV.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MLibrary.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MLightLinks.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MManipData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MMaterial.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MModelMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MNodeMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MObject.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MObjectArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\mocapserial.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\mocapserver.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\mocaptcp.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPlug.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPlugArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPoint.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPointArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxContext.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxContextCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxDeformerNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxDragAndDropBehavior.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxEmitterNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxFieldNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxFileTranslator.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxGeometryIterator.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxGlBuffer.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxHwShaderNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxIkSolver.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxIkSolverNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxLocatorNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxManipContainer.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxMidiInputDevice.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxPolyTrg.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxSelectionContext.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxSpringNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxSurfaceShape.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxSurfaceShapeUI.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxToolCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxTransform.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MPxTransformationMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MQuaternion.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MRenderCallback.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MRenderData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MRenderShadowData.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MRenderUtil.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MRenderView.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MSceneMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MSelectInfo.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MSelectionList.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MSelectionMask.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MSimple.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MStatus.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MString.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MStringArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MSyntax.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MTesselationParams.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MTime.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MTimeArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MToolsInfo.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MTransformationMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MTypeId.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MTypes.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MUiMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MUint64Array.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MVector.h" />
|
||||
<ClInclude Include="MayaImport\Maya4.5\include\maya\MVectorArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\flib.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\ilib.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\M3dView.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAngle.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAnimControl.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAnimCurveChange.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAnimCurveClipboard.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAnimCurveClipboardItem.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAnimCurveClipboardItemArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAnimMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAnimUtil.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MApiVersion.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MArgDatabase.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MArgList.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MArgParser.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MArrayDataBuilder.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MArrayDataHandle.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAttributeIndex.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAttributeSpec.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MAttributeSpecArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MBoundingBox.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MColor.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MColorArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MCommandResult.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MComputation.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MConditionMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MCursor.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDagMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDagModifier.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDagPath.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDagPathArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDataBlock.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDataHandle.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDeviceChannel.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDeviceState.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDGContext.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDGMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDGModifier.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDistance.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDoubleArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDrawData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDrawInfo.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDrawRequest.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDrawRequestQueue.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDynSweptLine.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MDynSweptTriangle.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MEulerRotation.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MEvent.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MEventMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFeedbackLine.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFileIO.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFileObject.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFloatArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFloatMatrix.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFloatPoint.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFloatPointArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFloatVector.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFloatVectorArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFn.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnAirField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnAmbientLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnAnimCurve.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnAreaLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnArrayAttrsData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnBase.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnBlendShapeDeformer.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnBlinnShader.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnCamera.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnCharacter.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnCircleSweepManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnClip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnComponent.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnComponentListData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnCompoundAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnCurveSegmentManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDagNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDependencyNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDirectionalLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDirectionManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDiscManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDistanceManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDoubleArrayData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDoubleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDragField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnDynSweptGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnEnumAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnExpression.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnFluid.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnFreePointTriadManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnGenericAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnGeometryFilter.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnGravityField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnIkEffector.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnIkHandle.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnIkJoint.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnIkSolver.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnIntArrayData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnLambertShader.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnLattice.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnLatticeData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnLatticeDeformer.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnLightDataAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnManip3D.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnMatrixAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnMatrixData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnMesh.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnMeshData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnMessageAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnMotionPath.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNewtonField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNonAmbientLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNonExtendedLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNumericAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNumericData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNurbsCurve.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNurbsCurveData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNurbsSurface.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnNurbsSurfaceData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnParticleSystem.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPartition.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPhongShader.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPlugin.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPluginData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPointArrayData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPointLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPointOnCurveManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnPointOnSurfaceManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnRadialField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnReflectShader.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSet.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSingleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSkinCluster.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSphereData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSpotLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnStateManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnStringArrayData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnStringData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSubd.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSubdData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnSubdNames.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnToggleManip.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnTransform.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnTripleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnTurbulenceField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnTypedAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnUInt64ArrayData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnUniformField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnUnitAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnVectorArrayData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnVolumeAxisField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnVolumeLight.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnVortexField.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnWeightGeometryFilter.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MFnWireDeformer.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MGlobal.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MIkHandleGroup.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MIkSystem.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MImage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MIntArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MIOStream.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItCurveCV.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItDag.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItDependencyGraph.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItDependencyNodes.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItGeometry.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItInstancer.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItKeyframe.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItMeshEdge.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItMeshFaceVertex.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItMeshPolygon.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItMeshVertex.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItSelectionList.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MItSurfaceCV.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MLibrary.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MLightLinks.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MLockMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MManipData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MMaterial.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MMatrix.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MModelMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MNodeMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MObject.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MObjectArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\mocapserial.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\mocapserver.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\mocaptcp.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPlug.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPlugArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPoint.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPointArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPx3dModelView.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxCommand.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxContext.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxContextCommand.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxDeformerNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxDragAndDropBehavior.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxEmitterNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxFieldNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxFileTranslator.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxGeometryIterator.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxGlBuffer.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxHwShaderNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxIkSolver.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxIkSolverNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxLocatorNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxManipContainer.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxMidiInputDevice.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxModelEditorCommand.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxObjectSet.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxPolyTrg.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxPolyTweakUVCommand.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxSelectionContext.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxSpringNode.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxSurfaceShape.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxSurfaceShapeUI.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxToolCommand.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxTransform.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MPxTransformationMatrix.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MQuaternion.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MRampAttribute.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MRenderCallback.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MRenderData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MRenderShadowData.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MRenderUtil.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MRenderView.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MSceneMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MSelectInfo.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MSelectionList.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MSelectionMask.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MSimple.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MStatus.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MString.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MStringArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MSyntax.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MTesselationParams.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MTime.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MTimeArray.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MToolsInfo.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MTransformationMatrix.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MTypeId.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MTypes.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MUiMessage.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MUint64Array.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MVector.h" />
|
||||
<ClInclude Include="MayaImport\maya5.0\maya\MVectorArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\maya.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\flib.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\ilib.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\M3dView.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAngle.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAnimControl.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAnimCurveChange.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAnimCurveClipboard.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAnimCurveClipboardItem.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAnimCurveClipboardItemArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAnimMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAnimUtil.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MApiVersion.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MArgDatabase.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MArgList.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MArgParser.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MArrayDataBuilder.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MArrayDataHandle.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAttributeIndex.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAttributeSpec.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MAttributeSpecArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MBoundingBox.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MColor.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MColorArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MCommandResult.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MComputation.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MConditionMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MCursor.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDagMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDagModifier.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDagPath.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDagPathArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDataBlock.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDataHandle.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDeviceChannel.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDeviceState.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDGContext.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDGMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDGModifier.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDistance.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDoubleArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDrawData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDrawInfo.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDrawRequest.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDrawRequestQueue.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDynSweptLine.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MDynSweptTriangle.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MEulerRotation.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MEvent.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MEventMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFeedbackLine.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFileIO.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFileObject.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFloatArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFloatMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFloatPoint.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFloatPointArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFloatVector.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFloatVectorArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFn.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnAirField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnAmbientLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnAnimCurve.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnAreaLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnArrayAttrsData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnBase.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnBlendShapeDeformer.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnBlinnShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnCamera.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnCharacter.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnCircleSweepManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnClip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnComponentListData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnCompoundAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnCurveSegmentManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDagNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDependencyNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDirectionalLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDirectionManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDiscManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDistanceManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDoubleArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDoubleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDragField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnDynSweptGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnEnumAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnExpression.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnFluid.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnFreePointTriadManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnGenericAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnGeometryFilter.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnGravityField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnIkEffector.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnIkHandle.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnIkJoint.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnIkSolver.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnIntArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnLambertShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnLattice.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnLatticeData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnLatticeDeformer.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnLightDataAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnManip3D.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnMatrixAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnMatrixData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnMesh.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnMeshData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnMessageAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnMotionPath.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNewtonField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNonAmbientLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNonExtendedLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNumericAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNumericData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNurbsCurve.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNurbsCurveData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNurbsSurface.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnNurbsSurfaceData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnParticleSystem.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPartition.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPhongShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPlugin.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPluginData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPointArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPointLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPointOnCurveManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnPointOnSurfaceManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnRadialField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnReflectShader.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnRotateManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnScaleManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSet.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSingleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSkinCluster.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSphereData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSpotLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnStateManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnStringArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnStringData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSubd.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSubdData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnSubdNames.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnToggleManip.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnTransform.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnTripleIndexedComponent.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnTurbulenceField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnTypedAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnUInt64ArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnUniformField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnUnitAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnVectorArrayData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnVolumeAxisField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnVolumeLight.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnVortexField.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnWeightGeometryFilter.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFnWireDeformer.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MFStream.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MGlobal.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MIkHandleGroup.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MIkSystem.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MImage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MIntArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MIOStream.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItCurveCV.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItDag.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItDependencyGraph.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItDependencyNodes.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItGeometry.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItInstancer.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItKeyframe.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItMeshEdge.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItMeshFaceVertex.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItMeshPolygon.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItMeshVertex.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItSelectionList.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MItSurfaceCV.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MLibrary.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MLightLinks.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MLockMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MManipData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MMaterial.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MModelMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MNodeMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MObject.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MObjectArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MObjectHandle.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MObjectSetMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\mocapserial.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\mocapserver.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\mocaptcp.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPlug.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPlugArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPoint.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPointArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPolyMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MProgressWindow.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPx3dModelView.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxContext.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxContextCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxDeformerNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxDragAndDropBehavior.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxEmitterNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxFieldNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxFileTranslator.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxGeometryData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxGeometryIterator.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxGlBuffer.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxHwShaderNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxIkSolver.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxIkSolverNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxLocatorNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxManipContainer.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxMidiInputDevice.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxModelEditorCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxObjectSet.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxPolyTrg.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxPolyTweakUVCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxSelectionContext.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxSpringNode.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxSurfaceShape.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxSurfaceShapeUI.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxToolCommand.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxTransform.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MPxTransformationMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MQuaternion.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MRampAttribute.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MRenderCallback.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MRenderData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MRenderShadowData.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MRenderUtil.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MRenderView.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MSceneMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MSelectInfo.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MSelectionList.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MSelectionMask.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MSimple.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MStatus.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MString.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MStringArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MSyntax.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MTesselationParams.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MTime.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MTimeArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MToolsInfo.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MTransformationMatrix.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MTrimBoundaryArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MTypeId.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MTypes.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MUiMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MUint64Array.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MUintArray.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MUserEventMessage.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MVector.h" />
|
||||
<ClInclude Include="MayaImport\Maya6.0\include\maya\MVectorArray.h" />
|
||||
<ClInclude Include="MayaImport\exporter.h" />
|
||||
<ClInclude Include="MayaImport\maya_main.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="MayaImport\maya_main.cpp" />
|
||||
<ClCompile Include="idlib\precompiled.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with inlines and memory log|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug with inlines|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug with inlines|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Dedicated Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release NO STEAM|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="MayaImport\mayaimport.def" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="idlib.vcxproj">
|
||||
<Project>{49bec5c6-b964-417a-851e-808886b57400}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
457
MayaImport/exporter.h
Normal file
457
MayaImport/exporter.h
Normal file
|
@ -0,0 +1,457 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
#define MAYA_DEFAULT_CAMERA "camera1"
|
||||
|
||||
#define ANIM_TX BIT( 0 )
|
||||
#define ANIM_TY BIT( 1 )
|
||||
#define ANIM_TZ BIT( 2 )
|
||||
#define ANIM_QX BIT( 3 )
|
||||
#define ANIM_QY BIT( 4 )
|
||||
#define ANIM_QZ BIT( 5 )
|
||||
|
||||
typedef enum {
|
||||
WRITE_MESH,
|
||||
WRITE_ANIM,
|
||||
WRITE_CAMERA
|
||||
} exportType_t;
|
||||
|
||||
typedef struct {
|
||||
idCQuat q;
|
||||
idVec3 t;
|
||||
} jointFrame_t;
|
||||
|
||||
typedef struct {
|
||||
idCQuat q;
|
||||
idVec3 t;
|
||||
float fov;
|
||||
} cameraFrame_t;
|
||||
|
||||
/*
|
||||
==============================================================================================
|
||||
|
||||
idTokenizer
|
||||
|
||||
==============================================================================================
|
||||
*/
|
||||
|
||||
class idTokenizer {
|
||||
private:
|
||||
int currentToken;
|
||||
idStrList tokens;
|
||||
|
||||
public:
|
||||
idTokenizer() { Clear(); };
|
||||
void Clear( void ) { currentToken = 0; tokens.Clear(); };
|
||||
|
||||
int SetTokens( const char *buffer );
|
||||
const char *NextToken( const char *errorstring = NULL );
|
||||
|
||||
bool TokenAvailable( void ) { return currentToken < tokens.Num(); };
|
||||
int Num( void ) { return tokens.Num(); };
|
||||
void UnGetToken( void ) { if ( currentToken > 0 ) { currentToken--; } };
|
||||
const char *GetToken( int index ) { if ( ( index >= 0 ) && ( index < tokens.Num() ) ) { return tokens[ index ]; } else { return NULL; } };
|
||||
const char *CurrentToken( void ) { return GetToken( currentToken ); };
|
||||
};
|
||||
|
||||
/*
|
||||
==============================================================================================
|
||||
|
||||
idExportOptions
|
||||
|
||||
==============================================================================================
|
||||
*/
|
||||
|
||||
class idNamePair {
|
||||
public:
|
||||
idStr from;
|
||||
idStr to;
|
||||
};
|
||||
|
||||
class idAnimGroup {
|
||||
public:
|
||||
idStr name;
|
||||
idStrList joints;
|
||||
};
|
||||
|
||||
class idExportOptions {
|
||||
private:
|
||||
idTokenizer tokens;
|
||||
|
||||
void Reset( const char *commandline );
|
||||
|
||||
public:
|
||||
idStr commandLine;
|
||||
idStr src;
|
||||
idStr dest;
|
||||
idStr game;
|
||||
idStr prefix;
|
||||
float scale;
|
||||
exportType_t type;
|
||||
bool ignoreMeshes;
|
||||
bool clearOrigin;
|
||||
bool clearOriginAxis;
|
||||
bool ignoreScale;
|
||||
int startframe;
|
||||
int endframe;
|
||||
int framerate;
|
||||
float xyzPrecision;
|
||||
float quatPrecision;
|
||||
idStr align;
|
||||
idList<idNamePair> renamejoints;
|
||||
idList<idNamePair> remapjoints;
|
||||
idStrList keepjoints;
|
||||
idStrList skipmeshes;
|
||||
idStrList keepmeshes;
|
||||
idList<idAnimGroup *> exportgroups;
|
||||
idList<idAnimGroup> groups;
|
||||
float rotate;
|
||||
float jointThreshold;
|
||||
int cycleStart;
|
||||
|
||||
idExportOptions( const char *commandline, const char *ospath );
|
||||
|
||||
bool jointInExportGroup( const char *jointname );
|
||||
};
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
idExportJoint
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
class idExportJoint {
|
||||
public:
|
||||
idStr name;
|
||||
idStr realname;
|
||||
idStr longname;
|
||||
int index;
|
||||
int exportNum;
|
||||
bool keep;
|
||||
|
||||
float scale;
|
||||
float invscale;
|
||||
|
||||
MFnDagNode *dagnode;
|
||||
|
||||
idHierarchy<idExportJoint> mayaNode;
|
||||
idHierarchy<idExportJoint> exportNode;
|
||||
|
||||
idVec3 t;
|
||||
idMat3 wm;
|
||||
|
||||
idVec3 idt;
|
||||
idMat3 idwm;
|
||||
|
||||
idVec3 bindpos;
|
||||
idMat3 bindmat;
|
||||
|
||||
int animBits;
|
||||
int firstComponent;
|
||||
jointFrame_t baseFrame;
|
||||
int depth;
|
||||
|
||||
idExportJoint();
|
||||
idExportJoint &operator=( const idExportJoint &other );
|
||||
};
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
misc structures
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
idExportJoint *joint;
|
||||
float jointWeight;
|
||||
idVec3 offset;
|
||||
} exportWeight_t;
|
||||
|
||||
typedef struct {
|
||||
idVec3 pos;
|
||||
idVec2 texCoords;
|
||||
int startweight;
|
||||
int numWeights;
|
||||
} exportVertex_t;
|
||||
|
||||
typedef struct {
|
||||
int indexes[ 3 ];
|
||||
} exportTriangle_t;
|
||||
|
||||
typedef struct {
|
||||
idVec2 uv[ 3 ];
|
||||
} exportUV_t;
|
||||
|
||||
ID_INLINE int operator==( exportVertex_t a, exportVertex_t b ) {
|
||||
if ( a.pos != b.pos ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ( a.texCoords[ 0 ] != b.texCoords[ 0 ] ) || ( a.texCoords[ 1 ] != b.texCoords[ 1 ] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ( a.startweight != b.startweight ) || ( a.numWeights != b.numWeights ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
========================================================================
|
||||
|
||||
.MD3 triangle model file format
|
||||
|
||||
========================================================================
|
||||
*/
|
||||
|
||||
#define MD3_IDENT (('3'<<24)+('P'<<16)+('D'<<8)+'I')
|
||||
#define MD3_VERSION 15
|
||||
|
||||
// limits
|
||||
#define MD3_MAX_LODS 4
|
||||
#define MD3_MAX_TRIANGLES 8192 // per surface
|
||||
#define MD3_MAX_VERTS 4096 // per surface
|
||||
#define MD3_MAX_SHADERS 256 // per surface
|
||||
#define MD3_MAX_FRAMES 1024 // per model
|
||||
#define MD3_MAX_SURFACES 32 // per model
|
||||
#define MD3_MAX_TAGS 16 // per frame
|
||||
|
||||
// vertex scales
|
||||
#define MD3_XYZ_SCALE (1.0/64)
|
||||
|
||||
// surface geometry should not exceed these limits
|
||||
#define SHADER_MAX_VERTEXES 1000
|
||||
#define SHADER_MAX_INDEXES (6*SHADER_MAX_VERTEXES)
|
||||
|
||||
|
||||
// the maximum size of game reletive pathnames
|
||||
#define MAX_Q3PATH 64
|
||||
|
||||
typedef struct md3Frame_s {
|
||||
idVec3 bounds[2];
|
||||
idVec3 localOrigin;
|
||||
float radius;
|
||||
char name[16];
|
||||
} md3Frame_t;
|
||||
|
||||
typedef struct md3Tag_s {
|
||||
char name[MAX_Q3PATH]; // tag name
|
||||
idVec3 origin;
|
||||
idVec3 axis[3];
|
||||
} md3Tag_t;
|
||||
|
||||
/*
|
||||
** md3Surface_t
|
||||
**
|
||||
** CHUNK SIZE
|
||||
** header sizeof( md3Surface_t )
|
||||
** shaders sizeof( md3Shader_t ) * numShaders
|
||||
** triangles[0] sizeof( md3Triangle_t ) * numTriangles
|
||||
** st sizeof( md3St_t ) * numVerts
|
||||
** XyzNormals sizeof( md3XyzNormal_t ) * numVerts * numFrames
|
||||
*/
|
||||
typedef struct {
|
||||
int ident; //
|
||||
|
||||
char name[MAX_Q3PATH]; // polyset name
|
||||
|
||||
int flags;
|
||||
int numFrames; // all surfaces in a model should have the same
|
||||
|
||||
int numShaders; // all surfaces in a model should have the same
|
||||
int numVerts;
|
||||
|
||||
int numTriangles;
|
||||
int ofsTriangles;
|
||||
|
||||
int ofsShaders; // offset from start of md3Surface_t
|
||||
int ofsSt; // texture coords are common for all frames
|
||||
int ofsXyzNormals; // numVerts * numFrames
|
||||
|
||||
int ofsEnd; // next surface follows
|
||||
} md3Surface_t;
|
||||
|
||||
typedef struct {
|
||||
char name[MAX_Q3PATH];
|
||||
int shaderIndex; // for in-game use
|
||||
} md3Shader_t;
|
||||
|
||||
typedef struct {
|
||||
int indexes[3];
|
||||
} md3Triangle_t;
|
||||
|
||||
typedef struct {
|
||||
float st[2];
|
||||
} md3St_t;
|
||||
|
||||
typedef struct {
|
||||
short xyz[3];
|
||||
short normal;
|
||||
} md3XyzNormal_t;
|
||||
|
||||
typedef struct {
|
||||
int ident;
|
||||
int version;
|
||||
|
||||
char name[MAX_Q3PATH]; // model name
|
||||
|
||||
int flags;
|
||||
|
||||
int numFrames;
|
||||
int numTags;
|
||||
int numSurfaces;
|
||||
|
||||
int numSkins;
|
||||
|
||||
int ofsFrames; // offset for first frame
|
||||
int ofsTags; // numFrames * numTags
|
||||
int ofsSurfaces; // first surface, others follow
|
||||
|
||||
int ofsEnd; // end of file
|
||||
} md3Header_t;
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
idExportMesh
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
class idExportMesh {
|
||||
public:
|
||||
|
||||
idStr name;
|
||||
idStr shader;
|
||||
|
||||
bool keep;
|
||||
|
||||
idList<exportVertex_t> verts;
|
||||
idList<exportTriangle_t> tris;
|
||||
idList<exportWeight_t> weights;
|
||||
idList<exportUV_t> uv;
|
||||
|
||||
idExportMesh() { keep = true; };
|
||||
void ShareVerts( void );
|
||||
void GetBounds( idBounds &bounds ) const;
|
||||
void Merge( idExportMesh *mesh );
|
||||
};
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
idExportModel
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
class idExportModel {
|
||||
public:
|
||||
idExportJoint *exportOrigin;
|
||||
idList<idExportJoint> joints;
|
||||
idHierarchy<idExportJoint> mayaHead;
|
||||
idHierarchy<idExportJoint> exportHead;
|
||||
idList<int> cameraCuts;
|
||||
idList<cameraFrame_t> camera;
|
||||
idList<idBounds> bounds;
|
||||
idList<jointFrame_t> jointFrames;
|
||||
idList<jointFrame_t *> frames;
|
||||
int frameRate;
|
||||
int numFrames;
|
||||
int skipjoints;
|
||||
int export_joints;
|
||||
idList<idExportMesh *> meshes;
|
||||
|
||||
idExportModel();
|
||||
~idExportModel();
|
||||
idExportJoint *FindJointReal( const char *name );
|
||||
idExportJoint *FindJoint( const char *name );
|
||||
bool WriteMesh( const char *filename, idExportOptions &options );
|
||||
bool WriteAnim( const char *filename, idExportOptions &options );
|
||||
bool WriteCamera( const char *filename, idExportOptions &options );
|
||||
};
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
Maya
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
class idMayaExport {
|
||||
private:
|
||||
idExportModel model;
|
||||
idExportOptions &options;
|
||||
|
||||
void FreeDagNodes( void );
|
||||
|
||||
float TimeForFrame( int num ) const;
|
||||
int GetMayaFrameNum( int num ) const;
|
||||
void SetFrame( int num );
|
||||
|
||||
|
||||
void GetBindPose( MObject &jointNode, idExportJoint *joint, float scale );
|
||||
void GetLocalTransform( idExportJoint *joint, idVec3 &pos, idMat3 &mat );
|
||||
void GetWorldTransform( idExportJoint *joint, idVec3 &pos, idMat3 &mat, float scale );
|
||||
|
||||
void CreateJoints( float scale );
|
||||
void PruneJoints( idStrList &keepjoints, idStr &prefix );
|
||||
void RenameJoints( idList<idNamePair> &renamejoints, idStr &prefix );
|
||||
bool RemapParents( idList<idNamePair> &remapjoints );
|
||||
|
||||
MObject FindShader( MObject& setNode );
|
||||
void GetTextureForMesh( idExportMesh *mesh, MFnDagNode &dagNode );
|
||||
|
||||
idExportMesh *CopyMesh( MFnSkinCluster &skinCluster, float scale );
|
||||
void CreateMesh( float scale );
|
||||
void CombineMeshes( void );
|
||||
|
||||
void GetAlignment( idStr &alignName, idMat3 &align, float rotate, int startframe );
|
||||
|
||||
const char *GetObjectType( MObject object );
|
||||
|
||||
float GetCameraFov( idExportJoint *joint );
|
||||
void GetCameraFrame( idExportJoint *camera, idMat3 &align, cameraFrame_t *cam );
|
||||
void CreateCameraAnim( idMat3 &align );
|
||||
|
||||
void GetDefaultPose( idMat3 &align );
|
||||
void CreateAnimation( idMat3 &align );
|
||||
|
||||
public:
|
||||
idMayaExport( idExportOptions &exportOptions ) : options( exportOptions ) { };
|
||||
~idMayaExport();
|
||||
|
||||
void ConvertModel( void );
|
||||
void ConvertToMD3( void );
|
||||
};
|
3140
MayaImport/maya_main.cpp
Normal file
3140
MayaImport/maya_main.cpp
Normal file
File diff suppressed because it is too large
Load diff
45
MayaImport/maya_main.h
Normal file
45
MayaImport/maya_main.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __MAYA_MAIN_H__
|
||||
#define __MAYA_MAIN_H__
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
Maya Import
|
||||
|
||||
==============================================================
|
||||
*/
|
||||
|
||||
|
||||
typedef bool ( *exporterDLLEntry_t )( int version, idCommon *common, idSys *sys );
|
||||
typedef const char *( *exporterInterface_t )( const char *ospath, const char *commandline );
|
||||
typedef void ( *exporterShutdown_t )( void );
|
||||
|
||||
#endif /* !__MAYA_MAIN_H__ */
|
4
MayaImport/mayaimport.def
Normal file
4
MayaImport/mayaimport.def
Normal file
|
@ -0,0 +1,4 @@
|
|||
EXPORTS
|
||||
dllEntry
|
||||
Maya_ConvertModel
|
||||
Maya_Shutdown
|
567
SConstruct
Normal file
567
SConstruct
Normal file
|
@ -0,0 +1,567 @@
|
|||
# -*- mode: python -*-
|
||||
# DOOM build script
|
||||
# TTimo <ttimo@idsoftware.com>
|
||||
# http://scons.sourceforge.net
|
||||
|
||||
import sys, os, time, commands, re, pickle, StringIO, popen2, commands, pdb, zipfile, string
|
||||
import SCons
|
||||
|
||||
sys.path.append( 'sys/scons' )
|
||||
import scons_utils
|
||||
|
||||
conf_filename='site.conf'
|
||||
# choose configuration variables which should be saved between runs
|
||||
# ( we handle all those as strings )
|
||||
serialized=['CC', 'CXX', 'JOBS', 'BUILD', 'IDNET_HOST', 'GL_HARDLINK', 'DEDICATED',
|
||||
'DEBUG_MEMORY', 'LIBC_MALLOC', 'ID_NOLANADDRESS', 'ID_MCHECK', 'ALSA',
|
||||
'TARGET_CORE', 'TARGET_GAME', 'TARGET_D3XP', 'TARGET_MONO', 'TARGET_MONO_D3XP',
|
||||
'TARGET_DEMO', 'NOCURL', 'BUILD_ROOT', 'BUILD_GAMEPAK', 'BASEFLAGS', 'SILENT',
|
||||
'STEAM' ]
|
||||
|
||||
# global build mode ------------------------------
|
||||
|
||||
g_sdk = not os.path.exists( 'sys/scons/SConscript.core' )
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
# help -------------------------------------------
|
||||
|
||||
help_string = """
|
||||
Usage: scons [OPTIONS] [TARGET] [CONFIG]
|
||||
|
||||
[OPTIONS] and [TARGET] are covered in command line options, use scons -H
|
||||
|
||||
[CONFIG]: KEY="VALUE" [...]
|
||||
a number of configuration options saved between runs in the """ + conf_filename + """ file
|
||||
erase """ + conf_filename + """ to start with default settings again
|
||||
|
||||
CC (default gcc)
|
||||
CXX (default g++)
|
||||
Specify C and C++ compilers (defaults gcc and g++)
|
||||
ex: CC="gcc-3.3"
|
||||
You can use ccache and distcc, for instance:
|
||||
CC="ccache distcc gcc" CXX="ccache distcc g++"
|
||||
|
||||
JOBS (default 1)
|
||||
Parallel build
|
||||
|
||||
BUILD (default debug)
|
||||
Use debug-all/debug/release to select build settings
|
||||
ex: BUILD="release"
|
||||
debug-all: no optimisations, debugging symbols
|
||||
debug: -O -g
|
||||
release: all optimisations, including CPU target etc.
|
||||
|
||||
BUILD_ROOT (default 'build')
|
||||
change the build root directory
|
||||
|
||||
TARGET_GAME (default 0)
|
||||
Build the base game code
|
||||
|
||||
TARGET_D3XP (default 0)
|
||||
Build the d3xp game code
|
||||
|
||||
BUILD_GAMEPAK (default 0)
|
||||
Build a game pak
|
||||
|
||||
BASEFLAGS (default '')
|
||||
Add compile flags
|
||||
|
||||
NOCONF (default 0, not saved)
|
||||
ignore site configuration and use defaults + command line only
|
||||
|
||||
SILENT ( default 0, saved )
|
||||
hide the compiler output, unless error
|
||||
|
||||
STEAM ( default 0, saved )
|
||||
enable steam build or not
|
||||
"""
|
||||
|
||||
if ( not g_sdk ):
|
||||
help_string += """
|
||||
DEDICATED (default 0)
|
||||
Control regular / dedicated type of build:
|
||||
0 - client
|
||||
1 - dedicated server
|
||||
2 - both
|
||||
|
||||
TARGET_CORE (default 0)
|
||||
Build the core
|
||||
|
||||
TARGET_MONO (default 0)
|
||||
Build a monolithic binary
|
||||
|
||||
TARGET_MONO_D3XP (default 1)
|
||||
Build a monolithis binary of d3xp
|
||||
|
||||
TARGET_DEMO (default 0)
|
||||
Build demo client ( both a core and game, no mono )
|
||||
NOTE: if you *only* want the demo client, set TARGET_CORE and TARGET_GAME to 0
|
||||
|
||||
IDNET_HOST (default to source hardcoded)
|
||||
Override builtin IDNET_HOST with your own settings
|
||||
|
||||
GL_HARDLINK (default 0)
|
||||
Instead of dynamically loading the OpenGL libraries, use implicit dependencies
|
||||
NOTE: no GL logging capability and no r_glDriver with GL_HARDLINK 1
|
||||
|
||||
DEBUG_MEMORY (default 0)
|
||||
Enables memory logging to file
|
||||
|
||||
LIBC_MALLOC (default 1)
|
||||
Toggle idHeap memory / libc malloc usage
|
||||
When libc malloc is on, memory size statistics are wrong ( no _msize )
|
||||
|
||||
ID_NOLANADDRESS (default 0)
|
||||
Don't recognize any IP as LAN address. This is useful when debugging network
|
||||
code where LAN / not LAN influences application behaviour
|
||||
|
||||
ID_MCHECK (default 2)
|
||||
Perform heap consistency checking
|
||||
0: on in Debug / off in Release
|
||||
1 forces on, 2 forces off
|
||||
note that Doom has it's own block allocator/checking
|
||||
this should not be considered a replacement, but an additional tool
|
||||
|
||||
ALSA (default 1)
|
||||
enable ALSA sound backend support
|
||||
|
||||
SETUP (default 0, not saved)
|
||||
build a setup. implies release build
|
||||
|
||||
SDK (default 0, not saved)
|
||||
build an SDK release
|
||||
|
||||
NOCURL (default 1)
|
||||
set to 1 to disable usage of libcurl and http/ftp downloads feature
|
||||
"""
|
||||
|
||||
Help( help_string )
|
||||
|
||||
# end help ---------------------------------------
|
||||
|
||||
# sanity -----------------------------------------
|
||||
|
||||
EnsureSConsVersion( 0, 96 )
|
||||
|
||||
# end sanity -------------------------------------
|
||||
|
||||
# system detection -------------------------------
|
||||
|
||||
# CPU type
|
||||
cpu = commands.getoutput('uname -m')
|
||||
exp = re.compile('.*i?86.*')
|
||||
if exp.match(cpu):
|
||||
cpu = 'x86'
|
||||
else:
|
||||
cpu = commands.getoutput('uname -p')
|
||||
if ( cpu == 'powerpc' ):
|
||||
cpu = 'ppc'
|
||||
else:
|
||||
cpu = 'cpu'
|
||||
g_os = 'Linux'
|
||||
|
||||
# end system detection ---------------------------
|
||||
|
||||
# default settings -------------------------------
|
||||
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
JOBS = '1'
|
||||
BUILD = 'debug'
|
||||
DEDICATED = '0'
|
||||
TARGET_CORE = '0'
|
||||
TARGET_GAME = '0'
|
||||
TARGET_D3XP = '0'
|
||||
TARGET_MONO = '0'
|
||||
TARGET_MONO_D3XP = '1'
|
||||
TARGET_DEMO = '0'
|
||||
IDNET_HOST = ''
|
||||
GL_HARDLINK = '0'
|
||||
DEBUG_MEMORY = '0'
|
||||
LIBC_MALLOC = '1'
|
||||
ID_NOLANADDRESS = '0'
|
||||
ID_MCHECK = '2'
|
||||
BUILD_ROOT = 'build'
|
||||
ALSA = '1'
|
||||
SETUP = '0'
|
||||
SDK = '0'
|
||||
NOCONF = '0'
|
||||
NOCURL = '1'
|
||||
BUILD_GAMEPAK = '0'
|
||||
BASEFLAGS = ''
|
||||
SILENT = '0'
|
||||
STEAM = '0'
|
||||
|
||||
# end default settings ---------------------------
|
||||
|
||||
# site settings ----------------------------------
|
||||
|
||||
if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ):
|
||||
site_dict = {}
|
||||
if (os.path.exists(conf_filename)):
|
||||
site_file = open(conf_filename, 'r')
|
||||
p = pickle.Unpickler(site_file)
|
||||
site_dict = p.load()
|
||||
print 'Loading build configuration from ' + conf_filename + ':'
|
||||
for k, v in site_dict.items():
|
||||
exec_cmd = k + '=\'' + v + '\''
|
||||
print ' ' + exec_cmd
|
||||
exec(exec_cmd)
|
||||
else:
|
||||
print 'Site settings ignored'
|
||||
|
||||
# end site settings ------------------------------
|
||||
|
||||
# command line settings --------------------------
|
||||
|
||||
for k in ARGUMENTS.keys():
|
||||
exec_cmd = k + '=\'' + ARGUMENTS[k] + '\''
|
||||
print 'Command line: ' + exec_cmd
|
||||
exec( exec_cmd )
|
||||
|
||||
# end command line settings ----------------------
|
||||
|
||||
# save site configuration ----------------------
|
||||
|
||||
if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ):
|
||||
for k in serialized:
|
||||
exec_cmd = 'site_dict[\'' + k + '\'] = ' + k
|
||||
exec(exec_cmd)
|
||||
|
||||
site_file = open(conf_filename, 'w')
|
||||
p = pickle.Pickler(site_file)
|
||||
p.dump(site_dict)
|
||||
site_file.close()
|
||||
|
||||
# end save site configuration ------------------
|
||||
|
||||
# configuration rules --------------------------
|
||||
|
||||
if ( SETUP != '0' ):
|
||||
DEDICATED = '2'
|
||||
BUILD = 'release'
|
||||
|
||||
if ( g_sdk or SDK != '0' ):
|
||||
TARGET_CORE = '0'
|
||||
TARGET_GAME = '0'
|
||||
TARGET_D3XP = '0'
|
||||
TARGET_MONO = '0'
|
||||
TARGET_MONO_D3XP = '1'
|
||||
TARGET_DEMO = '0'
|
||||
|
||||
# end configuration rules ----------------------
|
||||
|
||||
# general configuration, target selection --------
|
||||
|
||||
g_build = BUILD_ROOT + '/' + BUILD
|
||||
|
||||
SConsignFile( 'scons.signatures' )
|
||||
|
||||
if ( GL_HARDLINK != '0' ):
|
||||
g_build += '-hardlink'
|
||||
|
||||
if ( DEBUG_MEMORY != '0' ):
|
||||
g_build += '-debugmem'
|
||||
|
||||
if ( LIBC_MALLOC != '1' ):
|
||||
g_build += '-nolibcmalloc'
|
||||
|
||||
SetOption('num_jobs', JOBS)
|
||||
|
||||
LINK = CXX
|
||||
|
||||
# common flags
|
||||
# BASE + CORE + OPT for engine
|
||||
# BASE + GAME + OPT for game
|
||||
# _noopt versions of the environements are built without the OPT
|
||||
|
||||
BASECPPFLAGS = [ ]
|
||||
CORECPPPATH = [ ]
|
||||
CORELIBPATH = [ ]
|
||||
CORECPPFLAGS = [ ]
|
||||
GAMECPPFLAGS = [ ]
|
||||
BASELINKFLAGS = [ ]
|
||||
CORELINKFLAGS = [ ]
|
||||
|
||||
# for release build, further optimisations that may not work on all files
|
||||
OPTCPPFLAGS = [ ]
|
||||
|
||||
BASECPPFLAGS.append( BASEFLAGS )
|
||||
BASECPPFLAGS.append( '-pipe' )
|
||||
# warn all
|
||||
BASECPPFLAGS.append( '-Wall' )
|
||||
BASECPPFLAGS.append( '-Wno-unknown-pragmas' )
|
||||
# this define is necessary to make sure threading support is enabled in X
|
||||
CORECPPFLAGS.append( '-DXTHREADS' )
|
||||
# don't wrap gcc messages
|
||||
BASECPPFLAGS.append( '-fmessage-length=0' )
|
||||
# gcc 4.0
|
||||
BASECPPFLAGS.append( '-fpermissive' )
|
||||
|
||||
if ( g_os == 'Linux' ):
|
||||
# gcc 4.x option only - only export what we mean to from the game SO
|
||||
BASECPPFLAGS.append( '-fvisibility=hidden' )
|
||||
# get the 64 bits machine on the distcc array to produce 32 bit binaries :)
|
||||
BASECPPFLAGS.append( '-m32' )
|
||||
BASELINKFLAGS.append( '-m32' )
|
||||
#rpath
|
||||
BASELINKFLAGS.append( '-Wl,-rpath=\$$ORIGIN/lib' )
|
||||
|
||||
if ( g_sdk or SDK != '0' ):
|
||||
BASECPPFLAGS.append( '-D_D3SDK' )
|
||||
|
||||
if ( BUILD == 'debug-all' ):
|
||||
OPTCPPFLAGS = [ '-g', '-D_DEBUG' ]
|
||||
if ( ID_MCHECK == '0' ):
|
||||
ID_MCHECK = '1'
|
||||
elif ( BUILD == 'debug' ):
|
||||
OPTCPPFLAGS = [ '-g', '-O1', '-D_DEBUG' ]
|
||||
if ( ID_MCHECK == '0' ):
|
||||
ID_MCHECK = '1'
|
||||
elif ( BUILD == 'release' ):
|
||||
# -fomit-frame-pointer: "-O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging."
|
||||
# on x86 have to set it explicitely
|
||||
# -finline-functions: implicit at -O3
|
||||
# -fschedule-insns2: implicit at -O2
|
||||
# no-unsafe-math-optimizations: that should be on by default really. hit some wonko bugs in physics code because of that
|
||||
OPTCPPFLAGS = [ '-O3', '-march=pentium3', '-Winline', '-ffast-math', '-fno-unsafe-math-optimizations', '-fomit-frame-pointer' ]
|
||||
if ( ID_MCHECK == '0' ):
|
||||
ID_MCHECK = '2'
|
||||
else:
|
||||
print 'Unknown build configuration ' + BUILD
|
||||
sys.exit(0)
|
||||
|
||||
if ( GL_HARDLINK != '0' ):
|
||||
CORECPPFLAGS.append( '-DID_GL_HARDLINK' )
|
||||
|
||||
if ( DEBUG_MEMORY != '0' ):
|
||||
BASECPPFLAGS += [ '-DID_DEBUG_MEMORY', '-DID_REDIRECT_NEWDELETE' ]
|
||||
|
||||
if ( LIBC_MALLOC != '1' ):
|
||||
BASECPPFLAGS.append( '-DUSE_LIBC_MALLOC=0' )
|
||||
|
||||
if ( len( IDNET_HOST ) ):
|
||||
CORECPPFLAGS.append( '-DIDNET_HOST=\\"%s\\"' % IDNET_HOST)
|
||||
|
||||
if ( ID_NOLANADDRESS != '0' ):
|
||||
CORECPPFLAGS.append( '-DID_NOLANADDRESS' )
|
||||
|
||||
if ( ID_MCHECK == '1' ):
|
||||
BASECPPFLAGS.append( '-DID_MCHECK' )
|
||||
|
||||
# use sdl to make certain things work better
|
||||
BASECPPFLAGS.append( '-DUSE_SDL' )
|
||||
CORECPPPATH.append( '../../sdl2/include' )
|
||||
CORELIBPATH.append( '../../sdl2/lib/linux' )
|
||||
|
||||
# steam settings
|
||||
if (STEAM == '1'):
|
||||
BASECPPFLAGS.append( '-DSTEAM' )
|
||||
CORECPPPATH.append( '../../steam' )
|
||||
CORELIBPATH.append( '../../steam' )
|
||||
|
||||
# create the build environements
|
||||
g_base_env = Environment( ENV = os.environ, CC = CC, CXX = CXX, LINK = LINK, CPPFLAGS = BASECPPFLAGS, LINKFLAGS = BASELINKFLAGS, CPPPATH = CORECPPPATH, LIBPATH = CORELIBPATH )
|
||||
scons_utils.SetupUtils( g_base_env )
|
||||
|
||||
g_env = g_base_env.Clone()
|
||||
|
||||
#g_env.Append( RPATH = g_env.Literal(os.path.join('\\$$ORIGIN', 'lib') ) )
|
||||
|
||||
g_env['CPPFLAGS'] += OPTCPPFLAGS
|
||||
g_env['CPPFLAGS'] += CORECPPFLAGS
|
||||
g_env['LINKFLAGS'] += CORELINKFLAGS
|
||||
|
||||
g_env_noopt = g_base_env.Clone()
|
||||
g_env_noopt['CPPFLAGS'] += CORECPPFLAGS
|
||||
|
||||
g_game_env = g_base_env.Clone()
|
||||
g_game_env['CPPFLAGS'] += OPTCPPFLAGS
|
||||
g_game_env['CPPFLAGS'] += GAMECPPFLAGS
|
||||
|
||||
# maintain this dangerous optimization off at all times
|
||||
g_env.Append( CPPFLAGS = '-fno-strict-aliasing' )
|
||||
g_env_noopt.Append( CPPFLAGS = '-fno-strict-aliasing' )
|
||||
g_game_env.Append( CPPFLAGS = '-fno-strict-aliasing' )
|
||||
|
||||
if ( int(JOBS) > 1 ):
|
||||
print 'Using buffered process output'
|
||||
silent = False
|
||||
if ( SILENT == '1' ):
|
||||
silent = True
|
||||
scons_utils.SetupBufferedOutput( g_env, silent )
|
||||
scons_utils.SetupBufferedOutput( g_game_env, silent )
|
||||
|
||||
# mark the globals
|
||||
|
||||
local_dedicated = 0
|
||||
# 0 for monolithic build
|
||||
local_gamedll = 1
|
||||
# carry around rather than using .a, avoids binutils bugs
|
||||
idlib_objects = []
|
||||
game_objects = []
|
||||
local_demo = 0
|
||||
# curl usage. there is a global toggle flag
|
||||
local_curl = 0
|
||||
curl_lib = []
|
||||
# if idlib should produce PIC objects ( depending on core or game inclusion )
|
||||
local_idlibpic = 0
|
||||
# switch between base game build and d3xp game build
|
||||
local_d3xp = 1
|
||||
|
||||
GLOBALS = 'g_env g_env_noopt g_game_env g_os ID_MCHECK ALSA idlib_objects game_objects local_dedicated local_gamedll local_demo local_idlibpic curl_lib local_curl local_d3xp OPTCPPFLAGS STEAM'
|
||||
|
||||
# end general configuration ----------------------
|
||||
|
||||
# targets ----------------------------------------
|
||||
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
|
||||
doom = None
|
||||
doomded = None
|
||||
game = None
|
||||
doom_mono = None
|
||||
doom_demo = None
|
||||
game_demo = None
|
||||
|
||||
# build curl if needed
|
||||
if ( NOCURL == '0' and ( TARGET_CORE == '1' or TARGET_MONO == '1' or TARGET_MONO_D3XP == '1' ) ):
|
||||
# 1: debug, 2: release
|
||||
if ( BUILD == 'release' ):
|
||||
local_curl = 2
|
||||
else:
|
||||
local_curl = 1
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
curl_lib = SConscript( 'sys/scons/SConscript.curl' )
|
||||
|
||||
if ( TARGET_CORE == '1' ):
|
||||
local_gamedll = 1
|
||||
local_demo = 0
|
||||
local_idlibpic = 0
|
||||
if ( DEDICATED == '0' or DEDICATED == '2' ):
|
||||
local_dedicated = 0
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
|
||||
VariantDir( g_build + '/core/glimp', '.', duplicate = 1 )
|
||||
SConscript( g_build + '/core/glimp/sys/scons/SConscript.gl' )
|
||||
VariantDir( g_build + '/core', '.', duplicate = 0 )
|
||||
idlib_objects = SConscript( g_build + '/core/sys/scons/SConscript.idlib' )
|
||||
Export( 'GLOBALS ' + GLOBALS ) # update idlib_objects
|
||||
doom = SConscript( g_build + '/core/sys/scons/SConscript.core' )
|
||||
|
||||
InstallAs( '#doom.' + cpu, doom )
|
||||
|
||||
if ( DEDICATED == '1' or DEDICATED == '2' ):
|
||||
local_dedicated = 1
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
|
||||
VariantDir( g_build + '/dedicated/glimp', '.', duplicate = 1 )
|
||||
SConscript( g_build + '/dedicated/glimp/sys/scons/SConscript.gl' )
|
||||
VariantDir( g_build + '/dedicated', '.', duplicate = 0 )
|
||||
idlib_objects = SConscript( g_build + '/dedicated/sys/scons/SConscript.idlib' )
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
doomded = SConscript( g_build + '/dedicated/sys/scons/SConscript.core' )
|
||||
|
||||
InstallAs( '#doomded.' + cpu, doomded )
|
||||
|
||||
if ( TARGET_GAME == '1' or TARGET_D3XP == '1' ):
|
||||
local_gamedll = 1
|
||||
local_demo = 0
|
||||
local_dedicated = 0
|
||||
local_idlibpic = 1
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
dupe = 0
|
||||
if ( SDK == '1' ):
|
||||
# building an SDK, use scons for dependencies walking
|
||||
# clear the build directory to be safe
|
||||
g_env.PreBuildSDK( [ g_build + '/game', g_build + '/d3xp' ] )
|
||||
dupe = 1
|
||||
VariantDir( g_build + '/game', '.', duplicate = dupe )
|
||||
idlib_objects = SConscript( g_build + '/game/sys/scons/SConscript.idlib' )
|
||||
if ( TARGET_GAME == '1' ):
|
||||
local_d3xp = 0
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
game = SConscript( g_build + '/game/sys/scons/SConscript.game' )
|
||||
game_base = InstallAs( '#game%s-base.so' % cpu, game )
|
||||
if ( BUILD_GAMEPAK == '1' ):
|
||||
Command( '#game01-base.pk4', [ game_base, game ], Action( g_env.BuildGamePak ) )
|
||||
if ( TARGET_D3XP == '1' ):
|
||||
# uses idlib as compiled for game/
|
||||
local_d3xp = 1
|
||||
VariantDir( g_build + '/d3xp', '.', duplicate = dupe )
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
d3xp = SConscript( g_build + '/d3xp/sys/scons/SConscript.game' )
|
||||
game_d3xp = InstallAs( '#game%s-d3xp.so' % cpu, d3xp )
|
||||
if ( BUILD_GAMEPAK == '1' ):
|
||||
Command( '#game01-d3xp.pk4', [ game_d3xp, d3xp ], Action( g_env.BuildGamePak ) )
|
||||
|
||||
if ( TARGET_MONO_D3XP == '1' or TARGET_MONO == '1' ):
|
||||
local_gamedll = 0
|
||||
local_dedicated = 0
|
||||
local_demo = 0
|
||||
local_idlibpic = 0
|
||||
local_d3xp = 0
|
||||
|
||||
if ( TARGET_MONO_D3XP == '1' ):
|
||||
local_d3xp = 1
|
||||
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
VariantDir( g_build + '/mono/glimp', '.', duplicate = 1 )
|
||||
SConscript( g_build + '/mono/glimp/sys/scons/SConscript.gl' )
|
||||
VariantDir( g_build + '/mono', '.', duplicate = 0 )
|
||||
idlib_objects = SConscript( g_build + '/mono/sys/scons/SConscript.idlib' )
|
||||
game_objects = SConscript( g_build + '/mono/sys/scons/SConscript.game' )
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
doom_mono = SConscript( g_build + '/mono/sys/scons/SConscript.core' )
|
||||
InstallAs( '#qc.bin.' + cpu, doom_mono )
|
||||
|
||||
if ( TARGET_DEMO == '1' ):
|
||||
# NOTE: no D3XP atm. add a TARGET_DEMO_D3XP
|
||||
local_demo = 1
|
||||
local_dedicated = 0
|
||||
local_gamedll = 1
|
||||
local_idlibpic = 0
|
||||
local_curl = 0
|
||||
local_d3xp = 0
|
||||
curl_lib = []
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
VariantDir( g_build + '/demo/glimp', '.', duplicate = 1 )
|
||||
SConscript( g_build + '/demo/glimp/sys/scons/SConscript.gl' )
|
||||
VariantDir( g_build + '/demo', '.', duplicate = 0 )
|
||||
idlib_objects = SConscript( g_build + '/demo/sys/scons/SConscript.idlib' )
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
doom_demo = SConscript( g_build + '/demo/sys/scons/SConscript.core' )
|
||||
|
||||
InstallAs( '#doom-demo.' + cpu, doom_demo )
|
||||
|
||||
local_idlibpic = 1
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
VariantDir( g_build + '/demo/game', '.', duplicate = 0 )
|
||||
idlib_objects = SConscript( g_build + '/demo/game/sys/scons/SConscript.idlib' )
|
||||
Export( 'GLOBALS ' + GLOBALS )
|
||||
game_demo = SConscript( g_build + '/demo/game/sys/scons/SConscript.game' )
|
||||
|
||||
InstallAs( '#game%s-demo.so' % cpu, game_demo )
|
||||
|
||||
if ( SETUP != '0' ):
|
||||
brandelf = Program( 'brandelf', 'sys/linux/setup/brandelf.c' )
|
||||
if ( TARGET_CORE == '1' and TARGET_GAME == '1' and TARGET_D3XP == '1' ):
|
||||
setup = Command( 'setup', [ brandelf, doom, doomded, game, d3xp ], Action( g_env.BuildSetup ) )
|
||||
else:
|
||||
print 'Skipping main setup: TARGET_CORE == 0 or TARGET_GAME == 0'
|
||||
if ( TARGET_DEMO == '1' ):
|
||||
setup_demo = Command( 'setup-demo', [ brandelf, doom_demo, game_demo ], Action( g_env.BuildSetup ) )
|
||||
# if building two setups, make sure JOBS doesn't parallelize them
|
||||
try:
|
||||
g_env.Depends( setup_demo, setup )
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
print 'Skipping demo setup ( TARGET_DEMO == 0 )'
|
||||
|
||||
if ( SDK != '0' ):
|
||||
setup_sdk = Command( 'sdk', [ ], Action( g_env.BuildSDK ) )
|
||||
g_env.Depends( setup_sdk, [ game, d3xp ] )
|
||||
|
||||
# end targets ------------------------------------
|
1050
TypeInfo/TypeInfoGen.cpp
Normal file
1050
TypeInfo/TypeInfoGen.cpp
Normal file
File diff suppressed because it is too large
Load diff
116
TypeInfo/TypeInfoGen.h
Normal file
116
TypeInfo/TypeInfoGen.h
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __TYPEINFOGEN_H__
|
||||
#define __TYPEINFOGEN_H__
|
||||
|
||||
/*
|
||||
===================================================================================
|
||||
|
||||
Type Info Generator
|
||||
|
||||
- template classes are commented out (different instantiations are not identified)
|
||||
- bit fields are commented out (cannot get the address of bit fields)
|
||||
- multiple inheritance is not supported (only tracks a single super type)
|
||||
|
||||
===================================================================================
|
||||
*/
|
||||
|
||||
class idConstantInfo {
|
||||
public:
|
||||
idStr name;
|
||||
idStr type;
|
||||
idStr value;
|
||||
};
|
||||
|
||||
class idEnumValueInfo {
|
||||
public:
|
||||
idStr name;
|
||||
int value;
|
||||
};
|
||||
|
||||
class idEnumTypeInfo {
|
||||
public:
|
||||
idStr typeName;
|
||||
idStr scope;
|
||||
bool unnamed;
|
||||
bool isTemplate;
|
||||
idList<idEnumValueInfo> values;
|
||||
};
|
||||
|
||||
class idClassVariableInfo {
|
||||
public:
|
||||
idStr name;
|
||||
idStr type;
|
||||
int bits;
|
||||
};
|
||||
|
||||
class idClassTypeInfo {
|
||||
public:
|
||||
idStr typeName;
|
||||
idStr superType;
|
||||
idStr scope;
|
||||
bool unnamed;
|
||||
bool isTemplate;
|
||||
idList<idClassVariableInfo> variables;
|
||||
};
|
||||
|
||||
class idTypeInfoGen {
|
||||
public:
|
||||
idTypeInfoGen( void );
|
||||
~idTypeInfoGen( void );
|
||||
|
||||
void AddDefine( const char *define );
|
||||
void CreateTypeInfo( const char *path );
|
||||
void WriteTypeInfo( const char *fileName ) const;
|
||||
|
||||
private:
|
||||
idStrList defines;
|
||||
|
||||
idList<idConstantInfo *> constants;
|
||||
idList<idEnumTypeInfo *> enums;
|
||||
idList<idClassTypeInfo *> classes;
|
||||
|
||||
int numTemplates;
|
||||
int maxInheritance;
|
||||
idStr maxInheritanceClass;
|
||||
|
||||
int GetInheritance( const char *typeName ) const;
|
||||
int EvaluateIntegerString( const idStr &string );
|
||||
float EvaluateFloatString( const idStr &string );
|
||||
idConstantInfo * FindConstant( const char *name );
|
||||
int GetIntegerConstant( const char *scope, const char *name, idParser &src );
|
||||
float GetFloatConstant( const char *scope, const char *name, idParser &src );
|
||||
int ParseArraySize( const char *scope, idParser &src );
|
||||
void ParseConstantValue( const char *scope, idParser &src, idStr &value );
|
||||
idEnumTypeInfo * ParseEnumType( const char *scope, bool isTemplate, bool typeDef, idParser &src );
|
||||
idClassTypeInfo * ParseClassType( const char *scope, const char *templateArgs, bool isTemplate, bool typeDef, idParser &src );
|
||||
void ParseScope( const char *scope, bool isTemplate, idParser &src, idClassTypeInfo *typeInfo );
|
||||
};
|
||||
|
||||
#endif /* !__TYPEINFOGEN_H__ */
|
305
TypeInfo/main.cpp
Normal file
305
TypeInfo/main.cpp
Normal file
|
@ -0,0 +1,305 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#include "../idlib/precompiled.h"
|
||||
#include "../sys/sys_local.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TypeInfoGen.h"
|
||||
|
||||
idSession * session = NULL;
|
||||
idDeclManager * declManager = NULL;
|
||||
idEventLoop * eventLoop = NULL;
|
||||
|
||||
int idEventLoop::JournalLevel( void ) const { return 0; }
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
idCommon
|
||||
|
||||
==============================================================
|
||||
*/
|
||||
|
||||
#define STDIO_PRINT( pre, post ) \
|
||||
va_list argptr; \
|
||||
va_start( argptr, fmt ); \
|
||||
printf( pre ); \
|
||||
vprintf( fmt, argptr ); \
|
||||
printf( post ); \
|
||||
va_end( argptr )
|
||||
|
||||
|
||||
class idCommonLocal : public idCommon {
|
||||
public:
|
||||
idCommonLocal( void ) {}
|
||||
|
||||
virtual void Init( int argc, const char **argv, const char *cmdline ) {}
|
||||
virtual void Shutdown( void ) {}
|
||||
virtual void Quit( void ) {}
|
||||
virtual bool IsInitialized( void ) const { return true; }
|
||||
virtual void Frame( void ) {}
|
||||
virtual void GUIFrame( bool execCmd, bool network ) {}
|
||||
virtual void Async( void ) {}
|
||||
virtual void StartupVariable( const char *match, bool once ) {}
|
||||
virtual void InitTool( const toolFlag_t tool, const idDict *dict ) {}
|
||||
virtual void ActivateTool( bool active ) {}
|
||||
virtual void WriteConfigToFile( const char *filename ) {}
|
||||
virtual void WriteFlaggedCVarsToFile( const char *filename, int flags, const char *setCmd ) {}
|
||||
virtual void BeginRedirect( char *buffer, int buffersize, void (*flush)( const char * ) ) {}
|
||||
virtual void EndRedirect( void ) {}
|
||||
virtual void SetRefreshOnPrint( bool set ) {}
|
||||
virtual void Printf( const char *fmt, ... ) { STDIO_PRINT( "", "" ); }
|
||||
virtual void VPrintf( const char *fmt, va_list arg ) { vprintf( fmt, arg ); }
|
||||
virtual void DPrintf( const char *fmt, ... ) { /*STDIO_PRINT( "", "" );*/ }
|
||||
virtual void Warning( const char *fmt, ... ) { STDIO_PRINT( "WARNING: ", "\n" ); }
|
||||
virtual void DWarning( const char *fmt, ...) { /*STDIO_PRINT( "WARNING: ", "\n" );*/ }
|
||||
virtual void PrintWarnings( void ) {}
|
||||
virtual void ClearWarnings( const char *reason ) {}
|
||||
virtual void Error( const char *fmt, ... ) { STDIO_PRINT( "ERROR: ", "\n" ); exit(0); }
|
||||
virtual void FatalError( const char *fmt, ... ) { STDIO_PRINT( "FATAL ERROR: ", "\n" ); exit(0); }
|
||||
virtual const idLangDict *GetLanguageDict() { return NULL; }
|
||||
virtual const char * KeysFromBinding( const char *bind ) { return NULL; }
|
||||
virtual const char * BindingFromKey( const char *key ) { return NULL; }
|
||||
virtual int ButtonState( int key ) { return 0; }
|
||||
virtual int KeyState( int key ) { return 0; }
|
||||
};
|
||||
|
||||
idCommonLocal commonLocal;
|
||||
idCommon * common = &commonLocal;
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
idSys
|
||||
|
||||
==============================================================
|
||||
*/
|
||||
|
||||
void Sys_Mkdir( const char *path ) {}
|
||||
ID_TIME_T Sys_FileTimeStamp( FILE *fp ) { return 0; }
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
|
||||
const char *Sys_Cwd( void ) {
|
||||
static char cwd[1024];
|
||||
|
||||
_getcwd( cwd, sizeof( cwd ) - 1 );
|
||||
cwd[sizeof( cwd ) - 1] = 0;
|
||||
|
||||
int i = idStr::FindText( cwd, CD_BASEDIR, false );
|
||||
if ( i >= 0 ) {
|
||||
cwd[i + strlen( CD_BASEDIR )] = '\0';
|
||||
}
|
||||
|
||||
return cwd;
|
||||
}
|
||||
|
||||
const char *Sys_DefaultCDPath( void ) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const char *Sys_DefaultBasePath( void ) {
|
||||
return Sys_Cwd();
|
||||
}
|
||||
|
||||
const char *Sys_DefaultSavePath( void ) {
|
||||
return cvarSystem->GetCVarString( "fs_basepath" );
|
||||
}
|
||||
|
||||
const char *Sys_EXEPath( void ) {
|
||||
return "";
|
||||
}
|
||||
|
||||
int Sys_ListFiles( const char *directory, const char *extension, idStrList &list ) {
|
||||
idStr search;
|
||||
struct _finddata_t findinfo;
|
||||
int findhandle;
|
||||
int flag;
|
||||
|
||||
if ( !extension) {
|
||||
extension = "";
|
||||
}
|
||||
|
||||
// passing a slash as extension will find directories
|
||||
if ( extension[0] == '/' && extension[1] == 0 ) {
|
||||
extension = "";
|
||||
flag = 0;
|
||||
} else {
|
||||
flag = _A_SUBDIR;
|
||||
}
|
||||
|
||||
sprintf( search, "%s\\*%s", directory, extension );
|
||||
|
||||
// search
|
||||
list.Clear();
|
||||
|
||||
findhandle = _findfirst( search, &findinfo );
|
||||
if ( findhandle == -1 ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
do {
|
||||
if ( flag ^ ( findinfo.attrib & _A_SUBDIR ) ) {
|
||||
list.Append( findinfo.name );
|
||||
}
|
||||
} while ( _findnext( findhandle, &findinfo ) != -1 );
|
||||
|
||||
_findclose( findhandle );
|
||||
|
||||
return list.Num();
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
const char * Sys_DefaultCDPath( void ) { return ""; }
|
||||
const char * Sys_DefaultBasePath( void ) { return ""; }
|
||||
const char * Sys_DefaultSavePath( void ) { return ""; }
|
||||
int Sys_ListFiles( const char *directory, const char *extension, idStrList &list ) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
xthreadInfo * g_threads[MAX_THREADS];
|
||||
int g_thread_count;
|
||||
|
||||
void Sys_CreateThread( xthread_t function, void *parms, xthreadPriority priority, xthreadInfo &info, const char *name, xthreadInfo *threads[MAX_THREADS], int *thread_count ) {}
|
||||
void Sys_DestroyThread( xthreadInfo& info ) {}
|
||||
|
||||
void Sys_EnterCriticalSection( int index ) {}
|
||||
void Sys_LeaveCriticalSection( int index ) {}
|
||||
|
||||
void Sys_WaitForEvent( int index ) {}
|
||||
void Sys_TriggerEvent( int index ) {}
|
||||
|
||||
/*
|
||||
==============
|
||||
idSysLocal stub
|
||||
==============
|
||||
*/
|
||||
void idSysLocal::DebugPrintf( const char *fmt, ... ) {}
|
||||
void idSysLocal::DebugVPrintf( const char *fmt, va_list arg ) {}
|
||||
|
||||
double idSysLocal::GetClockTicks( void ) { return 0.0; }
|
||||
double idSysLocal::ClockTicksPerSecond( void ) { return 1.0; }
|
||||
cpuid_t idSysLocal::GetProcessorId( void ) { return (cpuid_t)0; }
|
||||
const char * idSysLocal::GetProcessorString( void ) { return ""; }
|
||||
const char * idSysLocal::FPU_GetState( void ) { return ""; }
|
||||
bool idSysLocal::FPU_StackIsEmpty( void ) { return true; }
|
||||
void idSysLocal::FPU_SetFTZ( bool enable ) {}
|
||||
void idSysLocal::FPU_SetDAZ( bool enable ) {}
|
||||
|
||||
bool idSysLocal::LockMemory( void *ptr, int bytes ) { return false; }
|
||||
bool idSysLocal::UnlockMemory( void *ptr, int bytes ) { return false; }
|
||||
|
||||
void idSysLocal::GetCallStack( address_t *callStack, const int callStackSize ) { memset( callStack, 0, callStackSize * sizeof( callStack[0] ) ); }
|
||||
const char * idSysLocal::GetCallStackStr( const address_t *callStack, const int callStackSize ) { return ""; }
|
||||
const char * idSysLocal::GetCallStackCurStr( int depth ) { return ""; }
|
||||
void idSysLocal::ShutdownSymbols( void ) {}
|
||||
|
||||
int idSysLocal::DLL_Load( const char *dllName ) { return 0; }
|
||||
void * idSysLocal::DLL_GetProcAddress( int dllHandle, const char *procName ) { return NULL; }
|
||||
void idSysLocal::DLL_Unload( int dllHandle ) { }
|
||||
void idSysLocal::DLL_GetFileName( const char *baseName, char *dllName, int maxLength ) { }
|
||||
|
||||
sysEvent_t idSysLocal::GenerateMouseButtonEvent( int button, bool down ) { sysEvent_t ev; memset( &ev, 0, sizeof( ev ) ); return ev; }
|
||||
sysEvent_t idSysLocal::GenerateMouseMoveEvent( int deltax, int deltay ) { sysEvent_t ev; memset( &ev, 0, sizeof( ev ) ); return ev; }
|
||||
|
||||
void idSysLocal::OpenURL( const char *url, bool quit ) { }
|
||||
void idSysLocal::StartProcess( const char *exeName, bool quit ) { }
|
||||
|
||||
void idSysLocal::FPU_EnableExceptions( int exceptions ) { }
|
||||
|
||||
idSysLocal sysLocal;
|
||||
idSys * sys = &sysLocal;
|
||||
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
main
|
||||
|
||||
==============================================================
|
||||
*/
|
||||
|
||||
int main( int argc, char** argv ) {
|
||||
idStr fileName, sourcePath;
|
||||
idTypeInfoGen *generator;
|
||||
|
||||
idLib::common = common;
|
||||
idLib::cvarSystem = cvarSystem;
|
||||
idLib::fileSystem = fileSystem;
|
||||
idLib::sys = sys;
|
||||
|
||||
idLib::Init();
|
||||
cmdSystem->Init();
|
||||
cvarSystem->Init();
|
||||
idCVar::RegisterStaticVars();
|
||||
fileSystem->Init();
|
||||
|
||||
generator = new idTypeInfoGen;
|
||||
|
||||
if ( argc > 1 ) {
|
||||
sourcePath = idStr( "../"SOURCE_CODE_BASE_FOLDER"/" ) + argv[1];
|
||||
} else {
|
||||
sourcePath = "../"SOURCE_CODE_BASE_FOLDER"/game";
|
||||
}
|
||||
|
||||
if ( argc > 2 ) {
|
||||
fileName = idStr( "../"SOURCE_CODE_BASE_FOLDER"/" ) + argv[2];
|
||||
} else {
|
||||
fileName = "../"SOURCE_CODE_BASE_FOLDER"/game/gamesys/GameTypeInfo.h";
|
||||
}
|
||||
|
||||
if ( argc > 3 ) {
|
||||
for ( int i = 3; i < argc; i++ ) {
|
||||
generator->AddDefine( argv[i] );
|
||||
}
|
||||
} else {
|
||||
generator->AddDefine( "__cplusplus" );
|
||||
generator->AddDefine( "GAME_DLL" );
|
||||
generator->AddDefine( "ID_TYPEINFO" );
|
||||
}
|
||||
|
||||
generator->CreateTypeInfo( sourcePath );
|
||||
generator->WriteTypeInfo( fileName );
|
||||
|
||||
delete generator;
|
||||
|
||||
fileName.Clear();
|
||||
sourcePath.Clear();
|
||||
|
||||
fileSystem->Shutdown( false );
|
||||
cvarSystem->Shutdown();
|
||||
cmdSystem->Shutdown();
|
||||
idLib::ShutDown();
|
||||
|
||||
return 0;
|
||||
}
|
53
clean.bat
Normal file
53
clean.bat
Normal file
|
@ -0,0 +1,53 @@
|
|||
rmdir debug /s /q
|
||||
rmdir release /s /q
|
||||
del quake3.ncb
|
||||
del quake3.opt
|
||||
del quake3.plg
|
||||
del quake3.stt
|
||||
rmdir cgame\debug /s /q
|
||||
rmdir cgame\release /s /q
|
||||
del cgame\cgame.ncb
|
||||
del cgame\cgame.opt
|
||||
del cgame\cgame.plg
|
||||
del cgame\cgame.stt
|
||||
rmdir game\debug /s /q
|
||||
rmdir game\release /s /q
|
||||
del game\game.ncb
|
||||
del game\game.opt
|
||||
del game\game.plg
|
||||
del game\game.stt
|
||||
rmdir ui\debug /s /q
|
||||
rmdir ui\release /s /q
|
||||
del ui\ui.ncb
|
||||
del ui\ui.opt
|
||||
del ui\ui.plg
|
||||
del ui\ui.stt
|
||||
rmdir renderer\debug /s /q
|
||||
rmdir renderer\release /s /q
|
||||
del renderer\renderer.ncb
|
||||
del renderer\renderer.opt
|
||||
del renderer\renderer.plg
|
||||
del renderer\renderer.stt
|
||||
rmdir botlib\debug /s /q
|
||||
rmdir botlib\release /s /q
|
||||
del botlib\botlib.ncb
|
||||
del botlib\botlib.opt
|
||||
del botlib\botlib.plg
|
||||
del botlib\botlib.stt
|
||||
rmdir botlai\debug /s /q
|
||||
rmdir botlai\release /s /q
|
||||
del botai\botai.dsp
|
||||
del botai\botai.plg
|
||||
rmdir bspc\debug /s /q
|
||||
rmdir bspc\release /s /q
|
||||
del bspc\bspc.exe
|
||||
del bspc\bspc.log
|
||||
del bspc\bspc.ncb
|
||||
del bspc\bspc.opt
|
||||
del bspc\bspc.pdb
|
||||
del bspc\bspc.plg
|
||||
rmdir unix\debugi386-glibc /s /q
|
||||
rmdir unix\releasei386-glibc /s /q
|
||||
rmdir "mac\MacQuake3 Data" /s /q
|
||||
rmdir macosx\Client\Q3Test.app /s /q
|
||||
rmdir macosx\Client\Q3Test.build /s /q
|
148
cm/CollisionModel.h
Normal file
148
cm/CollisionModel.h
Normal file
|
@ -0,0 +1,148 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#ifndef __COLLISIONMODELMANAGER_H__
|
||||
#define __COLLISIONMODELMANAGER_H__
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace model vs. polygonal model collision detection.
|
||||
|
||||
Short translations are the least expensive. Retrieving contact points is
|
||||
about as cheap as a short translation. Position tests are more expensive
|
||||
and rotations are most expensive.
|
||||
|
||||
There is no position test at the start of a translation or rotation. In other
|
||||
words if a translation with start != end or a rotation with angle != 0 starts
|
||||
in solid, this goes unnoticed and the collision result is undefined.
|
||||
|
||||
A translation with start == end or a rotation with angle == 0 performs
|
||||
a position test and fills in the trace_t structure accordingly.
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
// contact type
|
||||
typedef enum {
|
||||
CONTACT_NONE, // no contact
|
||||
CONTACT_EDGE, // trace model edge hits model edge
|
||||
CONTACT_MODELVERTEX, // model vertex hits trace model polygon
|
||||
CONTACT_TRMVERTEX // trace model vertex hits model polygon
|
||||
} contactType_t;
|
||||
|
||||
// contact info
|
||||
typedef struct {
|
||||
contactType_t type; // contact type
|
||||
idVec3 point; // point of contact
|
||||
idVec3 normal; // contact plane normal
|
||||
float dist; // contact plane distance
|
||||
int contents; // contents at other side of surface
|
||||
const idMaterial * material; // surface material
|
||||
int modelFeature; // contact feature on model
|
||||
int trmFeature; // contact feature on trace model
|
||||
int entityNum; // entity the contact surface is a part of
|
||||
int id; // id of clip model the contact surface is part of
|
||||
} contactInfo_t;
|
||||
|
||||
// trace result
|
||||
typedef struct trace_s {
|
||||
float fraction; // fraction of movement completed, 1.0 = didn't hit anything
|
||||
idVec3 endpos; // final position of trace model
|
||||
idMat3 endAxis; // final axis of trace model
|
||||
contactInfo_t c; // contact information, only valid if fraction < 1.0
|
||||
} trace_t;
|
||||
|
||||
typedef int cmHandle_t;
|
||||
|
||||
#define CM_CLIP_EPSILON 0.25f // always stay this distance away from any model
|
||||
#define CM_BOX_EPSILON 1.0f // should always be larger than clip epsilon
|
||||
#define CM_MAX_TRACE_DIST 4096.0f // maximum distance a trace model may be traced, point traces are unlimited
|
||||
|
||||
class idCollisionModelManager {
|
||||
public:
|
||||
virtual ~idCollisionModelManager( void ) {}
|
||||
|
||||
// Loads collision models from a map file.
|
||||
virtual void LoadMap( const idMapFile *mapFile ) = 0;
|
||||
// Frees all the collision models.
|
||||
virtual void FreeMap( void ) = 0;
|
||||
|
||||
// Gets the clip handle for a model.
|
||||
virtual cmHandle_t LoadModel( const char *modelName, const bool precache ) = 0;
|
||||
// Sets up a trace model for collision with other trace models.
|
||||
virtual cmHandle_t SetupTrmModel( const idTraceModel &trm, const idMaterial *material ) = 0;
|
||||
// Creates a trace model from a collision model, returns true if succesfull.
|
||||
virtual bool TrmFromModel( const char *modelName, idTraceModel &trm ) = 0;
|
||||
|
||||
// Gets the name of a model.
|
||||
virtual const char * GetModelName( cmHandle_t model ) const = 0;
|
||||
// Gets the bounds of a model.
|
||||
virtual bool GetModelBounds( cmHandle_t model, idBounds &bounds ) const = 0;
|
||||
// Gets all contents flags of brushes and polygons of a model ored together.
|
||||
virtual bool GetModelContents( cmHandle_t model, int &contents ) const = 0;
|
||||
// Gets a vertex of a model.
|
||||
virtual bool GetModelVertex( cmHandle_t model, int vertexNum, idVec3 &vertex ) const = 0;
|
||||
// Gets an edge of a model.
|
||||
virtual bool GetModelEdge( cmHandle_t model, int edgeNum, idVec3 &start, idVec3 &end ) const = 0;
|
||||
// Gets a polygon of a model.
|
||||
virtual bool GetModelPolygon( cmHandle_t model, int polygonNum, idFixedWinding &winding ) const = 0;
|
||||
|
||||
// Translates a trace model and reports the first collision if any.
|
||||
virtual void Translation( trace_t *results, const idVec3 &start, const idVec3 &end,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0;
|
||||
// Rotates a trace model and reports the first collision if any.
|
||||
virtual void Rotation( trace_t *results, const idVec3 &start, const idRotation &rotation,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0;
|
||||
// Returns the contents touched by the trace model or 0 if the trace model is in free space.
|
||||
virtual int Contents( const idVec3 &start,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0;
|
||||
// Stores all contact points of the trace model with the model, returns the number of contacts.
|
||||
virtual int Contacts( contactInfo_t *contacts, const int maxContacts, const idVec3 &start, const idVec6 &dir, const float depth,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0;
|
||||
|
||||
// Tests collision detection.
|
||||
virtual void DebugOutput( const idVec3 &origin ) = 0;
|
||||
// Draws a model.
|
||||
virtual void DrawModel( cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis,
|
||||
const idVec3 &viewOrigin, const float radius, const idVec4 &linecolor ) = 0;
|
||||
// Prints model information, use -1 handle for accumulated model info.
|
||||
virtual void ModelInfo( cmHandle_t model ) = 0;
|
||||
// Lists all loaded models.
|
||||
virtual void ListModels( void ) = 0;
|
||||
// Writes a collision model file for the given map entity.
|
||||
virtual bool WriteCollisionModelForMapEntity( const idMapEntity *mapEnt, const char *filename, const bool testTraceModel = true ) = 0;
|
||||
};
|
||||
|
||||
extern idCollisionModelManager * collisionModelManager;
|
||||
|
||||
#endif /* !__COLLISIONMODELMANAGER_H__ */
|
75
cm/CollisionModel_contacts.cpp
Normal file
75
cm/CollisionModel_contacts.cpp
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace model vs. polygonal model collision detection.
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
#include "../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "CollisionModel_local.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Retrieving contacts
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
==================
|
||||
idCollisionModelManagerLocal::Contacts
|
||||
==================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::Contacts( contactInfo_t *contacts, const int maxContacts, const idVec3 &start, const idVec6 &dir, const float depth,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis ) {
|
||||
trace_t results;
|
||||
idVec3 end;
|
||||
|
||||
// same as Translation but instead of storing the first collision we store all collisions as contacts
|
||||
idCollisionModelManagerLocal::getContacts = true;
|
||||
idCollisionModelManagerLocal::contacts = contacts;
|
||||
idCollisionModelManagerLocal::maxContacts = maxContacts;
|
||||
idCollisionModelManagerLocal::numContacts = 0;
|
||||
end = start + dir.SubVec3(0) * depth;
|
||||
idCollisionModelManagerLocal::Translation( &results, start, end, trm, trmAxis, contentMask, model, origin, modelAxis );
|
||||
if ( dir.SubVec3(1).LengthSqr() != 0.0f ) {
|
||||
// FIXME: rotational contacts
|
||||
}
|
||||
idCollisionModelManagerLocal::getContacts = false;
|
||||
idCollisionModelManagerLocal::maxContacts = 0;
|
||||
|
||||
return idCollisionModelManagerLocal::numContacts;
|
||||
}
|
641
cm/CollisionModel_contents.cpp
Normal file
641
cm/CollisionModel_contents.cpp
Normal file
|
@ -0,0 +1,641 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace model vs. polygonal model collision detection.
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
#include "../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "CollisionModel_local.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Contents test
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::TestTrmVertsInBrush
|
||||
|
||||
returns true if any of the trm vertices is inside the brush
|
||||
================
|
||||
*/
|
||||
bool idCollisionModelManagerLocal::TestTrmVertsInBrush( cm_traceWork_t *tw, cm_brush_t *b ) {
|
||||
int i, j, numVerts, bestPlane;
|
||||
float d, bestd;
|
||||
idVec3 *p;
|
||||
|
||||
if ( b->checkcount == idCollisionModelManagerLocal::checkCount ) {
|
||||
return false;
|
||||
}
|
||||
b->checkcount = idCollisionModelManagerLocal::checkCount;
|
||||
|
||||
if ( !(b->contents & tw->contents) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// if the brush bounds don't intersect the trace bounds
|
||||
if ( !b->bounds.IntersectsBounds( tw->bounds ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( tw->pointTrace ) {
|
||||
numVerts = 1;
|
||||
}
|
||||
else {
|
||||
numVerts = tw->numVerts;
|
||||
}
|
||||
|
||||
for ( j = 0; j < numVerts; j++ ) {
|
||||
p = &tw->vertices[j].p;
|
||||
|
||||
// see if the point is inside the brush
|
||||
bestPlane = 0;
|
||||
bestd = -idMath::INFINITY;
|
||||
for ( i = 0; i < b->numPlanes; i++ ) {
|
||||
d = b->planes[i].Distance( *p );
|
||||
if ( d >= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
if ( d > bestd ) {
|
||||
bestd = d;
|
||||
bestPlane = i;
|
||||
}
|
||||
}
|
||||
if ( i >= b->numPlanes ) {
|
||||
tw->trace.fraction = 0.0f;
|
||||
tw->trace.c.type = CONTACT_TRMVERTEX;
|
||||
tw->trace.c.normal = b->planes[bestPlane].Normal();
|
||||
tw->trace.c.dist = b->planes[bestPlane].Dist();
|
||||
tw->trace.c.contents = b->contents;
|
||||
tw->trace.c.material = b->material;
|
||||
tw->trace.c.point = *p;
|
||||
tw->trace.c.modelFeature = 0;
|
||||
tw->trace.c.trmFeature = j;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CM_SetTrmEdgeSidedness
|
||||
================
|
||||
*/
|
||||
#define CM_SetTrmEdgeSidedness( edge, bpl, epl, bitNum ) { \
|
||||
if ( !(edge->sideSet & (1<<bitNum)) ) { \
|
||||
float fl; \
|
||||
fl = (bpl).PermutedInnerProduct( epl ); \
|
||||
edge->side = (edge->side & ~(1<<bitNum)) | (FLOATSIGNBITSET(fl) << bitNum); \
|
||||
edge->sideSet |= (1 << bitNum); \
|
||||
} \
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
CM_SetTrmPolygonSidedness
|
||||
================
|
||||
*/
|
||||
#define CM_SetTrmPolygonSidedness( v, plane, bitNum ) { \
|
||||
if ( !((v)->sideSet & (1<<bitNum)) ) { \
|
||||
float fl; \
|
||||
fl = plane.Distance( (v)->p ); \
|
||||
/* cannot use float sign bit because it is undetermined when fl == 0.0f */ \
|
||||
if ( fl < 0.0f ) { \
|
||||
(v)->side |= (1 << bitNum); \
|
||||
} \
|
||||
else { \
|
||||
(v)->side &= ~(1 << bitNum); \
|
||||
} \
|
||||
(v)->sideSet |= (1 << bitNum); \
|
||||
} \
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::TestTrmInPolygon
|
||||
|
||||
returns true if the trm intersects the polygon
|
||||
================
|
||||
*/
|
||||
bool idCollisionModelManagerLocal::TestTrmInPolygon( cm_traceWork_t *tw, cm_polygon_t *p ) {
|
||||
int i, j, k, edgeNum, flip, trmEdgeNum, bitNum, bestPlane;
|
||||
int sides[MAX_TRACEMODEL_VERTS];
|
||||
float d, bestd;
|
||||
cm_trmEdge_t *trmEdge;
|
||||
cm_edge_t *edge;
|
||||
cm_vertex_t *v, *v1, *v2;
|
||||
|
||||
// if already checked this polygon
|
||||
if ( p->checkcount == idCollisionModelManagerLocal::checkCount ) {
|
||||
return false;
|
||||
}
|
||||
p->checkcount = idCollisionModelManagerLocal::checkCount;
|
||||
|
||||
// if this polygon does not have the right contents behind it
|
||||
if ( !(p->contents & tw->contents) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// if the polygon bounds don't intersect the trace bounds
|
||||
if ( !p->bounds.IntersectsBounds( tw->bounds ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// bounds should cross polygon plane
|
||||
switch( tw->bounds.PlaneSide( p->plane ) ) {
|
||||
case PLANESIDE_CROSS:
|
||||
break;
|
||||
case PLANESIDE_FRONT:
|
||||
if ( tw->model->isConvex ) {
|
||||
tw->quickExit = true;
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
// if the trace model is convex
|
||||
if ( tw->isConvex ) {
|
||||
// test if any polygon vertices are inside the trm
|
||||
for ( i = 0; i < p->numEdges; i++ ) {
|
||||
edgeNum = p->edges[i];
|
||||
edge = tw->model->edges + abs(edgeNum);
|
||||
// if this edge is already tested
|
||||
if ( edge->checkcount == idCollisionModelManagerLocal::checkCount ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for ( j = 0; j < 2; j++ ) {
|
||||
v = &tw->model->vertices[edge->vertexNum[j]];
|
||||
// if this vertex is already tested
|
||||
if ( v->checkcount == idCollisionModelManagerLocal::checkCount ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bestPlane = 0;
|
||||
bestd = -idMath::INFINITY;
|
||||
for ( k = 0; k < tw->numPolys; k++ ) {
|
||||
d = tw->polys[k].plane.Distance( v->p );
|
||||
if ( d >= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
if ( d > bestd ) {
|
||||
bestd = d;
|
||||
bestPlane = k;
|
||||
}
|
||||
}
|
||||
if ( k >= tw->numPolys ) {
|
||||
tw->trace.fraction = 0.0f;
|
||||
tw->trace.c.type = CONTACT_MODELVERTEX;
|
||||
tw->trace.c.normal = -tw->polys[bestPlane].plane.Normal();
|
||||
tw->trace.c.dist = -tw->polys[bestPlane].plane.Dist();
|
||||
tw->trace.c.contents = p->contents;
|
||||
tw->trace.c.material = p->material;
|
||||
tw->trace.c.point = v->p;
|
||||
tw->trace.c.modelFeature = edge->vertexNum[j];
|
||||
tw->trace.c.trmFeature = 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( i = 0; i < p->numEdges; i++ ) {
|
||||
edgeNum = p->edges[i];
|
||||
edge = tw->model->edges + abs(edgeNum);
|
||||
// reset sidedness cache if this is the first time we encounter this edge
|
||||
if ( edge->checkcount != idCollisionModelManagerLocal::checkCount ) {
|
||||
edge->sideSet = 0;
|
||||
}
|
||||
// pluecker coordinate for edge
|
||||
tw->polygonEdgePlueckerCache[i].FromLine( tw->model->vertices[edge->vertexNum[0]].p,
|
||||
tw->model->vertices[edge->vertexNum[1]].p );
|
||||
v = &tw->model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]];
|
||||
// reset sidedness cache if this is the first time we encounter this vertex
|
||||
if ( v->checkcount != idCollisionModelManagerLocal::checkCount ) {
|
||||
v->sideSet = 0;
|
||||
}
|
||||
v->checkcount = idCollisionModelManagerLocal::checkCount;
|
||||
}
|
||||
|
||||
// get side of polygon for each trm vertex
|
||||
for ( i = 0; i < tw->numVerts; i++ ) {
|
||||
d = p->plane.Distance( tw->vertices[i].p );
|
||||
sides[i] = d < 0.0f ? -1 : 1;
|
||||
}
|
||||
|
||||
// test if any trm edges go through the polygon
|
||||
for ( i = 1; i <= tw->numEdges; i++ ) {
|
||||
// if the trm edge does not cross the polygon plane
|
||||
if ( sides[tw->edges[i].vertexNum[0]] == sides[tw->edges[i].vertexNum[1]] ) {
|
||||
continue;
|
||||
}
|
||||
// check from which side to which side the trm edge goes
|
||||
flip = INTSIGNBITSET( sides[tw->edges[i].vertexNum[0]] );
|
||||
// test if trm edge goes through the polygon between the polygon edges
|
||||
for ( j = 0; j < p->numEdges; j++ ) {
|
||||
edgeNum = p->edges[j];
|
||||
edge = tw->model->edges + abs(edgeNum);
|
||||
#if 1
|
||||
CM_SetTrmEdgeSidedness( edge, tw->edges[i].pl, tw->polygonEdgePlueckerCache[j], i );
|
||||
if ( INTSIGNBITSET(edgeNum) ^ ((edge->side >> i) & 1) ^ flip ) {
|
||||
break;
|
||||
}
|
||||
#else
|
||||
d = tw->edges[i].pl.PermutedInnerProduct( tw->polygonEdgePlueckerCache[j] );
|
||||
if ( flip ) {
|
||||
d = -d;
|
||||
}
|
||||
if ( edgeNum > 0 ) {
|
||||
if ( d <= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( d >= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if ( j >= p->numEdges ) {
|
||||
tw->trace.fraction = 0.0f;
|
||||
tw->trace.c.type = CONTACT_EDGE;
|
||||
tw->trace.c.normal = p->plane.Normal();
|
||||
tw->trace.c.dist = p->plane.Dist();
|
||||
tw->trace.c.contents = p->contents;
|
||||
tw->trace.c.material = p->material;
|
||||
tw->trace.c.point = tw->vertices[tw->edges[i].vertexNum[ !flip ]].p;
|
||||
tw->trace.c.modelFeature = *reinterpret_cast<int *>(&p);
|
||||
tw->trace.c.trmFeature = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// test if any polygon edges go through the trm polygons
|
||||
for ( i = 0; i < p->numEdges; i++ ) {
|
||||
edgeNum = p->edges[i];
|
||||
edge = tw->model->edges + abs(edgeNum);
|
||||
if ( edge->checkcount == idCollisionModelManagerLocal::checkCount ) {
|
||||
continue;
|
||||
}
|
||||
edge->checkcount = idCollisionModelManagerLocal::checkCount;
|
||||
|
||||
for ( j = 0; j < tw->numPolys; j++ ) {
|
||||
#if 1
|
||||
v1 = tw->model->vertices + edge->vertexNum[0];
|
||||
CM_SetTrmPolygonSidedness( v1, tw->polys[j].plane, j );
|
||||
v2 = tw->model->vertices + edge->vertexNum[1];
|
||||
CM_SetTrmPolygonSidedness( v2, tw->polys[j].plane, j );
|
||||
// if the polygon edge does not cross the trm polygon plane
|
||||
if ( !(((v1->side ^ v2->side) >> j) & 1) ) {
|
||||
continue;
|
||||
}
|
||||
flip = (v1->side >> j) & 1;
|
||||
#else
|
||||
float d1, d2;
|
||||
|
||||
v1 = tw->model->vertices + edge->vertexNum[0];
|
||||
d1 = tw->polys[j].plane.Distance( v1->p );
|
||||
v2 = tw->model->vertices + edge->vertexNum[1];
|
||||
d2 = tw->polys[j].plane.Distance( v2->p );
|
||||
// if the polygon edge does not cross the trm polygon plane
|
||||
if ( (d1 >= 0.0f && d2 >= 0.0f) || (d1 <= 0.0f && d2 <= 0.0f) ) {
|
||||
continue;
|
||||
}
|
||||
flip = false;
|
||||
if ( d1 < 0.0f ) {
|
||||
flip = true;
|
||||
}
|
||||
#endif
|
||||
// test if polygon edge goes through the trm polygon between the trm polygon edges
|
||||
for ( k = 0; k < tw->polys[j].numEdges; k++ ) {
|
||||
trmEdgeNum = tw->polys[j].edges[k];
|
||||
trmEdge = tw->edges + abs(trmEdgeNum);
|
||||
#if 1
|
||||
bitNum = abs(trmEdgeNum);
|
||||
CM_SetTrmEdgeSidedness( edge, trmEdge->pl, tw->polygonEdgePlueckerCache[i], bitNum );
|
||||
if ( INTSIGNBITSET(trmEdgeNum) ^ ((edge->side >> bitNum) & 1) ^ flip ) {
|
||||
break;
|
||||
}
|
||||
#else
|
||||
d = trmEdge->pl.PermutedInnerProduct( tw->polygonEdgePlueckerCache[i] );
|
||||
if ( flip ) {
|
||||
d = -d;
|
||||
}
|
||||
if ( trmEdgeNum > 0 ) {
|
||||
if ( d <= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( d >= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if ( k >= tw->polys[j].numEdges ) {
|
||||
tw->trace.fraction = 0.0f;
|
||||
tw->trace.c.type = CONTACT_EDGE;
|
||||
tw->trace.c.normal = -tw->polys[j].plane.Normal();
|
||||
tw->trace.c.dist = -tw->polys[j].plane.Dist();
|
||||
tw->trace.c.contents = p->contents;
|
||||
tw->trace.c.material = p->material;
|
||||
tw->trace.c.point = tw->model->vertices[edge->vertexNum[ !flip ]].p;
|
||||
tw->trace.c.modelFeature = edgeNum;
|
||||
tw->trace.c.trmFeature = j;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::PointNode
|
||||
================
|
||||
*/
|
||||
cm_node_t *idCollisionModelManagerLocal::PointNode( const idVec3 &p, cm_model_t *model ) {
|
||||
cm_node_t *node;
|
||||
|
||||
node = model->node;
|
||||
while ( node->planeType != -1 ) {
|
||||
if (p[node->planeType] > node->planeDist) {
|
||||
node = node->children[0];
|
||||
}
|
||||
else {
|
||||
node = node->children[1];
|
||||
}
|
||||
|
||||
assert( node != NULL );
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::PointContents
|
||||
================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::PointContents( const idVec3 p, cmHandle_t model ) {
|
||||
int i;
|
||||
float d;
|
||||
cm_node_t *node;
|
||||
cm_brushRef_t *bref;
|
||||
cm_brush_t *b;
|
||||
idPlane *plane;
|
||||
|
||||
node = idCollisionModelManagerLocal::PointNode( p, idCollisionModelManagerLocal::models[model] );
|
||||
for ( bref = node->brushes; bref; bref = bref->next ) {
|
||||
b = bref->b;
|
||||
// test if the point is within the brush bounds
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
if ( p[i] < b->bounds[0][i] ) {
|
||||
break;
|
||||
}
|
||||
if ( p[i] > b->bounds[1][i] ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( i < 3 ) {
|
||||
continue;
|
||||
}
|
||||
// test if the point is inside the brush
|
||||
plane = b->planes;
|
||||
for ( i = 0; i < b->numPlanes; i++, plane++ ) {
|
||||
d = plane->Distance( p );
|
||||
if ( d >= 0 ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( i >= b->numPlanes ) {
|
||||
return b->contents;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
idCollisionModelManagerLocal::TransformedPointContents
|
||||
==================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::TransformedPointContents( const idVec3 &p, cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis ) {
|
||||
idVec3 p_l;
|
||||
|
||||
// subtract origin offset
|
||||
p_l = p - origin;
|
||||
if ( modelAxis.IsRotated() ) {
|
||||
p_l *= modelAxis;
|
||||
}
|
||||
return idCollisionModelManagerLocal::PointContents( p_l, model );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
==================
|
||||
idCollisionModelManagerLocal::ContentsTrm
|
||||
==================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::ContentsTrm( trace_t *results, const idVec3 &start,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) {
|
||||
int i;
|
||||
bool model_rotated, trm_rotated;
|
||||
idMat3 invModelAxis, tmpAxis;
|
||||
idVec3 dir;
|
||||
ALIGN16( cm_traceWork_t tw );
|
||||
|
||||
// fast point case
|
||||
if ( !trm || ( trm->bounds[1][0] - trm->bounds[0][0] <= 0.0f &&
|
||||
trm->bounds[1][1] - trm->bounds[0][1] <= 0.0f &&
|
||||
trm->bounds[1][2] - trm->bounds[0][2] <= 0.0f ) ) {
|
||||
|
||||
results->c.contents = idCollisionModelManagerLocal::TransformedPointContents( start, model, modelOrigin, modelAxis );
|
||||
results->fraction = ( results->c.contents == 0 );
|
||||
results->endpos = start;
|
||||
results->endAxis = trmAxis;
|
||||
|
||||
return results->c.contents;
|
||||
}
|
||||
|
||||
idCollisionModelManagerLocal::checkCount++;
|
||||
|
||||
tw.trace.fraction = 1.0f;
|
||||
tw.trace.c.contents = 0;
|
||||
tw.trace.c.type = CONTACT_NONE;
|
||||
tw.contents = contentMask;
|
||||
tw.isConvex = true;
|
||||
tw.rotation = false;
|
||||
tw.positionTest = true;
|
||||
tw.pointTrace = false;
|
||||
tw.quickExit = false;
|
||||
tw.numContacts = 0;
|
||||
tw.model = idCollisionModelManagerLocal::models[model];
|
||||
tw.start = start - modelOrigin;
|
||||
tw.end = tw.start;
|
||||
|
||||
model_rotated = modelAxis.IsRotated();
|
||||
if ( model_rotated ) {
|
||||
invModelAxis = modelAxis.Transpose();
|
||||
}
|
||||
|
||||
// setup trm structure
|
||||
idCollisionModelManagerLocal::SetupTrm( &tw, trm );
|
||||
|
||||
trm_rotated = trmAxis.IsRotated();
|
||||
|
||||
// calculate vertex positions
|
||||
if ( trm_rotated ) {
|
||||
for ( i = 0; i < tw.numVerts; i++ ) {
|
||||
// rotate trm around the start position
|
||||
tw.vertices[i].p *= trmAxis;
|
||||
}
|
||||
}
|
||||
for ( i = 0; i < tw.numVerts; i++ ) {
|
||||
// set trm at start position
|
||||
tw.vertices[i].p += tw.start;
|
||||
}
|
||||
if ( model_rotated ) {
|
||||
for ( i = 0; i < tw.numVerts; i++ ) {
|
||||
// rotate trm around model instead of rotating the model
|
||||
tw.vertices[i].p *= invModelAxis;
|
||||
}
|
||||
}
|
||||
|
||||
// add offset to start point
|
||||
if ( trm_rotated ) {
|
||||
dir = trm->offset * trmAxis;
|
||||
tw.start += dir;
|
||||
tw.end += dir;
|
||||
} else {
|
||||
tw.start += trm->offset;
|
||||
tw.end += trm->offset;
|
||||
}
|
||||
if ( model_rotated ) {
|
||||
// rotate trace instead of model
|
||||
tw.start *= invModelAxis;
|
||||
tw.end *= invModelAxis;
|
||||
}
|
||||
|
||||
|
||||
// setup trm vertices
|
||||
tw.size.Clear();
|
||||
for ( i = 0; i < tw.numVerts; i++ ) {
|
||||
// get axial trm size after rotations
|
||||
tw.size.AddPoint( tw.vertices[i].p - tw.start );
|
||||
}
|
||||
|
||||
// setup trm edges
|
||||
for ( i = 1; i <= tw.numEdges; i++ ) {
|
||||
// edge start, end and pluecker coordinate
|
||||
tw.edges[i].start = tw.vertices[tw.edges[i].vertexNum[0]].p;
|
||||
tw.edges[i].end = tw.vertices[tw.edges[i].vertexNum[1]].p;
|
||||
tw.edges[i].pl.FromLine( tw.edges[i].start, tw.edges[i].end );
|
||||
}
|
||||
|
||||
// setup trm polygons
|
||||
if ( trm_rotated & model_rotated ) {
|
||||
tmpAxis = trmAxis * invModelAxis;
|
||||
for ( i = 0; i < tw.numPolys; i++ ) {
|
||||
tw.polys[i].plane *= tmpAxis;
|
||||
}
|
||||
} else if ( trm_rotated ) {
|
||||
for ( i = 0; i < tw.numPolys; i++ ) {
|
||||
tw.polys[i].plane *= trmAxis;
|
||||
}
|
||||
} else if ( model_rotated ) {
|
||||
for ( i = 0; i < tw.numPolys; i++ ) {
|
||||
tw.polys[i].plane *= invModelAxis;
|
||||
}
|
||||
}
|
||||
for ( i = 0; i < tw.numPolys; i++ ) {
|
||||
tw.polys[i].plane.FitThroughPoint( tw.edges[abs(tw.polys[i].edges[0])].start );
|
||||
}
|
||||
|
||||
// bounds for full trace, a little bit larger for epsilons
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
if ( tw.start[i] < tw.end[i] ) {
|
||||
tw.bounds[0][i] = tw.start[i] + tw.size[0][i] - CM_BOX_EPSILON;
|
||||
tw.bounds[1][i] = tw.end[i] + tw.size[1][i] + CM_BOX_EPSILON;
|
||||
} else {
|
||||
tw.bounds[0][i] = tw.end[i] + tw.size[0][i] - CM_BOX_EPSILON;
|
||||
tw.bounds[1][i] = tw.start[i] + tw.size[1][i] + CM_BOX_EPSILON;
|
||||
}
|
||||
if ( idMath::Fabs(tw.size[0][i]) > idMath::Fabs(tw.size[1][i]) ) {
|
||||
tw.extents[i] = idMath::Fabs( tw.size[0][i] ) + CM_BOX_EPSILON;
|
||||
} else {
|
||||
tw.extents[i] = idMath::Fabs( tw.size[1][i] ) + CM_BOX_EPSILON;
|
||||
}
|
||||
}
|
||||
|
||||
// trace through the model
|
||||
idCollisionModelManagerLocal::TraceThroughModel( &tw );
|
||||
|
||||
*results = tw.trace;
|
||||
results->fraction = ( results->c.contents == 0 );
|
||||
results->endpos = start;
|
||||
results->endAxis = trmAxis;
|
||||
|
||||
return results->c.contents;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
idCollisionModelManagerLocal::Contents
|
||||
==================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::Contents( const idVec3 &start,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) {
|
||||
trace_t results;
|
||||
|
||||
if ( model < 0 || model > idCollisionModelManagerLocal::maxModels || model > MAX_SUBMODELS ) {
|
||||
common->Printf("idCollisionModelManagerLocal::Contents: invalid model handle\n");
|
||||
return 0;
|
||||
}
|
||||
if ( !idCollisionModelManagerLocal::models || !idCollisionModelManagerLocal::models[model] ) {
|
||||
common->Printf("idCollisionModelManagerLocal::Contents: invalid model\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
return ContentsTrm( &results, start, trm, trmAxis, contentMask, model, modelOrigin, modelAxis );
|
||||
}
|
491
cm/CollisionModel_debug.cpp
Normal file
491
cm/CollisionModel_debug.cpp
Normal file
|
@ -0,0 +1,491 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace model vs. polygonal model collision detection.
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
#include "../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "CollisionModel_local.h"
|
||||
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Visualisation code
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
const char *cm_contentsNameByIndex[] = {
|
||||
"none", // 0
|
||||
"solid", // 1
|
||||
"opaque", // 2
|
||||
"water", // 3
|
||||
"playerclip", // 4
|
||||
"monsterclip", // 5
|
||||
"moveableclip", // 6
|
||||
"ikclip", // 7
|
||||
"blood", // 8
|
||||
"body", // 9
|
||||
"corpse", // 10
|
||||
"trigger", // 11
|
||||
"aas_solid", // 12
|
||||
"aas_obstacle", // 13
|
||||
"flashlight_trigger", // 14
|
||||
NULL
|
||||
};
|
||||
|
||||
int cm_contentsFlagByIndex[] = {
|
||||
-1, // 0
|
||||
CONTENTS_SOLID, // 1
|
||||
CONTENTS_OPAQUE, // 2
|
||||
CONTENTS_WATER, // 3
|
||||
CONTENTS_PLAYERCLIP, // 4
|
||||
CONTENTS_MONSTERCLIP, // 5
|
||||
CONTENTS_MOVEABLECLIP, // 6
|
||||
CONTENTS_IKCLIP, // 7
|
||||
CONTENTS_BLOOD, // 8
|
||||
CONTENTS_BODY, // 9
|
||||
CONTENTS_CORPSE, // 10
|
||||
CONTENTS_TRIGGER, // 11
|
||||
CONTENTS_AAS_SOLID, // 12
|
||||
CONTENTS_AAS_OBSTACLE, // 13
|
||||
CONTENTS_FLASHLIGHT_TRIGGER, // 14
|
||||
0
|
||||
};
|
||||
|
||||
idCVar cm_drawMask( "cm_drawMask", "none", CVAR_GAME, "collision mask", cm_contentsNameByIndex, idCmdSystem::ArgCompletion_String<cm_contentsNameByIndex> );
|
||||
idCVar cm_drawColor( "cm_drawColor", "0 1 0 1", CVAR_GAME, "color used to draw the collision models" );
|
||||
idCVar cm_drawFilled( "cm_drawFilled", "0", CVAR_GAME | CVAR_BOOL, "draw filled polygons" );
|
||||
idCVar cm_drawInternal( "cm_drawInternal", "1", CVAR_GAME | CVAR_BOOL, "draw internal edges green" );
|
||||
idCVar cm_drawNormals( "cm_drawNormals", "0", CVAR_GAME | CVAR_BOOL, "draw polygon and edge normals" );
|
||||
idCVar cm_backFaceCull( "cm_backFaceCull", "0", CVAR_GAME | CVAR_BOOL, "cull back facing polygons" );
|
||||
idCVar cm_debugCollision( "cm_debugCollision", "0", CVAR_GAME | CVAR_BOOL, "debug the collision detection" );
|
||||
|
||||
static idVec4 cm_color;
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::ContentsFromString
|
||||
================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::ContentsFromString( const char *string ) const {
|
||||
int i, contents = 0;
|
||||
idLexer src( string, idStr::Length( string ), "ContentsFromString" );
|
||||
idToken token;
|
||||
|
||||
while( src.ReadToken( &token ) ) {
|
||||
if ( token == "," ) {
|
||||
continue;
|
||||
}
|
||||
for ( i = 1; cm_contentsNameByIndex[i] != NULL; i++ ) {
|
||||
if ( token.Icmp( cm_contentsNameByIndex[i] ) == 0 ) {
|
||||
contents |= cm_contentsFlagByIndex[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return contents;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::StringFromContents
|
||||
================
|
||||
*/
|
||||
const char *idCollisionModelManagerLocal::StringFromContents( const int contents ) const {
|
||||
int i, length = 0;
|
||||
static char contentsString[MAX_STRING_CHARS];
|
||||
|
||||
contentsString[0] = '\0';
|
||||
|
||||
for ( i = 1; cm_contentsFlagByIndex[i] != 0; i++ ) {
|
||||
if ( contents & cm_contentsFlagByIndex[i] ) {
|
||||
if ( length != 0 ) {
|
||||
length += idStr::snPrintf( contentsString + length, sizeof( contentsString ) - length, "," );
|
||||
}
|
||||
length += idStr::snPrintf( contentsString + length, sizeof( contentsString ) - length, cm_contentsNameByIndex[i] );
|
||||
}
|
||||
}
|
||||
|
||||
return contentsString;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::DrawEdge
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::DrawEdge( cm_model_t *model, int edgeNum, const idVec3 &origin, const idMat3 &axis, const idVec4 &linecolor ) {
|
||||
int side;
|
||||
cm_edge_t *edge;
|
||||
idVec3 start, end, mid;
|
||||
bool isRotated;
|
||||
|
||||
isRotated = axis.IsRotated();
|
||||
|
||||
edge = model->edges + abs(edgeNum);
|
||||
side = edgeNum < 0;
|
||||
|
||||
start = model->vertices[edge->vertexNum[side]].p;
|
||||
end = model->vertices[edge->vertexNum[!side]].p;
|
||||
if ( isRotated ) {
|
||||
start *= axis;
|
||||
end *= axis;
|
||||
}
|
||||
start += origin;
|
||||
end += origin;
|
||||
|
||||
if ( edge->internal ) {
|
||||
if ( cm_drawInternal.GetBool() ) {
|
||||
//session->rw->DebugArrow( colorGreen, start, end, 1 );
|
||||
session->rw->DebugLine( colorGreen, start, end, 1 );
|
||||
}
|
||||
} else {
|
||||
if ( edge->numUsers > 2 ) {
|
||||
//session->rw->DebugArrow( colorBlue, start, end, 1 );
|
||||
session->rw->DebugLine( colorBlue, start, end, 1 );
|
||||
} else {
|
||||
session->rw->DebugLine( linecolor, start, end, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
if ( cm_drawNormals.GetBool() ) {
|
||||
mid = (start + end) * 0.5f;
|
||||
if ( isRotated ) {
|
||||
end = mid + 5 * (axis * edge->normal);
|
||||
} else {
|
||||
end = mid + 5 * edge->normal;
|
||||
}
|
||||
//session->rw->DebugArrow( colorCyan, mid, end, 1 );
|
||||
session->rw->DebugLine( colorCyan, mid, end, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::DrawPolygon
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::DrawPolygon( cm_model_t *model, cm_polygon_t *p, const idVec3 &origin, const idMat3 &axis, const idVec3 &viewOrigin, const idVec4 &linecolor ) {
|
||||
int i, edgeNum;
|
||||
cm_edge_t *edge;
|
||||
idVec3 center, end, dir;
|
||||
|
||||
if ( cm_backFaceCull.GetBool() ) {
|
||||
edgeNum = p->edges[0];
|
||||
edge = model->edges + abs(edgeNum);
|
||||
dir = model->vertices[edge->vertexNum[0]].p - viewOrigin;
|
||||
if ( dir * p->plane.Normal() > 0.0f ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( cm_drawNormals.GetBool() ) {
|
||||
center = vec3_origin;
|
||||
for ( i = 0; i < p->numEdges; i++ ) {
|
||||
edgeNum = p->edges[i];
|
||||
edge = model->edges + abs(edgeNum);
|
||||
center += model->vertices[edge->vertexNum[edgeNum < 0]].p;
|
||||
}
|
||||
center *= (1.0f / p->numEdges);
|
||||
if ( axis.IsRotated() ) {
|
||||
center = center * axis + origin;
|
||||
end = center + 5 * (axis * p->plane.Normal());
|
||||
} else {
|
||||
center += origin;
|
||||
end = center + 5 * p->plane.Normal();
|
||||
}
|
||||
session->rw->DebugArrow( colorMagenta, center, end, 1 );
|
||||
}
|
||||
|
||||
if ( cm_drawFilled.GetBool() ) {
|
||||
idFixedWinding winding;
|
||||
for ( i = p->numEdges - 1; i >= 0; i-- ) {
|
||||
edgeNum = p->edges[i];
|
||||
edge = model->edges + abs(edgeNum);
|
||||
winding += origin + model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p * axis;
|
||||
}
|
||||
session->rw->DebugPolygon( cm_color, winding );
|
||||
} else {
|
||||
for ( i = 0; i < p->numEdges; i++ ) {
|
||||
edgeNum = p->edges[i];
|
||||
edge = model->edges + abs(edgeNum);
|
||||
if ( edge->checkcount == checkCount ) {
|
||||
continue;
|
||||
}
|
||||
edge->checkcount = checkCount;
|
||||
DrawEdge( model, edgeNum, origin, axis, linecolor );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::DrawNodePolygons
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::DrawNodePolygons( cm_model_t *model, cm_node_t *node,
|
||||
const idVec3 &origin, const idMat3 &axis,
|
||||
const idVec3 &viewOrigin, const float radius, const idVec4 &linecolor ) {
|
||||
int i;
|
||||
cm_polygon_t *p;
|
||||
cm_polygonRef_t *pref;
|
||||
|
||||
while (1) {
|
||||
for ( pref = node->polygons; pref; pref = pref->next ) {
|
||||
p = pref->p;
|
||||
if ( radius ) {
|
||||
// polygon bounds should overlap with trace bounds
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
if ( p->bounds[0][i] > viewOrigin[i] + radius ) {
|
||||
break;
|
||||
}
|
||||
if ( p->bounds[1][i] < viewOrigin[i] - radius ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ( i < 3 ) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ( p->checkcount == checkCount ) {
|
||||
continue;
|
||||
}
|
||||
if ( !( p->contents & cm_contentsFlagByIndex[cm_drawMask.GetInteger()] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
DrawPolygon( model, p, origin, axis, viewOrigin, linecolor );
|
||||
p->checkcount = checkCount;
|
||||
}
|
||||
if ( node->planeType == -1 ) {
|
||||
break;
|
||||
}
|
||||
if ( radius && viewOrigin[node->planeType] > node->planeDist + radius ) {
|
||||
node = node->children[0];
|
||||
} else if ( radius && viewOrigin[node->planeType] < node->planeDist - radius ) {
|
||||
node = node->children[1];
|
||||
} else {
|
||||
DrawNodePolygons( model, node->children[1], origin, axis, viewOrigin, radius, linecolor );
|
||||
node = node->children[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::DrawModel
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::DrawModel( cmHandle_t handle, const idVec3 &modelOrigin, const idMat3 &modelAxis,
|
||||
const idVec3 &viewOrigin, const float radius, const idVec4 &linecolor ) {
|
||||
|
||||
cm_model_t *model;
|
||||
idVec3 viewPos;
|
||||
|
||||
if ( handle < 0 && handle >= numModels ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cm_drawColor.IsModified() ) {
|
||||
sscanf( cm_drawColor.GetString(), "%f %f %f %f", &cm_color.x, &cm_color.y, &cm_color.z, &cm_color.w );
|
||||
cm_drawColor.ClearModified();
|
||||
}
|
||||
|
||||
model = models[ handle ];
|
||||
viewPos = (viewOrigin - modelOrigin) * modelAxis.Transpose();
|
||||
checkCount++;
|
||||
DrawNodePolygons( model, model->node, modelOrigin, modelAxis, viewPos, radius, linecolor );
|
||||
}
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Speed test code
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
static idCVar cm_testCollision( "cm_testCollision", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
static idCVar cm_testRotation( "cm_testRotation", "1", CVAR_GAME | CVAR_BOOL, "" );
|
||||
static idCVar cm_testModel( "cm_testModel", "0", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
static idCVar cm_testTimes( "cm_testTimes", "1000", CVAR_GAME | CVAR_INTEGER, "" );
|
||||
static idCVar cm_testRandomMany( "cm_testRandomMany", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
static idCVar cm_testOrigin( "cm_testOrigin", "0 0 0", CVAR_GAME, "" );
|
||||
static idCVar cm_testReset( "cm_testReset", "0", CVAR_GAME | CVAR_BOOL, "" );
|
||||
static idCVar cm_testBox( "cm_testBox", "-16 -16 0 16 16 64", CVAR_GAME, "" );
|
||||
static idCVar cm_testBoxRotation( "cm_testBoxRotation", "0 0 0", CVAR_GAME, "" );
|
||||
static idCVar cm_testWalk( "cm_testWalk", "1", CVAR_GAME | CVAR_BOOL, "" );
|
||||
static idCVar cm_testLength( "cm_testLength", "1024", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
static idCVar cm_testRadius( "cm_testRadius", "64", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
static idCVar cm_testAngle( "cm_testAngle", "60", CVAR_GAME | CVAR_FLOAT, "" );
|
||||
|
||||
static int total_translation;
|
||||
static int min_translation = 999999;
|
||||
static int max_translation = -999999;
|
||||
static int num_translation = 0;
|
||||
static int total_rotation;
|
||||
static int min_rotation = 999999;
|
||||
static int max_rotation = -999999;
|
||||
static int num_rotation = 0;
|
||||
static idVec3 start;
|
||||
static idVec3 *testend;
|
||||
|
||||
#include "../sys/sys_public.h"
|
||||
|
||||
void idCollisionModelManagerLocal::DebugOutput( const idVec3 &origin ) {
|
||||
int i, k, t;
|
||||
char buf[128];
|
||||
idVec3 end;
|
||||
idAngles boxAngles;
|
||||
idMat3 modelAxis, boxAxis;
|
||||
idBounds bounds;
|
||||
trace_t trace;
|
||||
|
||||
if ( !cm_testCollision.GetBool() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
testend = (idVec3 *) Mem_Alloc( cm_testTimes.GetInteger() * sizeof(idVec3) );
|
||||
|
||||
if ( cm_testReset.GetBool() || ( cm_testWalk.GetBool() && !start.Compare( start ) ) ) {
|
||||
total_translation = total_rotation = 0;
|
||||
min_translation = min_rotation = 999999;
|
||||
max_translation = max_rotation = -999999;
|
||||
num_translation = num_rotation = 0;
|
||||
cm_testReset.SetBool( false );
|
||||
}
|
||||
|
||||
if ( cm_testWalk.GetBool() ) {
|
||||
start = origin;
|
||||
cm_testOrigin.SetString( va( "%1.2f %1.2f %1.2f", start[0], start[1], start[2] ) );
|
||||
} else {
|
||||
sscanf( cm_testOrigin.GetString(), "%f %f %f", &start[0], &start[1], &start[2] );
|
||||
}
|
||||
|
||||
sscanf( cm_testBox.GetString(), "%f %f %f %f %f %f", &bounds[0][0], &bounds[0][1], &bounds[0][2],
|
||||
&bounds[1][0], &bounds[1][1], &bounds[1][2] );
|
||||
sscanf( cm_testBoxRotation.GetString(), "%f %f %f", &boxAngles[0], &boxAngles[1], &boxAngles[2] );
|
||||
boxAxis = boxAngles.ToMat3();
|
||||
modelAxis.Identity();
|
||||
|
||||
idTraceModel itm( bounds );
|
||||
idRandom random( 0 );
|
||||
idTimer timer;
|
||||
|
||||
if ( cm_testRandomMany.GetBool() ) {
|
||||
// if many traces in one random direction
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
testend[0][i] = start[i] + random.CRandomFloat() * cm_testLength.GetFloat();
|
||||
}
|
||||
for ( k = 1; k < cm_testTimes.GetInteger(); k++ ) {
|
||||
testend[k] = testend[0];
|
||||
}
|
||||
} else {
|
||||
// many traces each in a different random direction
|
||||
for ( k = 0; k < cm_testTimes.GetInteger(); k++ ) {
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
testend[k][i] = start[i] + random.CRandomFloat() * cm_testLength.GetFloat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// translational collision detection
|
||||
timer.Clear();
|
||||
timer.Start();
|
||||
for ( i = 0; i < cm_testTimes.GetInteger(); i++ ) {
|
||||
Translation( &trace, start, testend[i], &itm, boxAxis, CONTENTS_SOLID|CONTENTS_PLAYERCLIP, cm_testModel.GetInteger(), vec3_origin, modelAxis );
|
||||
}
|
||||
timer.Stop();
|
||||
t = timer.Milliseconds();
|
||||
if ( t < min_translation ) min_translation = t;
|
||||
if ( t > max_translation ) max_translation = t;
|
||||
num_translation++;
|
||||
total_translation += t;
|
||||
if ( cm_testTimes.GetInteger() > 9999 ) {
|
||||
sprintf( buf, "%3dK", (int ) ( cm_testTimes.GetInteger() / 1000 ) );
|
||||
} else {
|
||||
sprintf( buf, "%4d", cm_testTimes.GetInteger() );
|
||||
}
|
||||
common->Printf("%s translations: %4d milliseconds, (min = %d, max = %d, av = %1.1f)\n", buf, t, min_translation, max_translation, (float) total_translation / num_translation );
|
||||
|
||||
if ( cm_testRandomMany.GetBool() ) {
|
||||
// if many traces in one random direction
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
testend[0][i] = start[i] + random.CRandomFloat() * cm_testRadius.GetFloat();
|
||||
}
|
||||
for ( k = 1; k < cm_testTimes.GetInteger(); k++ ) {
|
||||
testend[k] = testend[0];
|
||||
}
|
||||
} else {
|
||||
// many traces each in a different random direction
|
||||
for ( k = 0; k < cm_testTimes.GetInteger(); k++ ) {
|
||||
for ( i = 0; i < 3; i++ ) {
|
||||
testend[k][i] = start[i] + random.CRandomFloat() * cm_testRadius.GetFloat();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( cm_testRotation.GetBool() ) {
|
||||
// rotational collision detection
|
||||
idVec3 vec( random.CRandomFloat(), random.CRandomFloat(), random.RandomFloat() );
|
||||
vec.Normalize();
|
||||
idRotation rotation( vec3_origin, vec, cm_testAngle.GetFloat() );
|
||||
|
||||
timer.Clear();
|
||||
timer.Start();
|
||||
for ( i = 0; i < cm_testTimes.GetInteger(); i++ ) {
|
||||
rotation.SetOrigin( testend[i] );
|
||||
Rotation( &trace, start, rotation, &itm, boxAxis, CONTENTS_SOLID|CONTENTS_PLAYERCLIP, cm_testModel.GetInteger(), vec3_origin, modelAxis );
|
||||
}
|
||||
timer.Stop();
|
||||
t = timer.Milliseconds();
|
||||
if ( t < min_rotation ) min_rotation = t;
|
||||
if ( t > max_rotation ) max_rotation = t;
|
||||
num_rotation++;
|
||||
total_rotation += t;
|
||||
if ( cm_testTimes.GetInteger() > 9999 ) {
|
||||
sprintf( buf, "%3dK", (int ) ( cm_testTimes.GetInteger() / 1000 ) );
|
||||
} else {
|
||||
sprintf( buf, "%4d", cm_testTimes.GetInteger() );
|
||||
}
|
||||
common->Printf("%s rotation: %4d milliseconds, (min = %d, max = %d, av = %1.1f)\n", buf, t, min_rotation, max_rotation, (float) total_rotation / num_rotation );
|
||||
}
|
||||
|
||||
Mem_Free( testend );
|
||||
testend = NULL;
|
||||
}
|
616
cm/CollisionModel_files.cpp
Normal file
616
cm/CollisionModel_files.cpp
Normal file
|
@ -0,0 +1,616 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace model vs. polygonal model collision detection.
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
#include "../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "CollisionModel_local.h"
|
||||
|
||||
#define CM_FILE_EXT "cm"
|
||||
#define CM_FILEID "CM"
|
||||
#define CM_FILEVERSION "1.00"
|
||||
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Writing of collision model file
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
void CM_GetNodeBounds( idBounds *bounds, cm_node_t *node );
|
||||
int CM_GetNodeContents( cm_node_t *node );
|
||||
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::WriteNodes
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::WriteNodes( idFile *fp, cm_node_t *node ) {
|
||||
fp->WriteFloatString( "\t( %d %f )\n", node->planeType, node->planeDist );
|
||||
if ( node->planeType != -1 ) {
|
||||
WriteNodes( fp, node->children[0] );
|
||||
WriteNodes( fp, node->children[1] );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::CountPolygonMemory
|
||||
================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::CountPolygonMemory( cm_node_t *node ) const {
|
||||
cm_polygonRef_t *pref;
|
||||
cm_polygon_t *p;
|
||||
int memory;
|
||||
|
||||
memory = 0;
|
||||
for ( pref = node->polygons; pref; pref = pref->next ) {
|
||||
p = pref->p;
|
||||
if ( p->checkcount == checkCount ) {
|
||||
continue;
|
||||
}
|
||||
p->checkcount = checkCount;
|
||||
|
||||
memory += sizeof( cm_polygon_t ) + ( p->numEdges - 1 ) * sizeof( p->edges[0] );
|
||||
}
|
||||
if ( node->planeType != -1 ) {
|
||||
memory += CountPolygonMemory( node->children[0] );
|
||||
memory += CountPolygonMemory( node->children[1] );
|
||||
}
|
||||
return memory;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::WritePolygons
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::WritePolygons( idFile *fp, cm_node_t *node ) {
|
||||
cm_polygonRef_t *pref;
|
||||
cm_polygon_t *p;
|
||||
int i;
|
||||
|
||||
for ( pref = node->polygons; pref; pref = pref->next ) {
|
||||
p = pref->p;
|
||||
if ( p->checkcount == checkCount ) {
|
||||
continue;
|
||||
}
|
||||
p->checkcount = checkCount;
|
||||
fp->WriteFloatString( "\t%d (", p->numEdges );
|
||||
for ( i = 0; i < p->numEdges; i++ ) {
|
||||
fp->WriteFloatString( " %d", p->edges[i] );
|
||||
}
|
||||
fp->WriteFloatString( " ) ( %f %f %f ) %f", p->plane.Normal()[0], p->plane.Normal()[1], p->plane.Normal()[2], p->plane.Dist() );
|
||||
fp->WriteFloatString( " ( %f %f %f )", p->bounds[0][0], p->bounds[0][1], p->bounds[0][2] );
|
||||
fp->WriteFloatString( " ( %f %f %f )", p->bounds[1][0], p->bounds[1][1], p->bounds[1][2] );
|
||||
fp->WriteFloatString( " \"%s\"\n", p->material->GetName() );
|
||||
}
|
||||
if ( node->planeType != -1 ) {
|
||||
WritePolygons( fp, node->children[0] );
|
||||
WritePolygons( fp, node->children[1] );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::CountBrushMemory
|
||||
================
|
||||
*/
|
||||
int idCollisionModelManagerLocal::CountBrushMemory( cm_node_t *node ) const {
|
||||
cm_brushRef_t *bref;
|
||||
cm_brush_t *b;
|
||||
int memory;
|
||||
|
||||
memory = 0;
|
||||
for ( bref = node->brushes; bref; bref = bref->next ) {
|
||||
b = bref->b;
|
||||
if ( b->checkcount == checkCount ) {
|
||||
continue;
|
||||
}
|
||||
b->checkcount = checkCount;
|
||||
|
||||
memory += sizeof( cm_brush_t ) + ( b->numPlanes - 1 ) * sizeof( b->planes[0] );
|
||||
}
|
||||
if ( node->planeType != -1 ) {
|
||||
memory += CountBrushMemory( node->children[0] );
|
||||
memory += CountBrushMemory( node->children[1] );
|
||||
}
|
||||
return memory;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::WriteBrushes
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::WriteBrushes( idFile *fp, cm_node_t *node ) {
|
||||
cm_brushRef_t *bref;
|
||||
cm_brush_t *b;
|
||||
int i;
|
||||
|
||||
for ( bref = node->brushes; bref; bref = bref->next ) {
|
||||
b = bref->b;
|
||||
if ( b->checkcount == checkCount ) {
|
||||
continue;
|
||||
}
|
||||
b->checkcount = checkCount;
|
||||
fp->WriteFloatString( "\t%d {\n", b->numPlanes );
|
||||
for ( i = 0; i < b->numPlanes; i++ ) {
|
||||
fp->WriteFloatString( "\t\t( %f %f %f ) %f\n", b->planes[i].Normal()[0], b->planes[i].Normal()[1], b->planes[i].Normal()[2], b->planes[i].Dist() );
|
||||
}
|
||||
fp->WriteFloatString( "\t} ( %f %f %f )", b->bounds[0][0], b->bounds[0][1], b->bounds[0][2] );
|
||||
fp->WriteFloatString( " ( %f %f %f ) \"%s\"\n", b->bounds[1][0], b->bounds[1][1], b->bounds[1][2], StringFromContents( b->contents ) );
|
||||
}
|
||||
if ( node->planeType != -1 ) {
|
||||
WriteBrushes( fp, node->children[0] );
|
||||
WriteBrushes( fp, node->children[1] );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::WriteCollisionModel
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::WriteCollisionModel( idFile *fp, cm_model_t *model ) {
|
||||
int i, polygonMemory, brushMemory;
|
||||
|
||||
fp->WriteFloatString( "collisionModel \"%s\" {\n", model->name.c_str() );
|
||||
// vertices
|
||||
fp->WriteFloatString( "\tvertices { /* numVertices = */ %d\n", model->numVertices );
|
||||
for ( i = 0; i < model->numVertices; i++ ) {
|
||||
fp->WriteFloatString( "\t/* %d */ ( %f %f %f )\n", i, model->vertices[i].p[0], model->vertices[i].p[1], model->vertices[i].p[2] );
|
||||
}
|
||||
fp->WriteFloatString( "\t}\n" );
|
||||
// edges
|
||||
fp->WriteFloatString( "\tedges { /* numEdges = */ %d\n", model->numEdges );
|
||||
for ( i = 0; i < model->numEdges; i++ ) {
|
||||
fp->WriteFloatString( "\t/* %d */ ( %d %d ) %d %d\n", i, model->edges[i].vertexNum[0], model->edges[i].vertexNum[1], model->edges[i].internal, model->edges[i].numUsers );
|
||||
}
|
||||
fp->WriteFloatString( "\t}\n" );
|
||||
// nodes
|
||||
fp->WriteFloatString( "\tnodes {\n" );
|
||||
WriteNodes( fp, model->node );
|
||||
fp->WriteFloatString( "\t}\n" );
|
||||
// polygons
|
||||
checkCount++;
|
||||
polygonMemory = CountPolygonMemory( model->node );
|
||||
fp->WriteFloatString( "\tpolygons /* polygonMemory = */ %d {\n", polygonMemory );
|
||||
checkCount++;
|
||||
WritePolygons( fp, model->node );
|
||||
fp->WriteFloatString( "\t}\n" );
|
||||
// brushes
|
||||
checkCount++;
|
||||
brushMemory = CountBrushMemory( model->node );
|
||||
fp->WriteFloatString( "\tbrushes /* brushMemory = */ %d {\n", brushMemory );
|
||||
checkCount++;
|
||||
WriteBrushes( fp, model->node );
|
||||
fp->WriteFloatString( "\t}\n" );
|
||||
// closing brace
|
||||
fp->WriteFloatString( "}\n" );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::WriteCollisionModelsToFile
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::WriteCollisionModelsToFile( const char *filename, int firstModel, int lastModel, unsigned int mapFileCRC ) {
|
||||
int i;
|
||||
idFile *fp;
|
||||
idStr name;
|
||||
|
||||
name = filename;
|
||||
name.SetFileExtension( CM_FILE_EXT );
|
||||
|
||||
common->Printf( "writing %s\n", name.c_str() );
|
||||
// _D3XP was saving to fs_cdpath
|
||||
fp = fileSystem->OpenFileWrite( name, "fs_devpath" );
|
||||
if ( !fp ) {
|
||||
common->Warning( "idCollisionModelManagerLocal::WriteCollisionModelsToFile: Error opening file %s\n", name.c_str() );
|
||||
return;
|
||||
}
|
||||
|
||||
// write file id and version
|
||||
fp->WriteFloatString( "%s \"%s\"\n\n", CM_FILEID, CM_FILEVERSION );
|
||||
// write the map file crc
|
||||
fp->WriteFloatString( "%u\n\n", mapFileCRC );
|
||||
|
||||
// write the collision models
|
||||
for ( i = firstModel; i < lastModel; i++ ) {
|
||||
WriteCollisionModel( fp, models[ i ] );
|
||||
}
|
||||
|
||||
fileSystem->CloseFile( fp );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::WriteCollisionModelForMapEntity
|
||||
================
|
||||
*/
|
||||
bool idCollisionModelManagerLocal::WriteCollisionModelForMapEntity( const idMapEntity *mapEnt, const char *filename, const bool testTraceModel ) {
|
||||
idFile *fp;
|
||||
idStr name;
|
||||
cm_model_t *model;
|
||||
|
||||
SetupHash();
|
||||
model = CollisionModelForMapEntity( mapEnt );
|
||||
model->name = filename;
|
||||
|
||||
name = filename;
|
||||
name.SetFileExtension( CM_FILE_EXT );
|
||||
|
||||
common->Printf( "writing %s\n", name.c_str() );
|
||||
fp = fileSystem->OpenFileWrite( name, "fs_devpath" );
|
||||
if ( !fp ) {
|
||||
common->Printf( "idCollisionModelManagerLocal::WriteCollisionModelForMapEntity: Error opening file %s\n", name.c_str() );
|
||||
FreeModel( model );
|
||||
return false;
|
||||
}
|
||||
|
||||
// write file id and version
|
||||
fp->WriteFloatString( "%s \"%s\"\n\n", CM_FILEID, CM_FILEVERSION );
|
||||
// write the map file crc
|
||||
fp->WriteFloatString( "%u\n\n", 0 );
|
||||
|
||||
// write the collision model
|
||||
WriteCollisionModel( fp, model );
|
||||
|
||||
fileSystem->CloseFile( fp );
|
||||
|
||||
if ( testTraceModel ) {
|
||||
idTraceModel trm;
|
||||
TrmFromModel( model, trm );
|
||||
}
|
||||
|
||||
FreeModel( model );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Loading of collision model file
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::ParseVertices
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::ParseVertices( idLexer *src, cm_model_t *model ) {
|
||||
int i;
|
||||
|
||||
src->ExpectTokenString( "{" );
|
||||
model->numVertices = src->ParseInt();
|
||||
model->maxVertices = model->numVertices;
|
||||
model->vertices = (cm_vertex_t *) Mem_Alloc( model->maxVertices * sizeof( cm_vertex_t ) );
|
||||
for ( i = 0; i < model->numVertices; i++ ) {
|
||||
src->Parse1DMatrix( 3, model->vertices[i].p.ToFloatPtr() );
|
||||
model->vertices[i].side = 0;
|
||||
model->vertices[i].sideSet = 0;
|
||||
model->vertices[i].checkcount = 0;
|
||||
}
|
||||
src->ExpectTokenString( "}" );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::ParseEdges
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::ParseEdges( idLexer *src, cm_model_t *model ) {
|
||||
int i;
|
||||
|
||||
src->ExpectTokenString( "{" );
|
||||
model->numEdges = src->ParseInt();
|
||||
model->maxEdges = model->numEdges;
|
||||
model->edges = (cm_edge_t *) Mem_Alloc( model->maxEdges * sizeof( cm_edge_t ) );
|
||||
for ( i = 0; i < model->numEdges; i++ ) {
|
||||
src->ExpectTokenString( "(" );
|
||||
model->edges[i].vertexNum[0] = src->ParseInt();
|
||||
model->edges[i].vertexNum[1] = src->ParseInt();
|
||||
src->ExpectTokenString( ")" );
|
||||
model->edges[i].side = 0;
|
||||
model->edges[i].sideSet = 0;
|
||||
model->edges[i].internal = src->ParseInt();
|
||||
model->edges[i].numUsers = src->ParseInt();
|
||||
model->edges[i].normal = vec3_origin;
|
||||
model->edges[i].checkcount = 0;
|
||||
model->numInternalEdges += model->edges[i].internal;
|
||||
}
|
||||
src->ExpectTokenString( "}" );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::ParseNodes
|
||||
================
|
||||
*/
|
||||
cm_node_t *idCollisionModelManagerLocal::ParseNodes( idLexer *src, cm_model_t *model, cm_node_t *parent ) {
|
||||
cm_node_t *node;
|
||||
|
||||
model->numNodes++;
|
||||
node = AllocNode( model, model->numNodes < NODE_BLOCK_SIZE_SMALL ? NODE_BLOCK_SIZE_SMALL : NODE_BLOCK_SIZE_LARGE );
|
||||
node->brushes = NULL;
|
||||
node->polygons = NULL;
|
||||
node->parent = parent;
|
||||
src->ExpectTokenString( "(" );
|
||||
node->planeType = src->ParseInt();
|
||||
node->planeDist = src->ParseFloat();
|
||||
src->ExpectTokenString( ")" );
|
||||
if ( node->planeType != -1 ) {
|
||||
node->children[0] = ParseNodes( src, model, node );
|
||||
node->children[1] = ParseNodes( src, model, node );
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::ParsePolygons
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::ParsePolygons( idLexer *src, cm_model_t *model ) {
|
||||
cm_polygon_t *p;
|
||||
int i, numEdges;
|
||||
idVec3 normal;
|
||||
idToken token;
|
||||
|
||||
if ( src->CheckTokenType( TT_NUMBER, 0, &token ) ) {
|
||||
model->polygonBlock = (cm_polygonBlock_t *) Mem_Alloc( sizeof( cm_polygonBlock_t ) + token.GetIntValue() );
|
||||
model->polygonBlock->bytesRemaining = token.GetIntValue();
|
||||
model->polygonBlock->next = ( (byte *) model->polygonBlock ) + sizeof( cm_polygonBlock_t );
|
||||
}
|
||||
|
||||
src->ExpectTokenString( "{" );
|
||||
while ( !src->CheckTokenString( "}" ) ) {
|
||||
// parse polygon
|
||||
numEdges = src->ParseInt();
|
||||
p = AllocPolygon( model, numEdges );
|
||||
p->numEdges = numEdges;
|
||||
src->ExpectTokenString( "(" );
|
||||
for ( i = 0; i < p->numEdges; i++ ) {
|
||||
p->edges[i] = src->ParseInt();
|
||||
}
|
||||
src->ExpectTokenString( ")" );
|
||||
src->Parse1DMatrix( 3, normal.ToFloatPtr() );
|
||||
p->plane.SetNormal( normal );
|
||||
p->plane.SetDist( src->ParseFloat() );
|
||||
src->Parse1DMatrix( 3, p->bounds[0].ToFloatPtr() );
|
||||
src->Parse1DMatrix( 3, p->bounds[1].ToFloatPtr() );
|
||||
src->ExpectTokenType( TT_STRING, 0, &token );
|
||||
// get material
|
||||
p->material = declManager->FindMaterial( token );
|
||||
p->contents = p->material->GetContentFlags();
|
||||
p->checkcount = 0;
|
||||
// filter polygon into tree
|
||||
R_FilterPolygonIntoTree( model, model->node, NULL, p );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::ParseBrushes
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::ParseBrushes( idLexer *src, cm_model_t *model ) {
|
||||
cm_brush_t *b;
|
||||
int i, numPlanes;
|
||||
idVec3 normal;
|
||||
idToken token;
|
||||
|
||||
if ( src->CheckTokenType( TT_NUMBER, 0, &token ) ) {
|
||||
model->brushBlock = (cm_brushBlock_t *) Mem_Alloc( sizeof( cm_brushBlock_t ) + token.GetIntValue() );
|
||||
model->brushBlock->bytesRemaining = token.GetIntValue();
|
||||
model->brushBlock->next = ( (byte *) model->brushBlock ) + sizeof( cm_brushBlock_t );
|
||||
}
|
||||
|
||||
src->ExpectTokenString( "{" );
|
||||
while ( !src->CheckTokenString( "}" ) ) {
|
||||
// parse brush
|
||||
numPlanes = src->ParseInt();
|
||||
b = AllocBrush( model, numPlanes );
|
||||
b->numPlanes = numPlanes;
|
||||
src->ExpectTokenString( "{" );
|
||||
for ( i = 0; i < b->numPlanes; i++ ) {
|
||||
src->Parse1DMatrix( 3, normal.ToFloatPtr() );
|
||||
b->planes[i].SetNormal( normal );
|
||||
b->planes[i].SetDist( src->ParseFloat() );
|
||||
}
|
||||
src->ExpectTokenString( "}" );
|
||||
src->Parse1DMatrix( 3, b->bounds[0].ToFloatPtr() );
|
||||
src->Parse1DMatrix( 3, b->bounds[1].ToFloatPtr() );
|
||||
src->ReadToken( &token );
|
||||
if ( token.type == TT_NUMBER ) {
|
||||
b->contents = token.GetIntValue(); // old .cm files use a single integer
|
||||
} else {
|
||||
b->contents = ContentsFromString( token );
|
||||
}
|
||||
b->checkcount = 0;
|
||||
b->primitiveNum = 0;
|
||||
// filter brush into tree
|
||||
R_FilterBrushIntoTree( model, model->node, NULL, b );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::ParseCollisionModel
|
||||
================
|
||||
*/
|
||||
bool idCollisionModelManagerLocal::ParseCollisionModel( idLexer *src ) {
|
||||
cm_model_t *model;
|
||||
idToken token;
|
||||
|
||||
if ( numModels >= MAX_SUBMODELS ) {
|
||||
common->Error( "LoadModel: no free slots" );
|
||||
return false;
|
||||
}
|
||||
model = AllocModel();
|
||||
models[numModels ] = model;
|
||||
numModels++;
|
||||
// parse the file
|
||||
src->ExpectTokenType( TT_STRING, 0, &token );
|
||||
model->name = token;
|
||||
src->ExpectTokenString( "{" );
|
||||
while ( !src->CheckTokenString( "}" ) ) {
|
||||
|
||||
src->ReadToken( &token );
|
||||
|
||||
if ( token == "vertices" ) {
|
||||
ParseVertices( src, model );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( token == "edges" ) {
|
||||
ParseEdges( src, model );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( token == "nodes" ) {
|
||||
src->ExpectTokenString( "{" );
|
||||
model->node = ParseNodes( src, model, NULL );
|
||||
src->ExpectTokenString( "}" );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( token == "polygons" ) {
|
||||
ParsePolygons( src, model );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( token == "brushes" ) {
|
||||
ParseBrushes( src, model );
|
||||
continue;
|
||||
}
|
||||
|
||||
src->Error( "ParseCollisionModel: bad token \"%s\"", token.c_str() );
|
||||
}
|
||||
// calculate edge normals
|
||||
checkCount++;
|
||||
CalculateEdgeNormals( model, model->node );
|
||||
// get model bounds from brush and polygon bounds
|
||||
CM_GetNodeBounds( &model->bounds, model->node );
|
||||
// get model contents
|
||||
model->contents = CM_GetNodeContents( model->node );
|
||||
// total memory used by this model
|
||||
model->usedMemory = model->numVertices * sizeof(cm_vertex_t) +
|
||||
model->numEdges * sizeof(cm_edge_t) +
|
||||
model->polygonMemory +
|
||||
model->brushMemory +
|
||||
model->numNodes * sizeof(cm_node_t) +
|
||||
model->numPolygonRefs * sizeof(cm_polygonRef_t) +
|
||||
model->numBrushRefs * sizeof(cm_brushRef_t);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::LoadCollisionModelFile
|
||||
================
|
||||
*/
|
||||
bool idCollisionModelManagerLocal::LoadCollisionModelFile( const char *name, unsigned int mapFileCRC ) {
|
||||
idStr fileName;
|
||||
idToken token;
|
||||
idLexer *src;
|
||||
unsigned int crc;
|
||||
|
||||
// load it
|
||||
fileName = name;
|
||||
fileName.SetFileExtension( CM_FILE_EXT );
|
||||
src = new idLexer( fileName );
|
||||
src->SetFlags( LEXFL_NOSTRINGCONCAT | LEXFL_NODOLLARPRECOMPILE );
|
||||
if ( !src->IsLoaded() ) {
|
||||
delete src;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !src->ExpectTokenString( CM_FILEID ) ) {
|
||||
common->Warning( "%s is not an CM file.", fileName.c_str() );
|
||||
delete src;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !src->ReadToken( &token ) || token != CM_FILEVERSION ) {
|
||||
common->Warning( "%s has version %s instead of %s", fileName.c_str(), token.c_str(), CM_FILEVERSION );
|
||||
delete src;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( !src->ExpectTokenType( TT_NUMBER, TT_INTEGER, &token ) ) {
|
||||
common->Warning( "%s has no map file CRC", fileName.c_str() );
|
||||
delete src;
|
||||
return false;
|
||||
}
|
||||
|
||||
crc = token.GetUnsignedLongValue();
|
||||
if ( mapFileCRC && crc != mapFileCRC ) {
|
||||
common->Printf( "%s is out of date\n", fileName.c_str() );
|
||||
delete src;
|
||||
return false;
|
||||
}
|
||||
|
||||
// parse the file
|
||||
while ( 1 ) {
|
||||
if ( !src->ReadToken( &token ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( token == "collisionModel" ) {
|
||||
if ( !ParseCollisionModel( src ) ) {
|
||||
delete src;
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
src->Error( "idCollisionModelManagerLocal::LoadCollisionModelFile: bad token \"%s\"", token.c_str() );
|
||||
}
|
||||
|
||||
delete src;
|
||||
|
||||
return true;
|
||||
}
|
3696
cm/CollisionModel_load.cpp
Normal file
3696
cm/CollisionModel_load.cpp
Normal file
File diff suppressed because it is too large
Load diff
527
cm/CollisionModel_local.h
Normal file
527
cm/CollisionModel_local.h
Normal file
|
@ -0,0 +1,527 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace model vs. polygonal model collision detection.
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
#include "CollisionModel.h"
|
||||
|
||||
#define MIN_NODE_SIZE 64.0f
|
||||
#define MAX_NODE_POLYGONS 128
|
||||
#define CM_MAX_POLYGON_EDGES 64
|
||||
#define CIRCLE_APPROXIMATION_LENGTH 64.0f
|
||||
|
||||
#define MAX_SUBMODELS 2048
|
||||
#define TRACE_MODEL_HANDLE MAX_SUBMODELS
|
||||
|
||||
#define VERTEX_HASH_BOXSIZE (1<<6) // must be power of 2
|
||||
#define VERTEX_HASH_SIZE (VERTEX_HASH_BOXSIZE*VERTEX_HASH_BOXSIZE)
|
||||
#define EDGE_HASH_SIZE (1<<14)
|
||||
|
||||
#define NODE_BLOCK_SIZE_SMALL 8
|
||||
#define NODE_BLOCK_SIZE_LARGE 256
|
||||
#define REFERENCE_BLOCK_SIZE_SMALL 8
|
||||
#define REFERENCE_BLOCK_SIZE_LARGE 256
|
||||
|
||||
#define MAX_WINDING_LIST 128 // quite a few are generated at times
|
||||
#define INTEGRAL_EPSILON 0.01f
|
||||
#define VERTEX_EPSILON 0.1f
|
||||
#define CHOP_EPSILON 0.1f
|
||||
|
||||
|
||||
typedef struct cm_windingList_s {
|
||||
int numWindings; // number of windings
|
||||
idFixedWinding w[MAX_WINDING_LIST]; // windings
|
||||
idVec3 normal; // normal for all windings
|
||||
idBounds bounds; // bounds of all windings in list
|
||||
idVec3 origin; // origin for radius
|
||||
float radius; // radius relative to origin for all windings
|
||||
int contents; // winding surface contents
|
||||
int primitiveNum; // number of primitive the windings came from
|
||||
} cm_windingList_t;
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Collision model
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
typedef struct cm_vertex_s {
|
||||
idVec3 p; // vertex point
|
||||
int checkcount; // for multi-check avoidance
|
||||
unsigned long side; // each bit tells at which side this vertex passes one of the trace model edges
|
||||
unsigned long sideSet; // each bit tells if sidedness for the trace model edge has been calculated yet
|
||||
} cm_vertex_t;
|
||||
|
||||
typedef struct cm_edge_s {
|
||||
int checkcount; // for multi-check avoidance
|
||||
unsigned short internal; // a trace model can never collide with internal edges
|
||||
unsigned short numUsers; // number of polygons using this edge
|
||||
unsigned long side; // each bit tells at which side of this edge one of the trace model vertices passes
|
||||
unsigned long sideSet; // each bit tells if sidedness for the trace model vertex has been calculated yet
|
||||
int vertexNum[2]; // start and end point of edge
|
||||
idVec3 normal; // edge normal
|
||||
} cm_edge_t;
|
||||
|
||||
typedef struct cm_polygonBlock_s {
|
||||
int bytesRemaining;
|
||||
byte * next;
|
||||
} cm_polygonBlock_t;
|
||||
|
||||
typedef struct cm_polygon_s {
|
||||
idBounds bounds; // polygon bounds
|
||||
int checkcount; // for multi-check avoidance
|
||||
int contents; // contents behind polygon
|
||||
const idMaterial * material; // material
|
||||
idPlane plane; // polygon plane
|
||||
int numEdges; // number of edges
|
||||
int edges[1]; // variable sized, indexes into cm_edge_t list
|
||||
} cm_polygon_t;
|
||||
|
||||
typedef struct cm_polygonRef_s {
|
||||
cm_polygon_t * p; // pointer to polygon
|
||||
struct cm_polygonRef_s *next; // next polygon in chain
|
||||
} cm_polygonRef_t;
|
||||
|
||||
typedef struct cm_polygonRefBlock_s {
|
||||
cm_polygonRef_t * nextRef; // next polygon reference in block
|
||||
struct cm_polygonRefBlock_s *next; // next block with polygon references
|
||||
} cm_polygonRefBlock_t;
|
||||
|
||||
typedef struct cm_brushBlock_s {
|
||||
int bytesRemaining;
|
||||
byte * next;
|
||||
} cm_brushBlock_t;
|
||||
|
||||
typedef struct cm_brush_s {
|
||||
int checkcount; // for multi-check avoidance
|
||||
idBounds bounds; // brush bounds
|
||||
int contents; // contents of brush
|
||||
const idMaterial * material; // material
|
||||
int primitiveNum; // number of brush primitive
|
||||
int numPlanes; // number of bounding planes
|
||||
idPlane planes[1]; // variable sized
|
||||
} cm_brush_t;
|
||||
|
||||
typedef struct cm_brushRef_s {
|
||||
cm_brush_t * b; // pointer to brush
|
||||
struct cm_brushRef_s * next; // next brush in chain
|
||||
} cm_brushRef_t;
|
||||
|
||||
typedef struct cm_brushRefBlock_s {
|
||||
cm_brushRef_t * nextRef; // next brush reference in block
|
||||
struct cm_brushRefBlock_s *next; // next block with brush references
|
||||
} cm_brushRefBlock_t;
|
||||
|
||||
typedef struct cm_node_s {
|
||||
int planeType; // node axial plane type
|
||||
float planeDist; // node plane distance
|
||||
cm_polygonRef_t * polygons; // polygons in node
|
||||
cm_brushRef_t * brushes; // brushes in node
|
||||
struct cm_node_s * parent; // parent of this node
|
||||
struct cm_node_s * children[2]; // node children
|
||||
} cm_node_t;
|
||||
|
||||
typedef struct cm_nodeBlock_s {
|
||||
cm_node_t * nextNode; // next node in block
|
||||
struct cm_nodeBlock_s *next; // next block with nodes
|
||||
} cm_nodeBlock_t;
|
||||
|
||||
typedef struct cm_model_s {
|
||||
idStr name; // model name
|
||||
idBounds bounds; // model bounds
|
||||
int contents; // all contents of the model ored together
|
||||
bool isConvex; // set if model is convex
|
||||
// model geometry
|
||||
int maxVertices; // size of vertex array
|
||||
int numVertices; // number of vertices
|
||||
cm_vertex_t * vertices; // array with all vertices used by the model
|
||||
int maxEdges; // size of edge array
|
||||
int numEdges; // number of edges
|
||||
cm_edge_t * edges; // array with all edges used by the model
|
||||
cm_node_t * node; // first node of spatial subdivision
|
||||
// blocks with allocated memory
|
||||
cm_nodeBlock_t * nodeBlocks; // list with blocks of nodes
|
||||
cm_polygonRefBlock_t * polygonRefBlocks; // list with blocks of polygon references
|
||||
cm_brushRefBlock_t * brushRefBlocks; // list with blocks of brush references
|
||||
cm_polygonBlock_t * polygonBlock; // memory block with all polygons
|
||||
cm_brushBlock_t * brushBlock; // memory block with all brushes
|
||||
// statistics
|
||||
int numPolygons;
|
||||
int polygonMemory;
|
||||
int numBrushes;
|
||||
int brushMemory;
|
||||
int numNodes;
|
||||
int numBrushRefs;
|
||||
int numPolygonRefs;
|
||||
int numInternalEdges;
|
||||
int numSharpEdges;
|
||||
int numRemovedPolys;
|
||||
int numMergedPolys;
|
||||
int usedMemory;
|
||||
} cm_model_t;
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Data used during collision detection calculations
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
typedef struct cm_trmVertex_s {
|
||||
int used; // true if this vertex is used for collision detection
|
||||
idVec3 p; // vertex position
|
||||
idVec3 endp; // end point of vertex after movement
|
||||
int polygonSide; // side of polygon this vertex is on (rotational collision)
|
||||
idPluecker pl; // pluecker coordinate for vertex movement
|
||||
idVec3 rotationOrigin; // rotation origin for this vertex
|
||||
idBounds rotationBounds; // rotation bounds for this vertex
|
||||
} cm_trmVertex_t;
|
||||
|
||||
typedef struct cm_trmEdge_s {
|
||||
int used; // true when vertex is used for collision detection
|
||||
idVec3 start; // start of edge
|
||||
idVec3 end; // end of edge
|
||||
int vertexNum[2]; // indexes into cm_traceWork_t->vertices
|
||||
idPluecker pl; // pluecker coordinate for edge
|
||||
idVec3 cross; // (z,-y,x) of cross product between edge dir and movement dir
|
||||
idBounds rotationBounds; // rotation bounds for this edge
|
||||
idPluecker plzaxis; // pluecker coordinate for rotation about the z-axis
|
||||
unsigned short bitNum; // vertex bit number
|
||||
} cm_trmEdge_t;
|
||||
|
||||
typedef struct cm_trmPolygon_s {
|
||||
int used;
|
||||
idPlane plane; // polygon plane
|
||||
int numEdges; // number of edges
|
||||
int edges[MAX_TRACEMODEL_POLYEDGES]; // index into cm_traceWork_t->edges
|
||||
idBounds rotationBounds; // rotation bounds for this polygon
|
||||
} cm_trmPolygon_t;
|
||||
|
||||
typedef struct cm_traceWork_s {
|
||||
int numVerts;
|
||||
cm_trmVertex_t vertices[MAX_TRACEMODEL_VERTS]; // trm vertices
|
||||
int numEdges;
|
||||
cm_trmEdge_t edges[MAX_TRACEMODEL_EDGES+1]; // trm edges
|
||||
int numPolys;
|
||||
cm_trmPolygon_t polys[MAX_TRACEMODEL_POLYS]; // trm polygons
|
||||
cm_model_t *model; // model colliding with
|
||||
idVec3 start; // start of trace
|
||||
idVec3 end; // end of trace
|
||||
idVec3 dir; // trace direction
|
||||
idBounds bounds; // bounds of full trace
|
||||
idBounds size; // bounds of transformed trm relative to start
|
||||
idVec3 extents; // largest of abs(size[0]) and abs(size[1]) for BSP trace
|
||||
int contents; // ignore polygons that do not have any of these contents flags
|
||||
trace_t trace; // collision detection result
|
||||
|
||||
bool rotation; // true if calculating rotational collision
|
||||
bool pointTrace; // true if only tracing a point
|
||||
bool positionTest; // true if not tracing but doing a position test
|
||||
bool isConvex; // true if the trace model is convex
|
||||
bool axisIntersectsTrm; // true if the rotation axis intersects the trace model
|
||||
bool getContacts; // true if retrieving contacts
|
||||
bool quickExit; // set to quickly stop the collision detection calculations
|
||||
|
||||
idVec3 origin; // origin of rotation in model space
|
||||
idVec3 axis; // rotation axis in model space
|
||||
idMat3 matrix; // rotates axis of rotation to the z-axis
|
||||
float angle; // angle for rotational collision
|
||||
float maxTan; // max tangent of half the positive angle used instead of fraction
|
||||
float radius; // rotation radius of trm start
|
||||
idRotation modelVertexRotation; // inverse rotation for model vertices
|
||||
|
||||
contactInfo_t *contacts; // array with contacts
|
||||
int maxContacts; // max size of contact array
|
||||
int numContacts; // number of contacts found
|
||||
|
||||
idPlane heartPlane1; // polygons should be near anough the trace heart planes
|
||||
float maxDistFromHeartPlane1;
|
||||
idPlane heartPlane2;
|
||||
float maxDistFromHeartPlane2;
|
||||
idPluecker polygonEdgePlueckerCache[CM_MAX_POLYGON_EDGES];
|
||||
idPluecker polygonVertexPlueckerCache[CM_MAX_POLYGON_EDGES];
|
||||
idVec3 polygonRotationOriginCache[CM_MAX_POLYGON_EDGES];
|
||||
} cm_traceWork_t;
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Collision Map
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
typedef struct cm_procNode_s {
|
||||
idPlane plane;
|
||||
int children[2]; // negative numbers are (-1 - areaNumber), 0 = solid
|
||||
} cm_procNode_t;
|
||||
|
||||
class idCollisionModelManagerLocal : public idCollisionModelManager {
|
||||
public:
|
||||
// load collision models from a map file
|
||||
void LoadMap( const idMapFile *mapFile );
|
||||
// frees all the collision models
|
||||
void FreeMap( void );
|
||||
|
||||
// get clip handle for model
|
||||
cmHandle_t LoadModel( const char *modelName, const bool precache );
|
||||
// sets up a trace model for collision with other trace models
|
||||
cmHandle_t SetupTrmModel( const idTraceModel &trm, const idMaterial *material );
|
||||
// create trace model from a collision model, returns true if succesfull
|
||||
bool TrmFromModel( const char *modelName, idTraceModel &trm );
|
||||
|
||||
// name of the model
|
||||
const char * GetModelName( cmHandle_t model ) const;
|
||||
// bounds of the model
|
||||
bool GetModelBounds( cmHandle_t model, idBounds &bounds ) const;
|
||||
// all contents flags of brushes and polygons ored together
|
||||
bool GetModelContents( cmHandle_t model, int &contents ) const;
|
||||
// get the vertex of a model
|
||||
bool GetModelVertex( cmHandle_t model, int vertexNum, idVec3 &vertex ) const;
|
||||
// get the edge of a model
|
||||
bool GetModelEdge( cmHandle_t model, int edgeNum, idVec3 &start, idVec3 &end ) const;
|
||||
// get the polygon of a model
|
||||
bool GetModelPolygon( cmHandle_t model, int polygonNum, idFixedWinding &winding ) const;
|
||||
|
||||
// translates a trm and reports the first collision if any
|
||||
void Translation( trace_t *results, const idVec3 &start, const idVec3 &end,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis );
|
||||
// rotates a trm and reports the first collision if any
|
||||
void Rotation( trace_t *results, const idVec3 &start, const idRotation &rotation,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis );
|
||||
// returns the contents the trm is stuck in or 0 if the trm is in free space
|
||||
int Contents( const idVec3 &start,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis );
|
||||
// stores all contact points of the trm with the model, returns the number of contacts
|
||||
int Contacts( contactInfo_t *contacts, const int maxContacts, const idVec3 &start, const idVec6 &dir, const float depth,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis );
|
||||
// test collision detection
|
||||
void DebugOutput( const idVec3 &origin );
|
||||
// draw a model
|
||||
void DrawModel( cmHandle_t model, const idVec3 &origin, const idMat3 &axis,
|
||||
const idVec3 &viewOrigin, const float radius, const idVec4 &linecolor );
|
||||
// print model information, use -1 handle for accumulated model info
|
||||
void ModelInfo( cmHandle_t model );
|
||||
// list all loaded models
|
||||
void ListModels( void );
|
||||
// write a collision model file for the map entity
|
||||
bool WriteCollisionModelForMapEntity( const idMapEntity *mapEnt, const char *filename, const bool testTraceModel = true );
|
||||
|
||||
private: // CollisionMap_translate.cpp
|
||||
int TranslateEdgeThroughEdge( idVec3 &cross, idPluecker &l1, idPluecker &l2, float *fraction );
|
||||
void TranslateTrmEdgeThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmEdge_t *trmEdge );
|
||||
void TranslateTrmVertexThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v, int bitNum );
|
||||
void TranslatePointThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v );
|
||||
void TranslateVertexThroughTrmPolygon( cm_traceWork_t *tw, cm_trmPolygon_t *trmpoly, cm_polygon_t *poly, cm_vertex_t *v, idVec3 &endp, idPluecker &pl );
|
||||
bool TranslateTrmThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *p );
|
||||
void SetupTranslationHeartPlanes( cm_traceWork_t *tw );
|
||||
void SetupTrm( cm_traceWork_t *tw, const idTraceModel *trm );
|
||||
|
||||
private: // CollisionMap_rotate.cpp
|
||||
int CollisionBetweenEdgeBounds( cm_traceWork_t *tw, const idVec3 &va, const idVec3 &vb,
|
||||
const idVec3 &vc, const idVec3 &vd, float tanHalfAngle,
|
||||
idVec3 &collisionPoint, idVec3 &collisionNormal );
|
||||
int RotateEdgeThroughEdge( cm_traceWork_t *tw, const idPluecker &pl1,
|
||||
const idVec3 &vc, const idVec3 &vd,
|
||||
const float minTan, float &tanHalfAngle );
|
||||
int EdgeFurthestFromEdge( cm_traceWork_t *tw, const idPluecker &pl1,
|
||||
const idVec3 &vc, const idVec3 &vd,
|
||||
float &tanHalfAngle, float &dir );
|
||||
void RotateTrmEdgeThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmEdge_t *trmEdge );
|
||||
int RotatePointThroughPlane( const cm_traceWork_t *tw, const idVec3 &point, const idPlane &plane,
|
||||
const float angle, const float minTan, float &tanHalfAngle );
|
||||
int PointFurthestFromPlane( const cm_traceWork_t *tw, const idVec3 &point, const idPlane &plane,
|
||||
const float angle, float &tanHalfAngle, float &dir );
|
||||
int RotatePointThroughEpsilonPlane( const cm_traceWork_t *tw, const idVec3 &point, const idVec3 &endPoint,
|
||||
const idPlane &plane, const float angle, const idVec3 &origin,
|
||||
float &tanHalfAngle, idVec3 &collisionPoint, idVec3 &endDir );
|
||||
void RotateTrmVertexThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v, int vertexNum);
|
||||
void RotateVertexThroughTrmPolygon( cm_traceWork_t *tw, cm_trmPolygon_t *trmpoly, cm_polygon_t *poly,
|
||||
cm_vertex_t *v, idVec3 &rotationOrigin );
|
||||
bool RotateTrmThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *p );
|
||||
void BoundsForRotation( const idVec3 &origin, const idVec3 &axis, const idVec3 &start, const idVec3 &end, idBounds &bounds );
|
||||
void Rotation180( trace_t *results, const idVec3 &rorg, const idVec3 &axis,
|
||||
const float startAngle, const float endAngle, const idVec3 &start,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis );
|
||||
|
||||
private: // CollisionMap_contents.cpp
|
||||
bool TestTrmVertsInBrush( cm_traceWork_t *tw, cm_brush_t *b );
|
||||
bool TestTrmInPolygon( cm_traceWork_t *tw, cm_polygon_t *p );
|
||||
cm_node_t * PointNode( const idVec3 &p, cm_model_t *model );
|
||||
int PointContents( const idVec3 p, cmHandle_t model );
|
||||
int TransformedPointContents( const idVec3 &p, cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis );
|
||||
int ContentsTrm( trace_t *results, const idVec3 &start,
|
||||
const idTraceModel *trm, const idMat3 &trmAxis, int contentMask,
|
||||
cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis );
|
||||
|
||||
private: // CollisionMap_trace.cpp
|
||||
void TraceTrmThroughNode( cm_traceWork_t *tw, cm_node_t *node );
|
||||
void TraceThroughAxialBSPTree_r( cm_traceWork_t *tw, cm_node_t *node, float p1f, float p2f, idVec3 &p1, idVec3 &p2);
|
||||
void TraceThroughModel( cm_traceWork_t *tw );
|
||||
void RecurseProcBSP_r( trace_t *results, int parentNodeNum, int nodeNum, float p1f, float p2f, const idVec3 &p1, const idVec3 &p2 );
|
||||
|
||||
private: // CollisionMap_load.cpp
|
||||
void Clear( void );
|
||||
void FreeTrmModelStructure( void );
|
||||
// model deallocation
|
||||
void RemovePolygonReferences_r( cm_node_t *node, cm_polygon_t *p );
|
||||
void RemoveBrushReferences_r( cm_node_t *node, cm_brush_t *b );
|
||||
void FreeNode( cm_node_t *node );
|
||||
void FreePolygonReference( cm_polygonRef_t *pref );
|
||||
void FreeBrushReference( cm_brushRef_t *bref );
|
||||
void FreePolygon( cm_model_t *model, cm_polygon_t *poly );
|
||||
void FreeBrush( cm_model_t *model, cm_brush_t *brush );
|
||||
void FreeTree_r( cm_model_t *model, cm_node_t *headNode, cm_node_t *node );
|
||||
void FreeModel( cm_model_t *model );
|
||||
// merging polygons
|
||||
void ReplacePolygons( cm_model_t *model, cm_node_t *node, cm_polygon_t *p1, cm_polygon_t *p2, cm_polygon_t *newp );
|
||||
cm_polygon_t * TryMergePolygons( cm_model_t *model, cm_polygon_t *p1, cm_polygon_t *p2 );
|
||||
bool MergePolygonWithTreePolygons( cm_model_t *model, cm_node_t *node, cm_polygon_t *polygon );
|
||||
void MergeTreePolygons( cm_model_t *model, cm_node_t *node );
|
||||
// finding internal edges
|
||||
bool PointInsidePolygon( cm_model_t *model, cm_polygon_t *p, idVec3 &v );
|
||||
void FindInternalEdgesOnPolygon( cm_model_t *model, cm_polygon_t *p1, cm_polygon_t *p2 );
|
||||
void FindInternalPolygonEdges( cm_model_t *model, cm_node_t *node, cm_polygon_t *polygon );
|
||||
void FindInternalEdges( cm_model_t *model, cm_node_t *node );
|
||||
void FindContainedEdges( cm_model_t *model, cm_polygon_t *p );
|
||||
// loading of proc BSP tree
|
||||
void ParseProcNodes( idLexer *src );
|
||||
void LoadProcBSP( const char *name );
|
||||
// removal of contained polygons
|
||||
int R_ChoppedAwayByProcBSP( int nodeNum, idFixedWinding *w, const idVec3 &normal, const idVec3 &origin, const float radius );
|
||||
int ChoppedAwayByProcBSP( const idFixedWinding &w, const idPlane &plane, int contents );
|
||||
void ChopWindingListWithBrush( cm_windingList_t *list, cm_brush_t *b );
|
||||
void R_ChopWindingListWithTreeBrushes( cm_windingList_t *list, cm_node_t *node );
|
||||
idFixedWinding *WindingOutsideBrushes( idFixedWinding *w, const idPlane &plane, int contents, int patch, cm_node_t *headNode );
|
||||
// creation of axial BSP tree
|
||||
cm_model_t * AllocModel( void );
|
||||
cm_node_t * AllocNode( cm_model_t *model, int blockSize );
|
||||
cm_polygonRef_t*AllocPolygonReference( cm_model_t *model, int blockSize );
|
||||
cm_brushRef_t * AllocBrushReference( cm_model_t *model, int blockSize );
|
||||
cm_polygon_t * AllocPolygon( cm_model_t *model, int numEdges );
|
||||
cm_brush_t * AllocBrush( cm_model_t *model, int numPlanes );
|
||||
void AddPolygonToNode( cm_model_t *model, cm_node_t *node, cm_polygon_t *p );
|
||||
void AddBrushToNode( cm_model_t *model, cm_node_t *node, cm_brush_t *b );
|
||||
void SetupTrmModelStructure( void );
|
||||
void R_FilterPolygonIntoTree( cm_model_t *model, cm_node_t *node, cm_polygonRef_t *pref, cm_polygon_t *p );
|
||||
void R_FilterBrushIntoTree( cm_model_t *model, cm_node_t *node, cm_brushRef_t *pref, cm_brush_t *b );
|
||||
cm_node_t * R_CreateAxialBSPTree( cm_model_t *model, cm_node_t *node, const idBounds &bounds );
|
||||
cm_node_t * CreateAxialBSPTree( cm_model_t *model, cm_node_t *node );
|
||||
// creation of raw polygons
|
||||
void SetupHash(void);
|
||||
void ShutdownHash(void);
|
||||
void ClearHash( idBounds &bounds );
|
||||
int HashVec(const idVec3 &vec);
|
||||
int GetVertex( cm_model_t *model, const idVec3 &v, int *vertexNum );
|
||||
int GetEdge( cm_model_t *model, const idVec3 &v1, const idVec3 &v2, int *edgeNum, int v1num );
|
||||
void CreatePolygon( cm_model_t *model, idFixedWinding *w, const idPlane &plane, const idMaterial *material, int primitiveNum );
|
||||
void PolygonFromWinding( cm_model_t *model, idFixedWinding *w, const idPlane &plane, const idMaterial *material, int primitiveNum );
|
||||
void CalculateEdgeNormals( cm_model_t *model, cm_node_t *node );
|
||||
void CreatePatchPolygons( cm_model_t *model, idSurface_Patch &mesh, const idMaterial *material, int primitiveNum );
|
||||
void ConvertPatch( cm_model_t *model, const idMapPatch *patch, int primitiveNum );
|
||||
void ConvertBrushSides( cm_model_t *model, const idMapBrush *mapBrush, int primitiveNum );
|
||||
void ConvertBrush( cm_model_t *model, const idMapBrush *mapBrush, int primitiveNum );
|
||||
void PrintModelInfo( const cm_model_t *model );
|
||||
void AccumulateModelInfo( cm_model_t *model );
|
||||
void RemapEdges( cm_node_t *node, int *edgeRemap );
|
||||
void OptimizeArrays( cm_model_t *model );
|
||||
void FinishModel( cm_model_t *model );
|
||||
void BuildModels( const idMapFile *mapFile );
|
||||
cmHandle_t FindModel( const char *name );
|
||||
cm_model_t * CollisionModelForMapEntity( const idMapEntity *mapEnt ); // brush/patch model from .map
|
||||
cm_model_t * LoadRenderModel( const char *fileName ); // ASE/LWO models
|
||||
bool TrmFromModel_r( idTraceModel &trm, cm_node_t *node );
|
||||
bool TrmFromModel( const cm_model_t *model, idTraceModel &trm );
|
||||
|
||||
private: // CollisionMap_files.cpp
|
||||
// writing
|
||||
void WriteNodes( idFile *fp, cm_node_t *node );
|
||||
int CountPolygonMemory( cm_node_t *node ) const;
|
||||
void WritePolygons( idFile *fp, cm_node_t *node );
|
||||
int CountBrushMemory( cm_node_t *node ) const;
|
||||
void WriteBrushes( idFile *fp, cm_node_t *node );
|
||||
void WriteCollisionModel( idFile *fp, cm_model_t *model );
|
||||
void WriteCollisionModelsToFile( const char *filename, int firstModel, int lastModel, unsigned int mapFileCRC );
|
||||
// loading
|
||||
cm_node_t * ParseNodes( idLexer *src, cm_model_t *model, cm_node_t *parent );
|
||||
void ParseVertices( idLexer *src, cm_model_t *model );
|
||||
void ParseEdges( idLexer *src, cm_model_t *model );
|
||||
void ParsePolygons( idLexer *src, cm_model_t *model );
|
||||
void ParseBrushes( idLexer *src, cm_model_t *model );
|
||||
bool ParseCollisionModel( idLexer *src );
|
||||
bool LoadCollisionModelFile( const char *name, unsigned int mapFileCRC );
|
||||
|
||||
private: // CollisionMap_debug
|
||||
int ContentsFromString( const char *string ) const;
|
||||
const char * StringFromContents( const int contents ) const;
|
||||
void DrawEdge( cm_model_t *model, int edgeNum, const idVec3 &origin, const idMat3 &axis, const idVec4 &linecolor );
|
||||
void DrawPolygon( cm_model_t *model, cm_polygon_t *p, const idVec3 &origin, const idMat3 &axis,
|
||||
const idVec3 &viewOrigin, const idVec4 &linecolor );
|
||||
void DrawNodePolygons( cm_model_t *model, cm_node_t *node, const idVec3 &origin, const idMat3 &axis,
|
||||
const idVec3 &viewOrigin, const float radius, const idVec4 &linecolor );
|
||||
|
||||
private: // collision map data
|
||||
idStr mapName;
|
||||
ID_TIME_T mapFileTime;
|
||||
int loaded;
|
||||
// for multi-check avoidance
|
||||
int checkCount;
|
||||
// models
|
||||
int maxModels;
|
||||
int numModels;
|
||||
cm_model_t ** models;
|
||||
// polygons and brush for trm model
|
||||
cm_polygonRef_t*trmPolygons[MAX_TRACEMODEL_POLYS];
|
||||
cm_brushRef_t * trmBrushes[1];
|
||||
const idMaterial *trmMaterial;
|
||||
// for data pruning
|
||||
int numProcNodes;
|
||||
cm_procNode_t * procNodes;
|
||||
// for retrieving contact points
|
||||
bool getContacts;
|
||||
contactInfo_t * contacts;
|
||||
int maxContacts;
|
||||
int numContacts;
|
||||
};
|
||||
|
||||
// for debugging
|
||||
extern idCVar cm_debugCollision;
|
1694
cm/CollisionModel_rotate.cpp
Normal file
1694
cm/CollisionModel_rotate.cpp
Normal file
File diff suppressed because it is too large
Load diff
256
cm/CollisionModel_trace.cpp
Normal file
256
cm/CollisionModel_trace.cpp
Normal file
|
@ -0,0 +1,256 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 GPL Source Code
|
||||
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
|
||||
|
||||
Doom 3 Source Code 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.
|
||||
|
||||
Doom 3 Source Code 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 Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace model vs. polygonal model collision detection.
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
#include "../idlib/precompiled.h"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "CollisionModel_local.h"
|
||||
|
||||
/*
|
||||
===============================================================================
|
||||
|
||||
Trace through the spatial subdivision
|
||||
|
||||
===============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::TraceTrmThroughNode
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::TraceTrmThroughNode( cm_traceWork_t *tw, cm_node_t *node ) {
|
||||
cm_polygonRef_t *pref;
|
||||
cm_brushRef_t *bref;
|
||||
|
||||
// position test
|
||||
if ( tw->positionTest ) {
|
||||
// if already stuck in solid
|
||||
if ( tw->trace.fraction == 0.0f ) {
|
||||
return;
|
||||
}
|
||||
// test if any of the trm vertices is inside a brush
|
||||
for ( bref = node->brushes; bref; bref = bref->next ) {
|
||||
if ( idCollisionModelManagerLocal::TestTrmVertsInBrush( tw, bref->b ) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if just testing a point we're done
|
||||
if ( tw->pointTrace ) {
|
||||
return;
|
||||
}
|
||||
// test if the trm is stuck in any polygons
|
||||
for ( pref = node->polygons; pref; pref = pref->next ) {
|
||||
if ( idCollisionModelManagerLocal::TestTrmInPolygon( tw, pref->p ) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( tw->rotation ) {
|
||||
// rotate through all polygons in this leaf
|
||||
for ( pref = node->polygons; pref; pref = pref->next ) {
|
||||
if ( idCollisionModelManagerLocal::RotateTrmThroughPolygon( tw, pref->p ) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// trace through all polygons in this leaf
|
||||
for ( pref = node->polygons; pref; pref = pref->next ) {
|
||||
if ( idCollisionModelManagerLocal::TranslateTrmThroughPolygon( tw, pref->p ) ) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r
|
||||
================
|
||||
*/
|
||||
//#define NO_SPATIAL_SUBDIVISION
|
||||
|
||||
void idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( cm_traceWork_t *tw, cm_node_t *node, float p1f, float p2f, idVec3 &p1, idVec3 &p2) {
|
||||
float t1, t2, offset;
|
||||
float frac, frac2;
|
||||
float idist;
|
||||
idVec3 mid;
|
||||
int side;
|
||||
float midf;
|
||||
|
||||
if ( !node ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( tw->quickExit ) {
|
||||
return; // stop immediately
|
||||
}
|
||||
|
||||
if ( tw->trace.fraction <= p1f ) {
|
||||
return; // already hit something nearer
|
||||
}
|
||||
|
||||
// if we need to test this node for collisions
|
||||
if ( node->polygons || (tw->positionTest && node->brushes) ) {
|
||||
// trace through node with collision data
|
||||
idCollisionModelManagerLocal::TraceTrmThroughNode( tw, node );
|
||||
}
|
||||
// if already stuck in solid
|
||||
if ( tw->positionTest && tw->trace.fraction == 0.0f ) {
|
||||
return;
|
||||
}
|
||||
// if this is a leaf node
|
||||
if ( node->planeType == -1 ) {
|
||||
return;
|
||||
}
|
||||
#ifdef NO_SPATIAL_SUBDIVISION
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[0], p1f, p2f, p1, p2 );
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[1], p1f, p2f, p1, p2 );
|
||||
return;
|
||||
#endif
|
||||
// distance from plane for trace start and end
|
||||
t1 = p1[node->planeType] - node->planeDist;
|
||||
t2 = p2[node->planeType] - node->planeDist;
|
||||
// adjust the plane distance appropriately for mins/maxs
|
||||
offset = tw->extents[node->planeType];
|
||||
// see which sides we need to consider
|
||||
if ( t1 >= offset && t2 >= offset ) {
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[0], p1f, p2f, p1, p2 );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( t1 < -offset && t2 < -offset ) {
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[1], p1f, p2f, p1, p2 );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( t1 < t2 ) {
|
||||
idist = 1.0f / (t1-t2);
|
||||
side = 1;
|
||||
frac2 = (t1 + offset) * idist;
|
||||
frac = (t1 - offset) * idist;
|
||||
} else if (t1 > t2) {
|
||||
idist = 1.0f / (t1-t2);
|
||||
side = 0;
|
||||
frac2 = (t1 - offset) * idist;
|
||||
frac = (t1 + offset) * idist;
|
||||
} else {
|
||||
side = 0;
|
||||
frac = 1.0f;
|
||||
frac2 = 0.0f;
|
||||
}
|
||||
|
||||
// move up to the node
|
||||
if ( frac < 0.0f ) {
|
||||
frac = 0.0f;
|
||||
}
|
||||
else if ( frac > 1.0f ) {
|
||||
frac = 1.0f;
|
||||
}
|
||||
|
||||
midf = p1f + (p2f - p1f)*frac;
|
||||
|
||||
mid[0] = p1[0] + frac*(p2[0] - p1[0]);
|
||||
mid[1] = p1[1] + frac*(p2[1] - p1[1]);
|
||||
mid[2] = p1[2] + frac*(p2[2] - p1[2]);
|
||||
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[side], p1f, midf, p1, mid );
|
||||
|
||||
|
||||
// go past the node
|
||||
if ( frac2 < 0.0f ) {
|
||||
frac2 = 0.0f;
|
||||
}
|
||||
else if ( frac2 > 1.0f ) {
|
||||
frac2 = 1.0f;
|
||||
}
|
||||
|
||||
midf = p1f + (p2f - p1f)*frac2;
|
||||
|
||||
mid[0] = p1[0] + frac2*(p2[0] - p1[0]);
|
||||
mid[1] = p1[1] + frac2*(p2[1] - p1[1]);
|
||||
mid[2] = p1[2] + frac2*(p2[2] - p1[2]);
|
||||
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[side^1], midf, p2f, mid, p2 );
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
idCollisionModelManagerLocal::TraceThroughModel
|
||||
================
|
||||
*/
|
||||
void idCollisionModelManagerLocal::TraceThroughModel( cm_traceWork_t *tw ) {
|
||||
float d;
|
||||
int i, numSteps;
|
||||
idVec3 start, end;
|
||||
idRotation rot;
|
||||
|
||||
if ( !tw->rotation ) {
|
||||
// trace through spatial subdivision and then through leafs
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, tw->model->node, 0, 1, tw->start, tw->end );
|
||||
}
|
||||
else {
|
||||
// approximate the rotation with a series of straight line movements
|
||||
// total length covered along circle
|
||||
d = tw->radius * DEG2RAD( tw->angle );
|
||||
// if more than one step
|
||||
if ( d > CIRCLE_APPROXIMATION_LENGTH ) {
|
||||
// number of steps for the approximation
|
||||
numSteps = (int) (CIRCLE_APPROXIMATION_LENGTH / d);
|
||||
// start of approximation
|
||||
start = tw->start;
|
||||
// trace circle approximation steps through the BSP tree
|
||||
for ( i = 0; i < numSteps; i++ ) {
|
||||
// calculate next point on approximated circle
|
||||
rot.Set( tw->origin, tw->axis, tw->angle * ((float) (i+1) / numSteps) );
|
||||
end = start * rot;
|
||||
// trace through spatial subdivision and then through leafs
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, tw->model->node, 0, 1, start, end );
|
||||
// no need to continue if something was hit already
|
||||
if ( tw->trace.fraction < 1.0f ) {
|
||||
return;
|
||||
}
|
||||
start = end;
|
||||
}
|
||||
}
|
||||
else {
|
||||
start = tw->start;
|
||||
}
|
||||
// last step of the approximation
|
||||
idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, tw->model->node, 0, 1, start, tw->end );
|
||||
}
|
||||
}
|
1120
cm/CollisionModel_translate.cpp
Normal file
1120
cm/CollisionModel_translate.cpp
Normal file
File diff suppressed because it is too large
Load diff
2078
curl/CHANGES
Normal file
2078
curl/CHANGES
Normal file
File diff suppressed because it is too large
Load diff
21
curl/COPYING
Normal file
21
curl/COPYING
Normal file
|
@ -0,0 +1,21 @@
|
|||
COPYRIGHT AND PERMISSION NOTICE
|
||||
|
||||
Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se>.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Permission to use, copy, modify, and distribute this software for any purpose
|
||||
with or without fee is hereby granted, provided that the above copyright
|
||||
notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN
|
||||
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of a copyright holder shall not
|
||||
be used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization of the copyright holder.
|
113
curl/Makefile.am
Normal file
113
curl/Makefile.am
Normal file
|
@ -0,0 +1,113 @@
|
|||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.49 2004/03/15 10:18:38 bagder Exp $
|
||||
###########################################################################
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist \
|
||||
curl-config.in curl-style.el sample.emacs testcurl.sh RELEASE-NOTES
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
|
||||
SUBDIRS = lib src
|
||||
DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
|
||||
|
||||
dist-hook:
|
||||
rm -rf $(top_builddir)/tests/log
|
||||
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||
(distit=`find $(srcdir) -name "*.dist"`; \
|
||||
for file in $$distit; do \
|
||||
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
||||
cp $$file $(distdir)$$strip; \
|
||||
done)
|
||||
|
||||
html:
|
||||
cd docs; make html
|
||||
|
||||
pdf:
|
||||
cd docs; make pdf
|
||||
|
||||
check: test
|
||||
|
||||
test:
|
||||
@(cd tests; $(MAKE) all quiet-test)
|
||||
|
||||
test-full:
|
||||
@(cd tests; $(MAKE) all full-test)
|
||||
|
||||
#
|
||||
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||
# must contain the following line:
|
||||
# %_topdir /home/loic/local/rpm
|
||||
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
|
||||
#
|
||||
# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
|
||||
#
|
||||
# If additional configure flags are needed to build the package, add the
|
||||
# following in ~/.rpmmacros
|
||||
# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
|
||||
# and run make rpm in the following way:
|
||||
# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
|
||||
#
|
||||
|
||||
rpms:
|
||||
$(MAKE) RPMDIST=curl rpm
|
||||
$(MAKE) RPMDIST=curl-ssl rpm
|
||||
|
||||
rpm:
|
||||
RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
|
||||
cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
|
||||
cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
|
||||
rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
|
||||
mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
|
||||
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
|
||||
|
||||
#
|
||||
# Build a Solaris pkkgadd format file
|
||||
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
|
||||
# file (which ends up back in this directory).
|
||||
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
|
||||
# pkgadd -d ./HAXXcurl-*
|
||||
#
|
||||
|
||||
# gak - libtool requires an absoulte directory, hence the pwd below...
|
||||
pkgadd:
|
||||
umask 022 ; \
|
||||
make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
|
||||
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
|
||||
cd $(srcdir)/packages/Solaris && $(MAKE) package
|
||||
|
||||
#
|
||||
# Build a cygwin binary tarball installation file
|
||||
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
|
||||
cygwinbin:
|
||||
$(MAKE) -C packages/Win32/cygwin cygwinbin
|
||||
|
||||
# We extend the standard install with a custom hook:
|
||||
install-data-hook:
|
||||
cd include && $(MAKE) install
|
||||
cd docs && $(MAKE) install
|
||||
|
||||
# We extend the standard uninstall with a custom hook:
|
||||
uninstall-hook:
|
||||
cd include && $(MAKE) uninstall
|
||||
cd docs && $(MAKE) uninstall
|
756
curl/Makefile.in
Normal file
756
curl/Makefile.in
Normal file
|
@ -0,0 +1,756 @@
|
|||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
# are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
#
|
||||
# You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
# copies of the Software, and permit persons to whom the Software is
|
||||
# furnished to do so, under the terms of the COPYING file.
|
||||
#
|
||||
# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
# KIND, either express or implied.
|
||||
#
|
||||
# $Id: Makefile.am,v 1.49 2004/03/15 10:18:38 bagder Exp $
|
||||
###########################################################################
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/curl-config.in \
|
||||
$(top_srcdir)/configure COPYING config.guess config.sub \
|
||||
depcomp install-sh ltmain.sh missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/lib/config.h \
|
||||
$(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES = curl-config
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
|
||||
CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
|
||||
CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
|
||||
CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
|
||||
CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
|
||||
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
|
||||
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_ARES = @HAVE_ARES@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
|
||||
HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
IPV6_ENABLED = @IPV6_ENABLED@
|
||||
KRB4_ENABLED = @KRB4_ENABLED@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANOPT = @MANOPT@
|
||||
MIMPURE_FALSE = @MIMPURE_FALSE@
|
||||
MIMPURE_TRUE = @MIMPURE_TRUE@
|
||||
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
|
||||
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
|
||||
NROFF = @NROFF@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_ENABLED = @OPENSSL_ENABLED@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKGADD_NAME = @PKGADD_NAME@
|
||||
PKGADD_PKG = @PKGADD_PKG@
|
||||
PKGADD_VENDOR = @PKGADD_VENDOR@
|
||||
PKGCONFIG = @PKGCONFIG@
|
||||
RANDOM_FILE = @RANDOM_FILE@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
|
||||
USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
VERSIONNUM = @VERSIONNUM@
|
||||
YACC = @YACC@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_AS = @ac_ct_AS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist \
|
||||
curl-config.in curl-style.el sample.emacs testcurl.sh RELEASE-NOTES
|
||||
|
||||
bin_SCRIPTS = curl-config
|
||||
SUBDIRS = lib src
|
||||
DIST_SUBDIRS = $(SUBDIRS) tests include packages docs
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
curl-config: $(top_builddir)/config.status $(srcdir)/curl-config.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binSCRIPTS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if (etags --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/packages/EPM $(distdir)/packages/Linux/RPM
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
$(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
$(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist dist-all: distdir
|
||||
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir); chmod a+w $(distdir)
|
||||
mkdir $(distdir)/_build
|
||||
mkdir $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& cd $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
|
||||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(SCRIPTS)
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-libtool clean-recursive \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-libtool distclean-recursive \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-binSCRIPTS install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
maintainer-clean-recursive mostlyclean mostlyclean-generic \
|
||||
mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
|
||||
tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-binSCRIPTS uninstall-info-am
|
||||
|
||||
|
||||
dist-hook:
|
||||
rm -rf $(top_builddir)/tests/log
|
||||
find $(distdir) -name "*.dist" -exec rm {} \;
|
||||
(distit=`find $(srcdir) -name "*.dist"`; \
|
||||
for file in $$distit; do \
|
||||
strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \
|
||||
cp $$file $(distdir)$$strip; \
|
||||
done)
|
||||
|
||||
html:
|
||||
cd docs; make html
|
||||
|
||||
pdf:
|
||||
cd docs; make pdf
|
||||
|
||||
check: test
|
||||
|
||||
test:
|
||||
@(cd tests; $(MAKE) all quiet-test)
|
||||
|
||||
test-full:
|
||||
@(cd tests; $(MAKE) all full-test)
|
||||
|
||||
#
|
||||
# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros
|
||||
# must contain the following line:
|
||||
# %_topdir /home/loic/local/rpm
|
||||
# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc.
|
||||
#
|
||||
# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS
|
||||
#
|
||||
# If additional configure flags are needed to build the package, add the
|
||||
# following in ~/.rpmmacros
|
||||
# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS}
|
||||
# and run make rpm in the following way:
|
||||
# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm
|
||||
#
|
||||
|
||||
rpms:
|
||||
$(MAKE) RPMDIST=curl rpm
|
||||
$(MAKE) RPMDIST=curl-ssl rpm
|
||||
|
||||
rpm:
|
||||
RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \
|
||||
cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \
|
||||
cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \
|
||||
rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \
|
||||
mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \
|
||||
mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm .
|
||||
|
||||
#
|
||||
# Build a Solaris pkkgadd format file
|
||||
# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format
|
||||
# file (which ends up back in this directory).
|
||||
# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do
|
||||
# pkgadd -d ./HAXXcurl-*
|
||||
#
|
||||
|
||||
# gak - libtool requires an absoulte directory, hence the pwd below...
|
||||
pkgadd:
|
||||
umask 022 ; \
|
||||
make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \
|
||||
cat COPYING > $(srcdir)/packages/Solaris/copyright ; \
|
||||
cd $(srcdir)/packages/Solaris && $(MAKE) package
|
||||
|
||||
#
|
||||
# Build a cygwin binary tarball installation file
|
||||
# resulting .tar.bz2 file will end up at packages/Win32/cygwin
|
||||
cygwinbin:
|
||||
$(MAKE) -C packages/Win32/cygwin cygwinbin
|
||||
|
||||
# We extend the standard install with a custom hook:
|
||||
install-data-hook:
|
||||
cd include && $(MAKE) install
|
||||
cd docs && $(MAKE) install
|
||||
|
||||
# We extend the standard uninstall with a custom hook:
|
||||
uninstall-hook:
|
||||
cd include && $(MAKE) uninstall
|
||||
cd docs && $(MAKE) uninstall
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
75
curl/README
Normal file
75
curl/README
Normal file
|
@ -0,0 +1,75 @@
|
|||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
README
|
||||
|
||||
Curl is a command line tool for transfering data specified with URL
|
||||
syntax. Find out how to use Curl by reading the curl.1 man page or the
|
||||
MANUAL document. Find out how to install Curl by reading the INSTALL
|
||||
document.
|
||||
|
||||
libcurl is the library curl is using to do its job. It is readily
|
||||
available to be used by your software. Read the libcurl.3 man page to
|
||||
learn how!
|
||||
|
||||
You find answers to the most frequent questions we get in the FAQ document.
|
||||
|
||||
Study the COPYING file for distribution terms and similar.
|
||||
|
||||
CONTACT
|
||||
|
||||
If you have problems, questions, ideas or suggestions, please contact us
|
||||
by posting to a suitable mailing list. See http://curl.haxx.se/mail/
|
||||
|
||||
Many major contributors to the project are listed in the THANKS document.
|
||||
|
||||
WEB SITE
|
||||
|
||||
Visit the curl web site or mirrors for the latest news:
|
||||
|
||||
Sweden -- http://curl.haxx.se/
|
||||
Australia -- http://curl.planetmirror.com/
|
||||
Estonia -- http://curl.dope-brothers.com/
|
||||
Germany -- http://curl.mirror.at.stealer.net/
|
||||
Russia -- http://curl.tsuren.net/
|
||||
Thailand -- http://curl.siamu.ac.th/
|
||||
US (CA) -- http://curl.mirror.redwire.net/
|
||||
|
||||
DOWNLOAD
|
||||
|
||||
The official download mirror sites are:
|
||||
|
||||
Australia -- http://curl.planetmirror.com/download/
|
||||
Estonia -- http://curl.dope-brothers.com/download/
|
||||
Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/
|
||||
Hongkong -- http://www.execve.net/curl/
|
||||
Russia -- http://curl.tsuren.net/download/
|
||||
Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/
|
||||
Sweden -- http://cool.haxx.se/curl/
|
||||
Thailand -- http://curl.siamu.ac.th/download/
|
||||
US (CA) -- http://curl.mirror.redwire.net/download/
|
||||
|
||||
CVS
|
||||
|
||||
To download the very latest source off the CVS server do this:
|
||||
|
||||
cvs -d :pserver:cvsread@cvs.php.net:/repository login
|
||||
|
||||
(enter "phpfi" when asked for password)
|
||||
|
||||
cvs -d :pserver:cvsread@cvs.php.net:/repository co curl
|
||||
|
||||
(you'll get a directory named curl created, filled with the source code)
|
||||
|
||||
cvs -d :pserver:cvsread@cvs.php.net:/repository logout
|
||||
|
||||
(you're off the hook!)
|
||||
|
||||
NOTICE
|
||||
|
||||
Curl contains pieces of source code that is Copyright (c) 1998, 1999
|
||||
Kungliga Tekniska Högskolan. This notice is included here to comply with the
|
||||
distribution terms.
|
89
curl/RELEASE-NOTES
Normal file
89
curl/RELEASE-NOTES
Normal file
|
@ -0,0 +1,89 @@
|
|||
Curl and libcurl 7.11.1. A bugfix release.
|
||||
|
||||
Public curl release number: 79
|
||||
Releases counted from the very beginning: 106
|
||||
Available command line options: 94
|
||||
Available curl_easy_setopt() options: 112
|
||||
|
||||
This release includes the following changes:
|
||||
|
||||
o CURLOPT_POSTFIELDSIZE_LARGE added to offer POSTs larger than 2GB
|
||||
o CURL_VERSION_LARGEFILE is a feature bit returned by libcurls that feature
|
||||
large file support
|
||||
o libcurl only requires winsock 1.1 on windows now
|
||||
o when doing FTP, curl now sends QUIT before disconnecting
|
||||
o name resolves can now timeout on windows too
|
||||
o $HOME is now recognized better when looking for .netrc files
|
||||
o now re-uses the ares handle when re-using curl handles
|
||||
o SO_BINDTODEVICE is used for network interface binding
|
||||
o configure --disable-manual disables the built-in huge manual from the
|
||||
command line tool
|
||||
o the default Accept: header used in HTTP requests changed
|
||||
o asynch dns lookups now require the c-ares library
|
||||
o curl --socks can be used to set a SOCKS5 proxy to use
|
||||
o response-headers received after a (proxy) CONNECT request are now passed
|
||||
to the header callback just like other headers
|
||||
|
||||
This release includes the following bugfixes:
|
||||
|
||||
o builds and runs on Novell NetWare
|
||||
o Windows builds now report OS as "i386-pc-win32"
|
||||
o received signals during SSL connect is handled better
|
||||
o improved PUT/POST with NTLM/Digest authentication
|
||||
o following redirects and doing NTLM/Digest (where the first connection gets
|
||||
closed) with the multi interface work better now
|
||||
o file: progress meter and getinfo variables work now
|
||||
o CURLOPT_FRESH_CONNECT and CURLAUTH_NTLM now work when set together
|
||||
o share interface usage without (un)lock functions segfaulted
|
||||
o --limit-rate no longer cripples the --speed-limit feature
|
||||
o fixed verbose output problem with ipv6-enabled re-used connections
|
||||
o fixed the socks5 code to check version in the socks response properly
|
||||
o dns cache bug - fixed the 'inuse' counter
|
||||
o large file fix for Content-Length
|
||||
o better docs for the share interface
|
||||
o several configure fixes for mingw/msys
|
||||
o setting a Host: header is no longer affecting the Host: header used when
|
||||
libcurl follows a Location:
|
||||
o fixed numerous compiler warnings on several operating systems and compilers
|
||||
o PUTing from stdin couldn't disable chunked transfer-encoding
|
||||
o corrected the mingw makefiles
|
||||
o improved the configure libz detection
|
||||
o fixed EPRT/PORT use when doing FTP on ipv6-enabled AIX hosts
|
||||
o *nroff commands that only support -mandoc and not -man are now supported
|
||||
(for the built-in manual text in the command line tool)
|
||||
o fixed the unconditional #include of config.h in hugehelp.c
|
||||
o builds fine on MPE/iX
|
||||
o upload using chunked transfer-encoding now sends the last chunk properly
|
||||
teriminated with an extra CRLF
|
||||
o Fixed the progress meter display for files >2GB
|
||||
o persistant connections over a proxy messed up the proxy name/password
|
||||
o the socks5 code segfaulted if no username/password was set
|
||||
o the *_LARGE options now take curl_off_t types as parameters and this will
|
||||
make it possible to handle large files on windows too
|
||||
o builds with large file support even on systems without strtoll()
|
||||
|
||||
Other curl-related news since the previous public release:
|
||||
|
||||
o Many platforms are being used to autobuild and autotest curl on a daily
|
||||
basis. Please join in and test curl on your systems:
|
||||
http://curl.haxx.se/auto/
|
||||
o the curl mailing lists moved, (re-)subscribe to the new ones from here:
|
||||
http://curl.haxx.se/mail/
|
||||
o c-ares 1.1.0 was relased: http://daniel.haxx.se/projects/c-ares/
|
||||
o TclCurl 0.11.0 was released:
|
||||
http://personal1.iddeo.es/andresgarci/tclcurl/english/
|
||||
o PycURL 7.11.0 was released: http://pycurl.sourceforge.net/
|
||||
o the libcurl D binding was released:
|
||||
http://www.atari-soldiers.com/libcurl.html
|
||||
o new Estonian web site mirror: http://curl.dope-brothers.com/
|
||||
|
||||
This release would not have looked like this without help, code, reports and
|
||||
advice from friends like these:
|
||||
|
||||
Gisle Vanem, Vincent Bronner, Richard Bramante, Dirk Manske, Dan Fandrich,
|
||||
Ken Hirsch, Stadler Stephan, Domenico Andreoli, Patrick Smith, Tor Arntsen,
|
||||
Andrés García, Tim Baker, Len Krause, Gilad, Ken Rastatter, P R Schaffner,
|
||||
Greg Hewgill, Ben Greear, Jeff Lawson, Grigory Entin, Doug Porter, David
|
||||
Byron, Andy Serpa, Joe Halpin, Christopher R. Palmer, Günter Knauf
|
||||
|
||||
Thanks! (and sorry if I forgot to mention someone)
|
592
curl/acinclude.m4
Normal file
592
curl/acinclude.m4
Normal file
|
@ -0,0 +1,592 @@
|
|||
dnl Check for how to set a socket to non-blocking state. There seems to exist
|
||||
dnl four known different ways, with the one used almost everywhere being POSIX
|
||||
dnl and XPG3, while the other different ways for different systems (old BSD,
|
||||
dnl Windows and Amiga).
|
||||
dnl
|
||||
dnl There are two known platforms (AIX 3.x and SunOS 4.1.x) where the
|
||||
dnl O_NONBLOCK define is found but does not work. This condition is attempted
|
||||
dnl to get caught in this script by using an excessive number of #ifdefs...
|
||||
dnl
|
||||
AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET],
|
||||
[
|
||||
AC_MSG_CHECKING([non-blocking sockets style])
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for O_NONBLOCK test */
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
],[
|
||||
/* try to compile O_NONBLOCK */
|
||||
|
||||
#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# if defined(__SVR4) || defined(__srv4__)
|
||||
# define PLATFORM_SOLARIS
|
||||
# else
|
||||
# define PLATFORM_SUNOS4
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4)
|
||||
# define PLATFORM_AIX_V3
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__)
|
||||
#error "O_NONBLOCK does not work on this platform"
|
||||
#endif
|
||||
int socket;
|
||||
int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK);
|
||||
],[
|
||||
dnl the O_NONBLOCK test was fine
|
||||
nonblock="O_NONBLOCK"
|
||||
AC_DEFINE(HAVE_O_NONBLOCK, 1, [use O_NONBLOCK for non-blocking sockets])
|
||||
],[
|
||||
dnl the code was bad, try a different program now, test 2
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for FIONBIO test */
|
||||
#include <unistd.h>
|
||||
#include <stropts.h>
|
||||
],[
|
||||
/* FIONBIO source test (old-style unix) */
|
||||
int socket;
|
||||
int flags = ioctl(socket, FIONBIO, &flags);
|
||||
],[
|
||||
dnl FIONBIO test was good
|
||||
nonblock="FIONBIO"
|
||||
AC_DEFINE(HAVE_FIONBIO, 1, [use FIONBIO for non-blocking sockets])
|
||||
],[
|
||||
dnl FIONBIO test was also bad
|
||||
dnl the code was bad, try a different program now, test 3
|
||||
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for ioctlsocket test (cygwin?) */
|
||||
#include <windows.h>
|
||||
],[
|
||||
/* ioctlsocket source code */
|
||||
int socket;
|
||||
int flags = ioctlsocket(socket, FIONBIO, &flags);
|
||||
],[
|
||||
dnl ioctlsocket test was good
|
||||
nonblock="ioctlsocket"
|
||||
AC_DEFINE(HAVE_IOCTLSOCKET, 1, [use ioctlsocket() for non-blocking sockets])
|
||||
],[
|
||||
dnl ioctlsocket didnt compile!, go to test 4
|
||||
|
||||
AC_TRY_LINK([
|
||||
/* headers for IoctlSocket test (Amiga?) */
|
||||
#include <sys/ioctl.h>
|
||||
],[
|
||||
/* IoctlSocket source code */
|
||||
int socket;
|
||||
int flags = IoctlSocket(socket, FIONBIO, (long)1);
|
||||
],[
|
||||
dnl ioctlsocket test was good
|
||||
nonblock="IoctlSocket"
|
||||
AC_DEFINE(HAVE_IOCTLSOCKET_CASE, 1, [use Ioctlsocket() for non-blocking sockets])
|
||||
],[
|
||||
dnl Ioctlsocket didnt compile, do test 5!
|
||||
AC_TRY_COMPILE([
|
||||
/* headers for SO_NONBLOCK test (BeOS) */
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
],[
|
||||
/* SO_NONBLOCK source code */
|
||||
long b = 1;
|
||||
int socket;
|
||||
int flags = setsockopt(socket, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
|
||||
],[
|
||||
dnl the SO_NONBLOCK test was good
|
||||
nonblock="SO_NONBLOCK"
|
||||
AC_DEFINE(HAVE_SO_NONBLOCK, 1, [use SO_NONBLOCK for non-blocking sockets])
|
||||
],[
|
||||
dnl test 5 didnt compile!
|
||||
nonblock="nada"
|
||||
AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1, [disabled non-blocking sockets])
|
||||
])
|
||||
dnl end of fifth test
|
||||
|
||||
])
|
||||
dnl end of forth test
|
||||
|
||||
])
|
||||
dnl end of third test
|
||||
|
||||
])
|
||||
dnl end of second test
|
||||
|
||||
])
|
||||
dnl end of non-blocking try-compile test
|
||||
AC_MSG_RESULT($nonblock)
|
||||
|
||||
if test "$nonblock" = "nada"; then
|
||||
AC_MSG_WARN([non-block sockets disabled])
|
||||
fi
|
||||
])
|
||||
|
||||
dnl Check for socklen_t: historically on BSD it is an int, and in
|
||||
dnl POSIX 1g it is a type of its own, but some platforms use different
|
||||
dnl types for the argument to getsockopt, getpeername, etc. So we
|
||||
dnl have to test to find something that will work.
|
||||
AC_DEFUN([TYPE_SOCKLEN_T],
|
||||
[
|
||||
AC_CHECK_TYPE([socklen_t], ,[
|
||||
AC_MSG_CHECKING([for socklen_t equivalent])
|
||||
AC_CACHE_VAL([curl_cv_socklen_t_equiv],
|
||||
[
|
||||
# Systems have either "struct sockaddr *" or
|
||||
# "void *" as the second argument to getpeername
|
||||
curl_cv_socklen_t_equiv=
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
int getpeername (int, $arg2 *, $t *);
|
||||
],[
|
||||
$t len;
|
||||
getpeername(0,0,&len);
|
||||
],[
|
||||
curl_cv_socklen_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
done
|
||||
|
||||
if test "x$curl_cv_socklen_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($curl_cv_socklen_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv,
|
||||
[type to use in place of socklen_t if not defined])],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
])
|
||||
|
||||
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
||||
dnl and a few other things. If not found, we set it to unsigned int, as even
|
||||
dnl 64-bit implementations use to set it to a 32-bit type.
|
||||
AC_DEFUN([TYPE_IN_ADDR_T],
|
||||
[
|
||||
AC_CHECK_TYPE([in_addr_t], ,[
|
||||
AC_MSG_CHECKING([for in_addr_t equivalent])
|
||||
AC_CACHE_VAL([curl_cv_in_addr_t_equiv],
|
||||
[
|
||||
curl_cv_in_addr_t_equiv=
|
||||
for t in "unsigned long" int size_t unsigned long; do
|
||||
AC_TRY_COMPILE([
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
],[
|
||||
$t data = inet_addr ("1.2.3.4");
|
||||
],[
|
||||
curl_cv_in_addr_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
|
||||
if test "x$curl_cv_in_addr_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||
[type to use in place of in_addr_t if not defined])],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>])
|
||||
])
|
||||
|
||||
dnl ************************************************************
|
||||
dnl check for "localhost", if it doesn't exist, we can't do the
|
||||
dnl gethostbyname_r tests!
|
||||
dnl
|
||||
|
||||
AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[
|
||||
AC_MSG_CHECKING([if "localhost" resolves])
|
||||
AC_TRY_RUN([
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
|
||||
int
|
||||
main () {
|
||||
struct hostent *h;
|
||||
h = gethostbyname("localhost");
|
||||
exit (h == NULL ? 1 : 0); }],[
|
||||
AC_MSG_RESULT(yes)],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([can't figure out gethostbyname_r() since localhost doesn't resolve])
|
||||
|
||||
]
|
||||
)
|
||||
])
|
||||
|
||||
dnl ************************************************************
|
||||
dnl check for working getaddrinfo()
|
||||
dnl
|
||||
AC_DEFUN([CURL_CHECK_WORKING_GETADDRINFO],[
|
||||
AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[
|
||||
AC_TRY_RUN( [
|
||||
#include <netdb.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
void main(void) {
|
||||
struct addrinfo hints, *ai;
|
||||
int error;
|
||||
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
error = getaddrinfo("127.0.0.1", "8080", &hints, &ai);
|
||||
if (error) {
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
],[
|
||||
ac_cv_working_getaddrinfo="yes"
|
||||
],[
|
||||
ac_cv_working_getaddrinfo="no"
|
||||
],[
|
||||
ac_cv_working_getaddrinfo="yes"
|
||||
])])
|
||||
if test "$ac_cv_working_getaddrinfo" = "yes"; then
|
||||
AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works])
|
||||
AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
|
||||
|
||||
IPV6_ENABLED=1
|
||||
AC_SUBST(IPV6_ENABLED)
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([CURL_CHECK_LOCALTIME_R],
|
||||
[
|
||||
dnl check for a few thread-safe functions
|
||||
AC_CHECK_FUNCS(localtime_r,[
|
||||
AC_MSG_CHECKING(whether localtime_r is declared)
|
||||
AC_EGREP_CPP(localtime_r,[
|
||||
#include <time.h>],[
|
||||
AC_MSG_RESULT(yes)],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(whether localtime_r with -D_REENTRANT is declared)
|
||||
AC_EGREP_CPP(localtime_r,[
|
||||
#define _REENTRANT
|
||||
#include <time.h>],[
|
||||
AC_DEFINE(NEED_REENTRANT)
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))])])
|
||||
])
|
||||
|
||||
AC_DEFUN([CURL_CHECK_INET_NTOA_R],
|
||||
[
|
||||
dnl determine if function definition for inet_ntoa_r exists.
|
||||
AC_CHECK_FUNCS(inet_ntoa_r,[
|
||||
AC_MSG_CHECKING(whether inet_ntoa_r is declared)
|
||||
AC_EGREP_CPP(inet_ntoa_r,[
|
||||
#include <arpa/inet.h>],[
|
||||
AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
|
||||
AC_MSG_RESULT(yes)],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(whether inet_ntoa_r with -D_REENTRANT is declared)
|
||||
AC_EGREP_CPP(inet_ntoa_r,[
|
||||
#define _REENTRANT
|
||||
#include <arpa/inet.h>],[
|
||||
AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared])
|
||||
AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT defined])
|
||||
AC_MSG_RESULT(yes)],
|
||||
AC_MSG_RESULT(no))])])
|
||||
])
|
||||
|
||||
AC_DEFUN([CURL_CHECK_GETHOSTBYADDR_R],
|
||||
[
|
||||
dnl check for number of arguments to gethostbyaddr_r. it might take
|
||||
dnl either 5, 7, or 8 arguments.
|
||||
AC_CHECK_FUNCS(gethostbyaddr_r,[
|
||||
AC_MSG_CHECKING(if gethostbyaddr_r takes 5 arguments)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>],[
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
struct hostent_data hdata;
|
||||
int rc;
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
|
||||
ac_cv_gethostbyaddr_args=5],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(if gethostbyaddr_r with -D_REENTRANT takes 5 arguments)
|
||||
AC_TRY_COMPILE([
|
||||
#define _REENTRANT
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>],[
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
struct hostent_data hdata;
|
||||
int rc;
|
||||
rc = gethostbyaddr_r(address, length, type, &h, &hdata);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args])
|
||||
AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT])
|
||||
ac_cv_gethostbyaddr_args=5],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(if gethostbyaddr_r takes 7 arguments)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>],[
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
|
||||
hp = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &h_errnop);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1, [gethostbyaddr_r() takes 7 args] )
|
||||
ac_cv_gethostbyaddr_args=7],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING(if gethostbyaddr_r takes 8 arguments)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>],[
|
||||
char * address;
|
||||
int length;
|
||||
int type;
|
||||
struct hostent h;
|
||||
char buffer[8192];
|
||||
int h_errnop;
|
||||
struct hostent * hp;
|
||||
int rc;
|
||||
|
||||
rc = gethostbyaddr_r(address, length, type, &h,
|
||||
buffer, 8192, &hp, &h_errnop);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1, [gethostbyaddr_r() takes 8 args])
|
||||
ac_cv_gethostbyaddr_args=8],[
|
||||
AC_MSG_RESULT(no)
|
||||
have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"])])])])])
|
||||
])
|
||||
|
||||
AC_DEFUN([CURL_CHECK_GETHOSTBYNAME_R],
|
||||
[
|
||||
dnl check for number of arguments to gethostbyname_r. it might take
|
||||
dnl either 3, 5, or 6 arguments.
|
||||
AC_CHECK_FUNCS(gethostbyname_r,[
|
||||
AC_MSG_CHECKING([if gethostbyname_r takes 3 arguments])
|
||||
AC_TRY_COMPILE([
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
gethostbyname_r(const char *, struct hostent *, struct hostent_data *);],[
|
||||
struct hostent_data data;
|
||||
gethostbyname_r(NULL, NULL, NULL);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args])
|
||||
ac_cv_gethostbyname_args=3],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([if gethostbyname_r with -D_REENTRANT takes 3 arguments])
|
||||
AC_TRY_COMPILE([
|
||||
#define _REENTRANT
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
gethostbyname_r(const char *,struct hostent *, struct hostent_data *);],[
|
||||
struct hostent_data data;
|
||||
gethostbyname_r(NULL, NULL, NULL);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args])
|
||||
AC_DEFINE(NEED_REENTRANT, 1, [needs REENTRANT])
|
||||
ac_cv_gethostbyname_args=3],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([if gethostbyname_r takes 5 arguments])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
struct hostent *
|
||||
gethostbyname_r(const char *, struct hostent *, char *, int, int *);],[
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_5, 1, [gethostbyname_r() takes 5 args])
|
||||
ac_cv_gethostbyname_args=5],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([if gethostbyname_r takes 6 arguments])
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <netdb.h>
|
||||
#undef NULL
|
||||
#define NULL (void *)0
|
||||
|
||||
int
|
||||
gethostbyname_r(const char *, struct hostent *, char *, size_t,
|
||||
struct hostent **, int *);],[
|
||||
gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);],[
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GETHOSTBYNAME_R_6, 1, [gethostbyname_r() takes 6 args])
|
||||
ac_cv_gethostbyname_args=6],[
|
||||
AC_MSG_RESULT(no)
|
||||
have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r"],
|
||||
[ac_cv_gethostbyname_args=0])],
|
||||
[ac_cv_gethostbyname_args=0])],
|
||||
[ac_cv_gethostbyname_args=0])],
|
||||
[ac_cv_gethostbyname_args=0])])
|
||||
|
||||
if test "$ac_cv_func_gethostbyname_r" = "yes"; then
|
||||
if test "$ac_cv_gethostbyname_args" = "0"; then
|
||||
dnl there's a gethostbyname_r() function, but we don't know how
|
||||
dnl many arguments it wants!
|
||||
AC_MSG_ERROR([couldn't figure out how to use gethostbyname_r()])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl We create a function for detecting which compiler we use and then set as
|
||||
dnl pendantic compiler options as possible for that particular compiler. The
|
||||
dnl options are only used for debug-builds.
|
||||
|
||||
AC_DEFUN([CURL_CC_DEBUG_OPTS],
|
||||
[
|
||||
if test "$GCC" = "yes"; then
|
||||
|
||||
dnl figure out gcc version!
|
||||
AC_MSG_CHECKING([gcc version])
|
||||
gccver=`$CC -dumpversion`
|
||||
num1=`echo $gccver | cut -d . -f1`
|
||||
num2=`echo $gccver | cut -d . -f2`
|
||||
gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null`
|
||||
AC_MSG_RESULT($gccver)
|
||||
|
||||
AC_MSG_CHECKING([if this is icc in disguise])
|
||||
AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER],
|
||||
dnl action if the text is found, this it has not been replaced by the
|
||||
dnl cpp
|
||||
ICC="no"
|
||||
AC_MSG_RESULT([no]),
|
||||
dnl the text was not found, it was replaced by the cpp
|
||||
ICC="yes"
|
||||
AC_MSG_RESULT([yes])
|
||||
)
|
||||
|
||||
if test "$ICC" = "yes"; then
|
||||
dnl this is icc, not gcc.
|
||||
|
||||
dnl ICC warnings we ignore:
|
||||
dnl * 269 warns on our "%Od" printf formatters for curl_off_t output:
|
||||
dnl "invalid format string conversion"
|
||||
dnl * 279 warns on static conditions in while expressions
|
||||
dnl * 981 warns on "operands are evaluated in unspecified order"
|
||||
dnl * 1419 warns on "external declaration in primary source file"
|
||||
dnl which we know and do on purpose.
|
||||
|
||||
WARN="-wd279,269,1419,981"
|
||||
|
||||
if test "$gccnum" -gt "600"; then
|
||||
dnl icc 6.0 and older doesn't have the -Wall flag
|
||||
WARN="-Wall $WARN"
|
||||
fi
|
||||
else dnl $ICC = yes
|
||||
dnl this is a set of options we believe *ALL* gcc versions support:
|
||||
WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wpointer-arith -Wnested-externs -Winline -Wmissing-declarations -Wmissing-prototypes -Wsign-compare"
|
||||
|
||||
dnl -Wcast-align is a bit too annoying on all gcc versions ;-)
|
||||
|
||||
if test "$gccnum" -gt "295"; then
|
||||
dnl only if the compiler is newer than 2.95 since we got lots of
|
||||
dnl "`_POSIX_C_SOURCE' is not defined" in system headers with
|
||||
dnl gcc 2.95.4 on FreeBSD 4.9!
|
||||
WARN="$WARN -Wundef"
|
||||
fi
|
||||
|
||||
if test "$gccnum" -ge "296"; then
|
||||
dnl gcc 2.96 or later
|
||||
WARN="$WARN -Wfloat-equal"
|
||||
fi
|
||||
|
||||
if test "$gccnum" -gt "296"; then
|
||||
dnl this option does not exist in 2.96
|
||||
WARN="$WARN -Wno-format-nonliteral"
|
||||
fi
|
||||
|
||||
dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
|
||||
dnl on i686-Linux as it gives us heaps with false positives
|
||||
if test "$gccnum" -ge "303"; then
|
||||
dnl gcc 3.3 and later
|
||||
WARN="$WARN -Wendif-labels -Wstrict-prototypes"
|
||||
fi
|
||||
|
||||
for flag in $CPPFLAGS; do
|
||||
case "$flag" in
|
||||
-I*)
|
||||
dnl Include path, provide a -isystem option for the same dir
|
||||
dnl to prevent warnings in those dirs. The -isystem was not very
|
||||
dnl reliable on earlier gcc versions.
|
||||
add=`echo $flag | sed 's/^-I/-isystem /g'`
|
||||
WARN="$WARN $add"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
fi dnl $ICC = no
|
||||
|
||||
CFLAGS="$CFLAGS $WARN"
|
||||
|
||||
AC_MSG_NOTICE([Added this set of compiler options: $WARN])
|
||||
|
||||
else dnl $GCC = yes
|
||||
|
||||
AC_MSG_NOTICE([Added no extra compiler options])
|
||||
|
||||
fi dnl $GCC = yes
|
||||
|
||||
dnl strip off optimizer flags
|
||||
NEWFLAGS=""
|
||||
for flag in $CFLAGS; do
|
||||
case "$flag" in
|
||||
-O*)
|
||||
dnl echo "cut off $flag"
|
||||
;;
|
||||
*)
|
||||
NEWFLAGS="$NEWFLAGS $flag"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
CFLAGS=$NEWFLAGS
|
||||
|
||||
]) dnl end of AC_DEFUN()
|
||||
|
6876
curl/aclocal.m4
vendored
Normal file
6876
curl/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
1435
curl/config.guess
vendored
Normal file
1435
curl/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load diff
1537
curl/config.sub
vendored
Normal file
1537
curl/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load diff
31052
curl/configure
vendored
Normal file
31052
curl/configure
vendored
Normal file
File diff suppressed because it is too large
Load diff
1274
curl/configure.ac
Normal file
1274
curl/configure.ac
Normal file
File diff suppressed because it is too large
Load diff
133
curl/curl-config.in
Normal file
133
curl/curl-config.in
Normal file
|
@ -0,0 +1,133 @@
|
|||
#! /bin/sh
|
||||
#
|
||||
# The idea to this kind of setup info script was stolen from numerous
|
||||
# other packages, such as neon, libxml and gnome.
|
||||
#
|
||||
# $Id: curl-config.in,v 1.18 2003/12/08 10:00:21 bagder Exp $
|
||||
#
|
||||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
includedir=@includedir@
|
||||
|
||||
usage()
|
||||
{
|
||||
cat <<EOF
|
||||
Usage: curl-config [OPTION]
|
||||
|
||||
Available values for OPTION include:
|
||||
|
||||
--ca ca bundle install path
|
||||
--cc compiler
|
||||
--cflags pre-processor and compiler flags
|
||||
--feature newline separated list of enabled features
|
||||
--help display this help and exit
|
||||
--libs library linking information
|
||||
--prefix curl install prefix
|
||||
--version output version information
|
||||
--vernum output the version information as a number (hexadecimal)
|
||||
EOF
|
||||
|
||||
exit $1
|
||||
}
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage 1
|
||||
fi
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
# this deals with options in the style
|
||||
# --option=value and extracts the value part
|
||||
# [not currently used]
|
||||
-*=*) value=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) value= ;;
|
||||
esac
|
||||
|
||||
case "$1" in
|
||||
--ca)
|
||||
echo @CURL_CA_BUNDLE@
|
||||
;;
|
||||
|
||||
--cc)
|
||||
echo @CC@
|
||||
;;
|
||||
|
||||
--prefix)
|
||||
echo $prefix
|
||||
;;
|
||||
|
||||
--feature)
|
||||
if test "@OPENSSL_ENABLED@" = "1"; then
|
||||
echo "SSL"
|
||||
fi
|
||||
if test "@KRB4_ENABLED@" = "1"; then
|
||||
echo "KRB4"
|
||||
fi
|
||||
if test "@IPV6_ENABLED@" = "1"; then
|
||||
echo "IPv6"
|
||||
fi
|
||||
if test "@HAVE_LIBZ@" = "1"; then
|
||||
echo "libz"
|
||||
fi
|
||||
if test "@CURL_DISABLE_HTTP@" = "1"; then
|
||||
echo "HTTP-disabled"
|
||||
fi
|
||||
if test "@CURL_DISABLE_FTP@" = "1"; then
|
||||
echo "FTP-disabled"
|
||||
fi
|
||||
if test "@CURL_DISABLE_GOPHER@" = "1"; then
|
||||
echo "GOPHER-disabled"
|
||||
fi
|
||||
if test "@CURL_DISABLE_FILE@" = "1"; then
|
||||
echo "FILE-disabled"
|
||||
fi
|
||||
if test "@CURL_DISABLE_TELNET@" = "1"; then
|
||||
echo "TELNET-disabled"
|
||||
fi
|
||||
if test "@CURL_DISABLE_LDAP@" = "1"; then
|
||||
echo "LDAP-disabled"
|
||||
fi
|
||||
if test "@CURL_DISABLE_DICT@" = "1"; then
|
||||
echo "DICT-disabled"
|
||||
fi
|
||||
if test "@HAVE_ARES@" = "1"; then
|
||||
echo "AsynchDNS"
|
||||
fi
|
||||
;;
|
||||
|
||||
--version)
|
||||
echo libcurl @VERSION@
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--vernum)
|
||||
echo @VERSIONNUM@
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--help)
|
||||
usage 0
|
||||
;;
|
||||
|
||||
--cflags)
|
||||
if test "X@includedir@" = "X/usr/include"; then
|
||||
echo ""
|
||||
else
|
||||
echo "-I@includedir@"
|
||||
fi
|
||||
;;
|
||||
|
||||
--libs)
|
||||
echo -L@libdir@ -lcurl @LDFLAGS@ @LIBS@
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "unknown option: $1"
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
exit 0
|
50
curl/curl-style.el
Normal file
50
curl/curl-style.el
Normal file
|
@ -0,0 +1,50 @@
|
|||
;;;; Emacs Lisp help for writing curl code. ;;;;
|
||||
;;;; $Id: curl-style.el,v 1.7 2004/03/09 22:55:47 bagder Exp $
|
||||
|
||||
;;; The curl hacker's C conventions.
|
||||
|
||||
;;; After loading this file and added the mode-hook you can in C
|
||||
;;; files, put something like this to use the curl style
|
||||
;;; automatically:
|
||||
;;
|
||||
;; /* -----------------------------------------------------------------
|
||||
;; * local variables:
|
||||
;; * eval: (set c-file-style "curl")
|
||||
;; * end:
|
||||
;; */
|
||||
;;
|
||||
|
||||
(defconst curl-c-style
|
||||
'((c-basic-offset . 2)
|
||||
(c-comment-only-line-offset . 0)
|
||||
(c-hanging-braces-alist . ((substatement-open before after)))
|
||||
(c-offsets-alist . ((topmost-intro . 0)
|
||||
(topmost-intro-cont . 0)
|
||||
(substatement . +)
|
||||
(substatement-open . 0)
|
||||
(statement-case-intro . +)
|
||||
(statement-case-open . 0)
|
||||
(case-label . 0)
|
||||
))
|
||||
)
|
||||
"Curl C Programming Style")
|
||||
|
||||
;; Customizations for all of c-mode, c++-mode, and objc-mode
|
||||
(defun curl-c-mode-common-hook ()
|
||||
"Curl C mode hook"
|
||||
;; add curl style and set it for the current buffer
|
||||
(c-add-style "curl" curl-c-style t)
|
||||
(setq tab-width 8
|
||||
indent-tabs-mode nil ; Use spaces. Not tabs.
|
||||
comment-column 40
|
||||
c-font-lock-extra-types (append '("bool" "CURL" "CURLcode" "ssize_t" "size_t" "socklen_t" "fd_set" "time_t" "curl_off_t" "curl_socket_t"))
|
||||
)
|
||||
;; keybindings for C, C++, and Objective-C. We can put these in
|
||||
;; c-mode-base-map because of inheritance ...
|
||||
(define-key c-mode-base-map "\M-q" 'c-fill-paragraph)
|
||||
(setq c-recognize-knr-p nil)
|
||||
)
|
||||
|
||||
;; Set this is in your .emacs if you want to use the c-mode-hook as
|
||||
;; defined here right out of the box.
|
||||
; (add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)
|
479
curl/depcomp
Normal file
479
curl/depcomp
Normal file
|
@ -0,0 +1,479 @@
|
|||
#! /bin/sh
|
||||
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
# Copyright 1999, 2000, 2003 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
# `libtool' can also be set to `yes' or `no'.
|
||||
|
||||
if test -z "$depfile"; then
|
||||
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
|
||||
dir=`echo "$object" | sed 's,/.*$,/,'`
|
||||
if test "$dir" = "$object"; then
|
||||
dir=
|
||||
fi
|
||||
# FIXME: should be _deps on DOS.
|
||||
depfile="$dir.deps/$base"
|
||||
fi
|
||||
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1="$dir.libs/$base.lo.d"
|
||||
tmpdepfile2="$dir.libs/$base.d"
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1="$dir$base.o.d"
|
||||
tmpdepfile2="$dir$base.d"
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile1"; then
|
||||
tmpdepfile="$tmpdepfile1"
|
||||
else
|
||||
tmpdepfile="$tmpdepfile2"
|
||||
fi
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
5
curl/include/Makefile.am
Normal file
5
curl/include/Makefile.am
Normal file
|
@ -0,0 +1,5 @@
|
|||
SUBDIRS = curl
|
||||
|
||||
EXTRA_DIST = README
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
495
curl/include/Makefile.in
Normal file
495
curl/include/Makefile.in
Normal file
|
@ -0,0 +1,495 @@
|
|||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = include
|
||||
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/lib/config.h \
|
||||
$(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
depcomp =
|
||||
am__depfiles_maybe =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
|
||||
CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
|
||||
CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
|
||||
CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
|
||||
CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
|
||||
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
|
||||
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_ARES = @HAVE_ARES@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
|
||||
HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
IPV6_ENABLED = @IPV6_ENABLED@
|
||||
KRB4_ENABLED = @KRB4_ENABLED@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANOPT = @MANOPT@
|
||||
MIMPURE_FALSE = @MIMPURE_FALSE@
|
||||
MIMPURE_TRUE = @MIMPURE_TRUE@
|
||||
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
|
||||
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
|
||||
NROFF = @NROFF@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_ENABLED = @OPENSSL_ENABLED@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKGADD_NAME = @PKGADD_NAME@
|
||||
PKGADD_PKG = @PKGADD_PKG@
|
||||
PKGADD_VENDOR = @PKGADD_VENDOR@
|
||||
PKGCONFIG = @PKGCONFIG@
|
||||
RANDOM_FILE = @RANDOM_FILE@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
|
||||
USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
VERSIONNUM = @VERSIONNUM@
|
||||
YACC = @YACC@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_AS = @ac_ct_AS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
SUBDIRS = curl
|
||||
EXTRA_DIST = README
|
||||
AUTOMAKE_OPTIONS = foreign no-dependencies
|
||||
all: all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign include/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
$(RECURSIVE_TARGETS):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
dot_seen=no; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
rev=''; for subdir in $$list; do \
|
||||
if test "$$subdir" = "."; then :; else \
|
||||
rev="$$subdir $$rev"; \
|
||||
fi; \
|
||||
done; \
|
||||
rev="$$rev ."; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
ctags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if (etags --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| mkdir "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
(cd $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="../$(top_distdir)" \
|
||||
distdir="../$(distdir)/$$subdir" \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
|
||||
clean clean-generic clean-libtool clean-recursive ctags \
|
||||
ctags-recursive distclean distclean-generic distclean-libtool \
|
||||
distclean-recursive distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool \
|
||||
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
|
||||
uninstall uninstall-am uninstall-info-am
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
38
curl/include/README
Normal file
38
curl/include/README
Normal file
|
@ -0,0 +1,38 @@
|
|||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
Include files for libcurl, external users.
|
||||
|
||||
They're all placed in the curl subdirectory here for better fit in any kind
|
||||
of environment. You should include files from here using...
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
... style and point the compiler's include path to the directory holding the
|
||||
curl subdirectory. It makes it more likely to survive future modifications.
|
||||
|
||||
NOTE FOR LIBCURL HACKERS
|
||||
|
||||
All the include files in this tree are written and intended to be installed on
|
||||
a system that may serve multiple platforms and multiple applications, all
|
||||
using libcurl (possibly even different libcurl installations using different
|
||||
versions). Therefore, all header files in here must obey these rules:
|
||||
|
||||
* They cannot depend on or use configure-generated results from libcurl's or
|
||||
curl's directories. Other applications may not run configure as (lib)curl
|
||||
does, and using platform dependent info here may break other platforms.
|
||||
|
||||
* We cannot assume anything else but very basic compiler features being
|
||||
present. While libcurl requires an ANSI C compiler to build, some of the
|
||||
earlier ANSI compilers clearly can't deal with some preprocessor operators.
|
||||
|
||||
* Newlines must remain unix-style for older compilers' sake.
|
||||
|
||||
* Comments must be written in the old-style /* unnested C-fashion */
|
||||
|
||||
To figure out how to do good and portable checks for features, operating
|
||||
systems or specific hardwarare, a very good resource is Bjorn Reese's
|
||||
collection at http://predef.sf.net/
|
8
curl/include/curl/Makefile.am
Normal file
8
curl/include/curl/Makefile.am
Normal file
|
@ -0,0 +1,8 @@
|
|||
pkginclude_HEADERS = \
|
||||
curl.h \
|
||||
easy.h \
|
||||
mprintf.h \
|
||||
stdcheaders.h \
|
||||
types.h \
|
||||
multi.h
|
||||
pkgincludedir= $(includedir)/curl
|
429
curl/include/curl/Makefile.in
Normal file
429
curl/include/curl/Makefile.in
Normal file
|
@ -0,0 +1,429 @@
|
|||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = include/curl
|
||||
DIST_COMMON = $(pkginclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = $(top_builddir)/lib/config.h \
|
||||
$(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__installdirs = "$(DESTDIR)$(pkgincludedir)"
|
||||
pkgincludeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(pkginclude_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkgincludedir = $(includedir)/curl
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
|
||||
CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
|
||||
CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
|
||||
CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
|
||||
CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
|
||||
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
|
||||
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_ARES = @HAVE_ARES@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
|
||||
HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
IPV6_ENABLED = @IPV6_ENABLED@
|
||||
KRB4_ENABLED = @KRB4_ENABLED@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANOPT = @MANOPT@
|
||||
MIMPURE_FALSE = @MIMPURE_FALSE@
|
||||
MIMPURE_TRUE = @MIMPURE_TRUE@
|
||||
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
|
||||
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
|
||||
NROFF = @NROFF@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_ENABLED = @OPENSSL_ENABLED@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKGADD_NAME = @PKGADD_NAME@
|
||||
PKGADD_PKG = @PKGADD_PKG@
|
||||
PKGADD_VENDOR = @PKGADD_VENDOR@
|
||||
PKGCONFIG = @PKGCONFIG@
|
||||
RANDOM_FILE = @RANDOM_FILE@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
|
||||
USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
|
||||
VERSION = @VERSION@
|
||||
VERSIONNUM = @VERSIONNUM@
|
||||
YACC = @YACC@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_AS = @ac_ct_AS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
pkginclude_HEADERS = \
|
||||
curl.h \
|
||||
easy.h \
|
||||
mprintf.h \
|
||||
stdcheaders.h \
|
||||
types.h \
|
||||
multi.h
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/curl/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign include/curl/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(pkgincludedir)" || $(mkdir_p) "$(DESTDIR)$(pkgincludedir)"
|
||||
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(pkgincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
$(pkgincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkginclude_HEADERS)'; for p in $$list; do \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " rm -f '$(DESTDIR)$(pkgincludedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(pkgincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(pkgincludedir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-libtool \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pkgincludeHEADERS
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-pkgincludeHEADERS
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool ctags distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-pkgincludeHEADERS \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-pkgincludeHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
1282
curl/include/curl/curl.h
Normal file
1282
curl/include/curl/curl.h
Normal file
File diff suppressed because it is too large
Load diff
68
curl/include/curl/easy.h
Normal file
68
curl/include/curl/easy.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
#ifndef __CURL_EASY_H
|
||||
#define __CURL_EASY_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: easy.h,v 1.9 2004/01/07 09:19:34 bagder Exp $
|
||||
***************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
CURL *curl_easy_init(void);
|
||||
CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
|
||||
CURLcode curl_easy_perform(CURL *curl);
|
||||
void curl_easy_cleanup(CURL *curl);
|
||||
|
||||
/*
|
||||
* NAME curl_easy_getinfo()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Request internal information from the curl session with this function. The
|
||||
* third argument MUST be a pointer to a long, a pointer to a char * or a
|
||||
* pointer to a double (as the documentation describes elsewhere). The data
|
||||
* pointed to will be filled in accordingly and can be relied upon only if the
|
||||
* function returns CURLE_OK. This function is intended to get used *AFTER* a
|
||||
* performed transfer, all results from this function are undefined until the
|
||||
* transfer is completed.
|
||||
*/
|
||||
CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
|
||||
|
||||
|
||||
/*
|
||||
* NAME curl_easy_duphandle()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Creates a new curl session handle with the same options set for the handle
|
||||
* passed in. Duplicating a handle could only be a matter of cloning data and
|
||||
* options, internal state info and things like persistant connections cannot
|
||||
* be transfered. It is useful in multithreaded applications when you can run
|
||||
* curl_easy_duphandle() for each new thread to avoid a series of identical
|
||||
* curl_easy_setopt() invokes in every thread.
|
||||
*/
|
||||
CURL* curl_easy_duphandle(CURL *curl);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
54
curl/include/curl/mprintf.h
Normal file
54
curl/include/curl/mprintf.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: mprintf.h,v 1.8 2004/01/07 09:19:34 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef H_MPRINTF
|
||||
#define H_MPRINTF
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h> /* needed for FILE */
|
||||
|
||||
int curl_mprintf(const char *format, ...);
|
||||
int curl_mfprintf(FILE *fd, const char *format, ...);
|
||||
int curl_msprintf(char *buffer, const char *format, ...);
|
||||
int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...);
|
||||
int curl_mvprintf(const char *format, va_list args);
|
||||
int curl_mvfprintf(FILE *fd, const char *format, va_list args);
|
||||
int curl_mvsprintf(char *buffer, const char *format, va_list args);
|
||||
int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args);
|
||||
char *curl_maprintf(const char *format, ...);
|
||||
char *curl_mvaprintf(const char *format, va_list args);
|
||||
|
||||
#ifdef _MPRINTF_REPLACE
|
||||
# define printf curl_mprintf
|
||||
# define fprintf curl_mfprintf
|
||||
# define sprintf curl_msprintf
|
||||
# define snprintf curl_msnprintf
|
||||
# define vprintf curl_mvprintf
|
||||
# define vfprintf curl_mvfprintf
|
||||
# define vsprintf curl_mvsprintf
|
||||
# define vsnprintf curl_mvsnprintf
|
||||
# define aprintf curl_maprintf
|
||||
# define vaprintf curl_mvaprintf
|
||||
#endif
|
||||
|
||||
#endif /* H_MPRINTF */
|
210
curl/include/curl/multi.h
Normal file
210
curl/include/curl/multi.h
Normal file
|
@ -0,0 +1,210 @@
|
|||
#ifndef __CURL_MULTI_H
|
||||
#define __CURL_MULTI_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: multi.h,v 1.17 2004/03/17 12:46:45 bagder Exp $
|
||||
***************************************************************************/
|
||||
/*
|
||||
This is meant to be the "external" header file. Don't give away any
|
||||
internals here!
|
||||
|
||||
This document presents a mixture of ideas from at least:
|
||||
- Daniel Stenberg
|
||||
- Steve Dekorte
|
||||
- Sterling Hughes
|
||||
- Ben Greear
|
||||
|
||||
-------------------------------------------
|
||||
GOALS
|
||||
|
||||
o Enable a "pull" interface. The application that uses libcurl decides where
|
||||
and when to ask libcurl to get/send data.
|
||||
|
||||
o Enable multiple simultaneous transfers in the same thread without making it
|
||||
complicated for the application.
|
||||
|
||||
o Enable the application to select() on its own file descriptors and curl's
|
||||
file descriptors simultaneous easily.
|
||||
|
||||
*/
|
||||
#if defined(_WIN32) && !defined(WIN32)
|
||||
/* Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we
|
||||
make this adjustment to catch this. */
|
||||
#define WIN32 1
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
|
||||
/* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish
|
||||
libc5-based Linux systems. Only include it on system that are known to
|
||||
require it! */
|
||||
#if defined(_AIX) || defined(NETWARE)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "curl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void CURLM;
|
||||
|
||||
typedef enum {
|
||||
CURLM_CALL_MULTI_PERFORM=-1, /* please call curl_multi_perform() soon */
|
||||
CURLM_OK,
|
||||
CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */
|
||||
CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */
|
||||
CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */
|
||||
CURLM_INTERNAL_ERROR, /* this is a libcurl bug */
|
||||
CURLM_LAST
|
||||
} CURLMcode;
|
||||
|
||||
typedef enum {
|
||||
CURLMSG_NONE, /* first, not used */
|
||||
CURLMSG_DONE, /* This easy handle has completed. 'result' contains
|
||||
the CURLcode of the transfer */
|
||||
CURLMSG_LAST /* last, not used */
|
||||
} CURLMSG;
|
||||
|
||||
struct CURLMsg {
|
||||
CURLMSG msg; /* what this message means */
|
||||
CURL *easy_handle; /* the handle it concerns */
|
||||
union {
|
||||
void *whatever; /* message-specific data */
|
||||
CURLcode result; /* return code for transfer */
|
||||
} data;
|
||||
};
|
||||
typedef struct CURLMsg CURLMsg;
|
||||
|
||||
/*
|
||||
* Name: curl_multi_init()
|
||||
*
|
||||
* Desc: inititalize multi-style curl usage
|
||||
* Returns: a new CURLM handle to use in all 'curl_multi' functions.
|
||||
*/
|
||||
CURLM *curl_multi_init(void);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_add_handle()
|
||||
*
|
||||
* Desc: add a standard curl handle to the multi stack
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
||||
CURL *curl_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_remove_handle()
|
||||
*
|
||||
* Desc: removes a curl handle from the multi stack again
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
||||
CURL *curl_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_fdset()
|
||||
*
|
||||
* Desc: Ask curl for its fd_set sets. The app can use these to select() or
|
||||
* poll() on. We want curl_multi_perform() called as soon as one of
|
||||
* them are ready.
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURLMcode curl_multi_fdset(CURLM *multi_handle,
|
||||
fd_set *read_fd_set,
|
||||
fd_set *write_fd_set,
|
||||
fd_set *exc_fd_set,
|
||||
int *max_fd);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_perform()
|
||||
*
|
||||
* Desc: When the app thinks there's data available for curl it calls this
|
||||
* function to read/write whatever there is right now. This returns
|
||||
* as soon as the reads and writes are done. This function does not
|
||||
* require that there actually is data available for reading or that
|
||||
* data can be written, it can be called just in case. It returns
|
||||
* the number of handles that still transfer data in the second
|
||||
* argument's integer-pointer.
|
||||
*
|
||||
* Returns: CURLMcode type, general multi error code. *NOTE* that this only
|
||||
* returns errors etc regarding the whole multi stack. There might
|
||||
* still have occurred problems on invidual transfers even when this
|
||||
* returns OK.
|
||||
*/
|
||||
CURLMcode curl_multi_perform(CURLM *multi_handle,
|
||||
int *running_handles);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_cleanup()
|
||||
*
|
||||
* Desc: Cleans up and removes a whole multi stack. It does not free or
|
||||
* touch any individual easy handles in any way. We need to define
|
||||
* in what state those handles will be if this function is called
|
||||
* in the middle of a transfer.
|
||||
* Returns: CURLMcode type, general multi error code.
|
||||
*/
|
||||
CURLMcode curl_multi_cleanup(CURLM *multi_handle);
|
||||
|
||||
/*
|
||||
* Name: curl_multi_info_read()
|
||||
*
|
||||
* Desc: Ask the multi handle if there's any messages/informationals from
|
||||
* the individual transfers. Messages include informationals such as
|
||||
* error code from the transfer or just the fact that a transfer is
|
||||
* completed. More details on these should be written down as well.
|
||||
*
|
||||
* Repeated calls to this function will return a new struct each
|
||||
* time, until a special "end of msgs" struct is returned as a signal
|
||||
* that there is no more to get at this point.
|
||||
*
|
||||
* The data the returned pointer points to will not survive calling
|
||||
* curl_multi_cleanup().
|
||||
*
|
||||
* The 'CURLMsg' struct is meant to be very simple and only contain
|
||||
* very basic informations. If more involved information is wanted,
|
||||
* we will provide the particular "transfer handle" in that struct
|
||||
* and that should/could/would be used in subsequent
|
||||
* curl_easy_getinfo() calls (or similar). The point being that we
|
||||
* must never expose complex structs to applications, as then we'll
|
||||
* undoubtably get backwards compatibility problems in the future.
|
||||
*
|
||||
* Returns: A pointer to a filled-in struct, or NULL if it failed or ran out
|
||||
* of structs. It also writes the number of messages left in the
|
||||
* queue (after this read) in the integer the second argument points
|
||||
* to.
|
||||
*/
|
||||
CURLMsg *curl_multi_info_read(CURLM *multi_handle,
|
||||
int *msgs_in_queue);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
||||
#endif
|
34
curl/include/curl/stdcheaders.h
Normal file
34
curl/include/curl/stdcheaders.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef __STDC_HEADERS_H
|
||||
#define __STDC_HEADERS_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: stdcheaders.h,v 1.8 2004/01/07 09:19:34 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
size_t fread (void *, size_t, size_t, FILE *);
|
||||
size_t fwrite (const void *, size_t, size_t, FILE *);
|
||||
|
||||
int strcasecmp(const char *, const char *);
|
||||
int strncasecmp(const char *, const char *, size_t);
|
||||
|
||||
#endif
|
28
curl/include/curl/types.h
Normal file
28
curl/include/curl/types.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef __CURL_TYPES_H
|
||||
#define __CURL_TYPES_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: types.h,v 1.7 2004/01/07 09:19:34 bagder Exp $
|
||||
***************************************************************************/
|
||||
typedef void CURL;
|
||||
typedef void CURLconnect;
|
||||
|
||||
#endif /* __CURL_TYPES_H */
|
250
curl/install-sh
Normal file
250
curl/install-sh
Normal file
|
@ -0,0 +1,250 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
112
curl/lib/Makefile.am
Normal file
112
curl/lib/Makefile.am
Normal file
|
@ -0,0 +1,112 @@
|
|||
#
|
||||
# $Id: Makefile.am,v 1.81 2004/03/17 12:48:41 bagder Exp $
|
||||
#
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
|
||||
EXTRA_DIST = getdate.y Makefile.b32 Makefile.b32.resp Makefile.m32 \
|
||||
Makefile.vc6 Makefile.riscos libcurl.def curllib.dsp \
|
||||
curllib.dsw config-vms.h config-win32.h config-riscos.h config-mac.h \
|
||||
config.h.in ca-bundle.crt README.encoding README.memoryleak \
|
||||
README.ares makefile.dj config.dj \
|
||||
libcurl.framework.make libcurl.plist libcurl.rc \
|
||||
config-amigaos.h amigaos.c amigaos.h makefile.amiga config-netware.h \
|
||||
Makefile.netware nwlib.c libcurl.imp
|
||||
|
||||
lib_LTLIBRARIES = libcurl.la
|
||||
|
||||
# we use srcdir/include for the static global include files
|
||||
# we use builddir/lib for the generated lib/config.h file to get found
|
||||
# we use srcdir/lib for the lib-private header files
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/lib -I$(top_srcdir)/lib
|
||||
|
||||
VERSION=-version-info 2:2:0
|
||||
|
||||
# This flag accepts an argument of the form current[:revision[:age]]. So,
|
||||
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
|
||||
# 1.
|
||||
#
|
||||
# If either revision or age are omitted, they default to 0. Also note that age
|
||||
# must be less than or equal to the current interface number.
|
||||
#
|
||||
# Here are a set of rules to help you update your library version information:
|
||||
#
|
||||
# 1.Start with version information of 0:0:0 for each libtool library.
|
||||
#
|
||||
# 2.Update the version information only immediately before a public release of
|
||||
# your software. More frequent updates are unnecessary, and only guarantee
|
||||
# that the current interface number gets larger faster.
|
||||
#
|
||||
# 3.If the library source code has changed at all since the last update, then
|
||||
# increment revision (c:r:a becomes c:r+1:a).
|
||||
#
|
||||
# 4.If any interfaces have been added, removed, or changed since the last
|
||||
# update, increment current, and set revision to 0.
|
||||
#
|
||||
# 5.If any interfaces have been added since the last public release, then
|
||||
# increment age.
|
||||
#
|
||||
# 6.If any interfaces have been removed since the last public release, then
|
||||
# set age to 0.
|
||||
#
|
||||
|
||||
if NO_UNDEFINED
|
||||
# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
|
||||
UNDEF = -no-undefined
|
||||
endif
|
||||
|
||||
if MIMPURE
|
||||
# This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
|
||||
# allocatable but non-writable sections" problems.
|
||||
MIMPURE = -mimpure-text
|
||||
endif
|
||||
|
||||
libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE)
|
||||
|
||||
libcurl_la_SOURCES = arpa_telnet.h file.c netrc.h timeval.c \
|
||||
base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c \
|
||||
hostip.h progress.h cookie.c formdata.h http.c sendf.c cookie.h ftp.c \
|
||||
http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h dict.h \
|
||||
getdate.c if2ip.h speedcheck.h urldata.h getdate.h ldap.c ssluse.c \
|
||||
version.c getenv.c ldap.h ssluse.h escape.c mprintf.c telnet.c escape.h \
|
||||
netrc.c telnet.h getinfo.c getinfo.h transfer.c strequal.c \
|
||||
strequal.h easy.c security.h security.c krb4.c krb4.h memdebug.c \
|
||||
memdebug.h inet_ntoa_r.h http_chunks.c http_chunks.h strtok.c strtok.h \
|
||||
connect.c connect.h llist.c llist.h hash.c hash.h multi.c \
|
||||
content_encoding.c content_encoding.h share.c share.h http_digest.c \
|
||||
md5.c md5.h http_digest.h http_negotiate.c http_negotiate.h \
|
||||
http_ntlm.c http_ntlm.h ca-bundle.h inet_pton.c inet_pton.h \
|
||||
strtoofft.c strtoofft.h
|
||||
|
||||
noinst_HEADERS = setup.h transfer.h
|
||||
|
||||
BUILT_SOURCES = $(srcdir)/getdate.c $(top_builddir)/lib/ca-bundle.h
|
||||
|
||||
# Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule.
|
||||
$(srcdir)/getdate.c: getdate.y
|
||||
cd $(srcdir) && \
|
||||
$(YACC) $(YFLAGS) getdate.y; \
|
||||
mv -f y.tab.c getdate.c
|
||||
|
||||
$(top_builddir)/lib/ca-bundle.h: Makefile.in Makefile
|
||||
@if test -f $@; then \
|
||||
chmod 0644 $@; \
|
||||
fi
|
||||
echo "/* This file is generated automatically */" > $@
|
||||
if CABUNDLE
|
||||
echo '#define CURL_CA_BUNDLE @CURL_CA_BUNDLE@' >> $@
|
||||
else
|
||||
echo '#undef CURL_CA_BUNDLE /* unknown */' >> $@
|
||||
endif
|
||||
|
||||
install-data-hook:
|
||||
@if test -n "@CURL_CA_BUNDLE@"; then \
|
||||
$(mkinstalldirs) `dirname $(DESTDIR)@CURL_CA_BUNDLE@`; \
|
||||
@INSTALL_DATA@ $(srcdir)/ca-bundle.crt $(DESTDIR)@CURL_CA_BUNDLE@; \
|
||||
fi
|
||||
|
||||
# this hook is mainly for non-unix systems to build even if configure
|
||||
# isn't run
|
||||
dist-hook:
|
||||
chmod 0644 $(distdir)/ca-bundle.h
|
||||
echo "/* ca bundle path set in here*/" > $(distdir)/ca-bundle.h
|
90
curl/lib/Makefile.b32
Normal file
90
curl/lib/Makefile.b32
Normal file
|
@ -0,0 +1,90 @@
|
|||
############################################################
|
||||
# $Id: Makefile.b32,v 1.13 2004/02/23 12:01:10 bagder Exp $
|
||||
#
|
||||
# Makefile.b32 - Borland's C++ Compiler 5.X
|
||||
#
|
||||
# 'lib' directory
|
||||
#
|
||||
# Requires 'Makefile.b32.resp'
|
||||
#
|
||||
# Written by Jaepil Kim, pit@paradise.net.nz
|
||||
############################################################
|
||||
|
||||
# Setup environment
|
||||
CXX = bcc32
|
||||
RM = del
|
||||
LIB = tlib
|
||||
TOPDIR = ..
|
||||
CURNTDIR = .
|
||||
CXXFLAGS = -5 -O2 -w-aus -w-ccc -w-csu -w-par -w-pia -w-rch -w-inl -w-ngu \
|
||||
-w-pro -tWM
|
||||
|
||||
# If you build without SSL support, remove "-DUSE_SSLEAY" from the line below.
|
||||
DEFINES = -DLIBCURL_BIGENDIAN=0 -DNDEBUG -DWIN32 -DCONSOLE -DMBCS \
|
||||
-DUSE_SSLEAY
|
||||
INCDIRS = -I$(CURNTDIR);$(TOPDIR)\include\
|
||||
|
||||
# 'BCCDIR' has to be set up in your c:\autoexec.bat
|
||||
# i.e. SET BCCDIR = c:\Borland\BCC55
|
||||
# where c:\Borland\BCC55 is the compiler is installed
|
||||
LINKLIB = $(BCCDIR)\lib\psdk\ws2_32.lib
|
||||
LIBCURLLIB = libcurl.lib
|
||||
|
||||
.SUFFIXES: .c
|
||||
|
||||
SOURCES = \
|
||||
base64.c \
|
||||
md5.c \
|
||||
cookie.c \
|
||||
transfer.c \
|
||||
escape.c \
|
||||
formdata.c \
|
||||
ftp.c \
|
||||
http.c \
|
||||
http_chunks.c \
|
||||
http_digest.c \
|
||||
http_ntlm.c \
|
||||
ldap.c \
|
||||
dict.c \
|
||||
telnet.c \
|
||||
getdate.c \
|
||||
getenv.c \
|
||||
hostip.c \
|
||||
if2ip.c \
|
||||
mprintf.c \
|
||||
netrc.c \
|
||||
progress.c \
|
||||
sendf.c \
|
||||
inet_pton.c \
|
||||
speedcheck.c \
|
||||
ssluse.c \
|
||||
timeval.c \
|
||||
url.c \
|
||||
file.c \
|
||||
getinfo.c \
|
||||
version.c \
|
||||
easy.c \
|
||||
strequal.c \
|
||||
strtok.c \
|
||||
strtoofft.c \
|
||||
connect.c \
|
||||
hash.c \
|
||||
share.c \
|
||||
llist.c \
|
||||
multi.c \
|
||||
content_encoding.c
|
||||
|
||||
OBJECTS = $(SOURCES:.c=.obj)
|
||||
|
||||
.c.obj:
|
||||
$(CXX) -c $(INCDIRS) $(CXXFLAGS) $(DEFINES) $<
|
||||
|
||||
all: $(LIBCURLLIB)
|
||||
|
||||
clean:
|
||||
-$(RM) $(LIBCURLLIB)
|
||||
-$(RM) *.obj
|
||||
|
||||
$(LIBCURLLIB): $(LINKLIB) $(OBJECTS) Makefile.b32.resp
|
||||
-$(RM) $(LIBCURLLIB)
|
||||
$(LIB) $(LIBCURLLIB) @Makefile.b32.resp
|
39
curl/lib/Makefile.b32.resp
Normal file
39
curl/lib/Makefile.b32.resp
Normal file
|
@ -0,0 +1,39 @@
|
|||
+base64.obj &
|
||||
+md5.obj &
|
||||
+cookie.obj &
|
||||
+transfer.obj &
|
||||
+escape.obj &
|
||||
+formdata.obj &
|
||||
+ftp.obj &
|
||||
+http.obj &
|
||||
+http_chunks.obj &
|
||||
+http_digest.obj &
|
||||
+ldap.obj &
|
||||
+dict.obj &
|
||||
+telnet.obj &
|
||||
+getdate.obj &
|
||||
+getenv.obj &
|
||||
+getpass.obj &
|
||||
+hostip.obj &
|
||||
+if2ip.obj &
|
||||
+mprintf.obj &
|
||||
+netrc.obj &
|
||||
+progress.obj &
|
||||
+sendf.obj &
|
||||
+speedcheck.obj &
|
||||
+ssluse.obj &
|
||||
+timeval.obj &
|
||||
+url.obj &
|
||||
+file.obj &
|
||||
+getinfo.obj &
|
||||
+version.obj &
|
||||
+easy.obj &
|
||||
+strequal.obj &
|
||||
+strtok.obj &
|
||||
+strtoofft.obj &
|
||||
+connect.obj &
|
||||
+hash.obj &
|
||||
+share.obj &
|
||||
+llist.obj &
|
||||
+multi.obj &
|
||||
+content_encoding.obj
|
688
curl/lib/Makefile.in
Normal file
688
curl/lib/Makefile.in
Normal file
|
@ -0,0 +1,688 @@
|
|||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
#
|
||||
# $Id: Makefile.am,v 1.81 2004/03/17 12:48:41 bagder Exp $
|
||||
#
|
||||
|
||||
|
||||
SOURCES = $(libcurl_la_SOURCES)
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_triplet = @host@
|
||||
subdir = lib
|
||||
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = config.h $(top_builddir)/src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libcurl_la_LIBADD =
|
||||
am_libcurl_la_OBJECTS = file.lo timeval.lo base64.lo hostip.lo \
|
||||
progress.lo formdata.lo cookie.lo http.lo sendf.lo ftp.lo \
|
||||
url.lo dict.lo if2ip.lo speedcheck.lo getdate.lo ldap.lo \
|
||||
ssluse.lo version.lo getenv.lo escape.lo mprintf.lo telnet.lo \
|
||||
netrc.lo getinfo.lo transfer.lo strequal.lo easy.lo \
|
||||
security.lo krb4.lo memdebug.lo http_chunks.lo strtok.lo \
|
||||
connect.lo llist.lo hash.lo multi.lo content_encoding.lo \
|
||||
share.lo http_digest.lo md5.lo http_negotiate.lo http_ntlm.lo \
|
||||
inet_pton.lo strtoofft.lo
|
||||
libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS)
|
||||
DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/base64.Plo ./$(DEPDIR)/connect.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/content_encoding.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/cookie.Plo ./$(DEPDIR)/dict.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/easy.Plo ./$(DEPDIR)/escape.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/file.Plo ./$(DEPDIR)/formdata.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/ftp.Plo ./$(DEPDIR)/getdate.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/getenv.Plo ./$(DEPDIR)/getinfo.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/hash.Plo ./$(DEPDIR)/hostip.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/http.Plo ./$(DEPDIR)/http_chunks.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/http_digest.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/http_negotiate.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/http_ntlm.Plo ./$(DEPDIR)/if2ip.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/inet_pton.Plo ./$(DEPDIR)/krb4.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/ldap.Plo ./$(DEPDIR)/llist.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/md5.Plo ./$(DEPDIR)/memdebug.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/mprintf.Plo ./$(DEPDIR)/multi.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/netrc.Plo ./$(DEPDIR)/progress.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/security.Plo ./$(DEPDIR)/sendf.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/share.Plo ./$(DEPDIR)/speedcheck.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/ssluse.Plo ./$(DEPDIR)/strequal.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/strtok.Plo ./$(DEPDIR)/strtoofft.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/telnet.Plo ./$(DEPDIR)/timeval.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/transfer.Plo ./$(DEPDIR)/url.Plo \
|
||||
@AMDEP_TRUE@ ./$(DEPDIR)/version.Plo
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libcurl_la_SOURCES)
|
||||
DIST_SOURCES = $(libcurl_la_SOURCES)
|
||||
HEADERS = $(noinst_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CABUNDLE_FALSE = @CABUNDLE_FALSE@
|
||||
CABUNDLE_TRUE = @CABUNDLE_TRUE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CURL_CA_BUNDLE = @CURL_CA_BUNDLE@
|
||||
CURL_DISABLE_DICT = @CURL_DISABLE_DICT@
|
||||
CURL_DISABLE_FILE = @CURL_DISABLE_FILE@
|
||||
CURL_DISABLE_FTP = @CURL_DISABLE_FTP@
|
||||
CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@
|
||||
CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@
|
||||
CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@
|
||||
CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
HAVE_ARES = @HAVE_ARES@
|
||||
HAVE_LIBZ = @HAVE_LIBZ@
|
||||
HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@
|
||||
HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
IPV6_ENABLED = @IPV6_ENABLED@
|
||||
KRB4_ENABLED = @KRB4_ENABLED@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANOPT = @MANOPT@
|
||||
MIMPURE_FALSE = @MIMPURE_FALSE@
|
||||
MIMPURE_TRUE = @MIMPURE_TRUE@
|
||||
NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@
|
||||
NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@
|
||||
NROFF = @NROFF@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OPENSSL_ENABLED = @OPENSSL_ENABLED@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PERL = @PERL@
|
||||
PKGADD_NAME = @PKGADD_NAME@
|
||||
PKGADD_PKG = @PKGADD_PKG@
|
||||
PKGADD_VENDOR = @PKGADD_VENDOR@
|
||||
PKGCONFIG = @PKGCONFIG@
|
||||
RANDOM_FILE = @RANDOM_FILE@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
USE_MANUAL_FALSE = @USE_MANUAL_FALSE@
|
||||
USE_MANUAL_TRUE = @USE_MANUAL_TRUE@
|
||||
VERSION = -version-info 2:2:0
|
||||
VERSIONNUM = @VERSIONNUM@
|
||||
YACC = @YACC@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_AS = @ac_ct_AS@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
|
||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
datadir = @datadir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
subdirs = @subdirs@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = foreign nostdinc
|
||||
EXTRA_DIST = getdate.y Makefile.b32 Makefile.b32.resp Makefile.m32 \
|
||||
Makefile.vc6 Makefile.riscos libcurl.def curllib.dsp \
|
||||
curllib.dsw config-vms.h config-win32.h config-riscos.h config-mac.h \
|
||||
config.h.in ca-bundle.crt README.encoding README.memoryleak \
|
||||
README.ares makefile.dj config.dj \
|
||||
libcurl.framework.make libcurl.plist libcurl.rc \
|
||||
config-amigaos.h amigaos.c amigaos.h makefile.amiga config-netware.h \
|
||||
Makefile.netware nwlib.c libcurl.imp
|
||||
|
||||
lib_LTLIBRARIES = libcurl.la
|
||||
|
||||
# we use srcdir/include for the static global include files
|
||||
# we use builddir/lib for the generated lib/config.h file to get found
|
||||
# we use srcdir/lib for the lib-private header files
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/lib -I$(top_srcdir)/lib
|
||||
|
||||
# This flag accepts an argument of the form current[:revision[:age]]. So,
|
||||
# passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
|
||||
# 1.
|
||||
#
|
||||
# If either revision or age are omitted, they default to 0. Also note that age
|
||||
# must be less than or equal to the current interface number.
|
||||
#
|
||||
# Here are a set of rules to help you update your library version information:
|
||||
#
|
||||
# 1.Start with version information of 0:0:0 for each libtool library.
|
||||
#
|
||||
# 2.Update the version information only immediately before a public release of
|
||||
# your software. More frequent updates are unnecessary, and only guarantee
|
||||
# that the current interface number gets larger faster.
|
||||
#
|
||||
# 3.If the library source code has changed at all since the last update, then
|
||||
# increment revision (c:r:a becomes c:r+1:a).
|
||||
#
|
||||
# 4.If any interfaces have been added, removed, or changed since the last
|
||||
# update, increment current, and set revision to 0.
|
||||
#
|
||||
# 5.If any interfaces have been added since the last public release, then
|
||||
# increment age.
|
||||
#
|
||||
# 6.If any interfaces have been removed since the last public release, then
|
||||
# set age to 0.
|
||||
#
|
||||
|
||||
# The -no-undefined flag is CRUCIAL for this to build fine on Cygwin.
|
||||
@NO_UNDEFINED_TRUE@UNDEF = -no-undefined
|
||||
|
||||
# This is for gcc on Solaris (8+ ?) to avoid "relocations remain against
|
||||
# allocatable but non-writable sections" problems.
|
||||
@MIMPURE_TRUE@MIMPURE = -mimpure-text
|
||||
libcurl_la_LDFLAGS = $(UNDEF) $(VERSION) $(MIMPURE)
|
||||
libcurl_la_SOURCES = arpa_telnet.h file.c netrc.h timeval.c \
|
||||
base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c \
|
||||
hostip.h progress.h cookie.c formdata.h http.c sendf.c cookie.h ftp.c \
|
||||
http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h dict.h \
|
||||
getdate.c if2ip.h speedcheck.h urldata.h getdate.h ldap.c ssluse.c \
|
||||
version.c getenv.c ldap.h ssluse.h escape.c mprintf.c telnet.c escape.h \
|
||||
netrc.c telnet.h getinfo.c getinfo.h transfer.c strequal.c \
|
||||
strequal.h easy.c security.h security.c krb4.c krb4.h memdebug.c \
|
||||
memdebug.h inet_ntoa_r.h http_chunks.c http_chunks.h strtok.c strtok.h \
|
||||
connect.c connect.h llist.c llist.h hash.c hash.h multi.c \
|
||||
content_encoding.c content_encoding.h share.c share.h http_digest.c \
|
||||
md5.c md5.h http_digest.h http_negotiate.c http_negotiate.h \
|
||||
http_ntlm.c http_ntlm.h ca-bundle.h inet_pton.c inet_pton.h \
|
||||
strtoofft.c strtoofft.h
|
||||
|
||||
noinst_HEADERS = setup.h transfer.h
|
||||
BUILT_SOURCES = $(srcdir)/getdate.c $(top_builddir)/lib/ca-bundle.h
|
||||
all: $(BUILT_SOURCES) config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign lib/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status lib/config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p="`echo $$p | sed -e 's|^.*/||'`"; \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" = "$$p" && dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libcurl.la: $(libcurl_la_OBJECTS) $(libcurl_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libcurl_la_LDFLAGS) $(libcurl_la_OBJECTS) $(libcurl_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connect.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/content_encoding.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cookie.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dict.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/easy.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/escape.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formdata.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdate.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getenv.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getinfo.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostip.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_chunks.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_digest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_negotiate.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http_ntlm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/if2ip.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inet_pton.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/krb4.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ldap.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/llist.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memdebug.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mprintf.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/netrc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progress.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendf.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/share.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speedcheck.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssluse.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strequal.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtok.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtoofft.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/telnet.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timeval.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transfer.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/url.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
check-am: all-am
|
||||
check: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-libLTLIBRARIES install-man \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags uninstall uninstall-am \
|
||||
uninstall-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
|
||||
# Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule.
|
||||
$(srcdir)/getdate.c: getdate.y
|
||||
cd $(srcdir) && \
|
||||
$(YACC) $(YFLAGS) getdate.y; \
|
||||
mv -f y.tab.c getdate.c
|
||||
|
||||
$(top_builddir)/lib/ca-bundle.h: Makefile.in Makefile
|
||||
@if test -f $@; then \
|
||||
chmod 0644 $@; \
|
||||
fi
|
||||
echo "/* This file is generated automatically */" > $@
|
||||
@CABUNDLE_TRUE@ echo '#define CURL_CA_BUNDLE @CURL_CA_BUNDLE@' >> $@
|
||||
@CABUNDLE_FALSE@ echo '#undef CURL_CA_BUNDLE /* unknown */' >> $@
|
||||
|
||||
install-data-hook:
|
||||
@if test -n "@CURL_CA_BUNDLE@"; then \
|
||||
$(mkinstalldirs) `dirname $(DESTDIR)@CURL_CA_BUNDLE@`; \
|
||||
@INSTALL_DATA@ $(srcdir)/ca-bundle.crt $(DESTDIR)@CURL_CA_BUNDLE@; \
|
||||
fi
|
||||
|
||||
# this hook is mainly for non-unix systems to build even if configure
|
||||
# isn't run
|
||||
dist-hook:
|
||||
chmod 0644 $(distdir)/ca-bundle.h
|
||||
echo "/* ca bundle path set in here*/" > $(distdir)/ca-bundle.h
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
102
curl/lib/Makefile.m32
Normal file
102
curl/lib/Makefile.m32
Normal file
|
@ -0,0 +1,102 @@
|
|||
#############################################################
|
||||
#
|
||||
## Makefile for building libcurl.a with MingW32 (GCC-3.2) and
|
||||
## optionally OpenSSL (0.9.7)
|
||||
## Use: make -f Makefile.m32
|
||||
##
|
||||
## Comments to: Troy Engel <tengel@sonic.net> or
|
||||
## Joern Hartroth <hartroth@acm.org>
|
||||
|
||||
CC = gcc
|
||||
AR = ar
|
||||
RM = rm -f
|
||||
RANLIB = ranlib
|
||||
STRIP = strip -g
|
||||
OPENSSL_PATH = ../../openssl-0.9.7c
|
||||
ZLIB_PATH = ../../zlib-1.2.1
|
||||
|
||||
########################################################
|
||||
## Nothing more to do below this line!
|
||||
|
||||
INCLUDES = -I. -I.. -I../include -I../src
|
||||
CFLAGS = -g -O2 -DMINGW32
|
||||
ifdef SSL
|
||||
INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl"
|
||||
CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
|
||||
DLL_LIBS = -L$(OPENSSL_PATH)/out -leay32 -lssl32
|
||||
endif
|
||||
ifdef ZLIB
|
||||
INCLUDES += -I"$(ZLIB_PATH)"
|
||||
CFLAGS += -DHAVE_LIBZ -DHAVE_ZLIB_H
|
||||
DLL_LIBS += -L$(ZLIB_PATH) -lz
|
||||
endif
|
||||
COMPILE = $(CC) $(INCLUDES) $(CFLAGS)
|
||||
|
||||
libcurl_a_LIBRARIES = libcurl.a
|
||||
|
||||
libcurl_a_SOURCES = arpa_telnet.h file.c netrc.h timeval.c base64.c \
|
||||
file.h hostip.c progress.c timeval.h base64.h formdata.c hostip.h \
|
||||
progress.h cookie.c formdata.h http.c sendf.c cookie.h ftp.c \
|
||||
http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h \
|
||||
dict.h getdate.c if2ip.h speedcheck.h urldata.h transfer.c getdate.h \
|
||||
ldap.c ssluse.c version.c transfer.h getenv.c \
|
||||
ldap.h ssluse.h escape.c getenv.h mprintf.c telnet.c escape.h \
|
||||
netrc.c telnet.h getinfo.c strequal.c strequal.h easy.c \
|
||||
security.h security.c krb4.h krb4.c memdebug.h memdebug.c \
|
||||
inet_ntoa_r.h http_chunks.h http_chunks.c \
|
||||
strtok.c connect.c hash.c llist.c multi.c share.c share.h \
|
||||
content_encoding.h content_encoding.c http_digest.h http_digest.c \
|
||||
http_negotiate.c http_negotiate.h http_ntlm.c http_ntlm.h md5.h \
|
||||
md5.c strtoofft.c inet_pton.c
|
||||
|
||||
libcurl_a_OBJECTS = file.o timeval.o base64.o hostip.o progress.o \
|
||||
formdata.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \
|
||||
speedcheck.o getdate.o transfer.o ldap.o ssluse.o version.o \
|
||||
getenv.o escape.o mprintf.o telnet.o netrc.o getinfo.o \
|
||||
strequal.o easy.o security.o krb4.o memdebug.o http_chunks.o \
|
||||
strtok.o connect.o hash.o llist.o multi.o share.o \
|
||||
content_encoding.o http_digest.o http_negotiate.o http_ntlm.o md5.o \
|
||||
strtoofft.o inet_pton.o
|
||||
|
||||
LIBRARIES = $(libcurl_a_LIBRARIES)
|
||||
SOURCES = $(libcurl_a_SOURCES)
|
||||
OBJECTS = $(libcurl_a_OBJECTS)
|
||||
|
||||
|
||||
all: libcurl.a libcurl.dll libcurldll.a
|
||||
|
||||
libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES)
|
||||
$(RM) libcurl.a
|
||||
$(AR) cru libcurl.a $(libcurl_a_OBJECTS)
|
||||
$(RANLIB) libcurl.a
|
||||
$(STRIP) $@
|
||||
|
||||
RESOURCE = libcurl.res
|
||||
|
||||
# remove the last line above to keep debug info
|
||||
|
||||
libcurl.dll libcurldll.a: libcurl.a libcurl.def $(RESOURCE)
|
||||
$(RM) $@
|
||||
dllwrap --dllname $@ --output-lib libcurldll.a --export-all --def libcurl.def $(libcurl_a_LIBRARIES) $(RESOURCE) $(DLL_LIBS) -lwsock32 -lws2_32 -lwinmm
|
||||
$(STRIP) $@
|
||||
|
||||
# remove the last line above to keep debug info
|
||||
|
||||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
libcurl.res: libcurl.rc
|
||||
windres -DCURLDEBUG=0 -O COFF -o $@ -i $^
|
||||
|
||||
clean:
|
||||
$(RM) $(libcurl_a_OBJECTS) $(RESOURCE)
|
||||
|
||||
distrib: clean
|
||||
$(RM) $(libcurl_a_LIBRARIES)
|
||||
|
277
curl/lib/Makefile.netware
Normal file
277
curl/lib/Makefile.netware
Normal file
|
@ -0,0 +1,277 @@
|
|||
#################################################################
|
||||
#
|
||||
## Makefile for building libcurl.nlm (NetWare version - gnu make)
|
||||
## Use: make -f Makefile.netware
|
||||
##
|
||||
## Comments to: Guenter Knauf <eflash@gmx.net>
|
||||
#
|
||||
#################################################################
|
||||
|
||||
# Edit the path below to point to the base of your Novell NDK.
|
||||
BASE = c:/novell
|
||||
INSTDIR = s:/libcurl
|
||||
|
||||
# Edit the path below to point to the base of your Zlib sources.
|
||||
ZLIB_PATH = ../../../cw/zlib-src-1.1.4
|
||||
|
||||
# Edit the vars below to change NLM target settings.
|
||||
TARGET = libcurl
|
||||
VERSION = $(LIBCURL_VERSION)
|
||||
COPYR = Copyright (c) 1996 - 2004, Daniel Stenberg, <daniel@haxx.se>
|
||||
DESCR = cURL libcurl $(LIBCURL_VERSION_STR) - http://curl.haxx.se
|
||||
MTSAFE = YES
|
||||
STACK = 64000
|
||||
SCREEN = none
|
||||
#MODULES = libz.nlm
|
||||
EXPORTS = @libcurl.imp
|
||||
|
||||
# Edit the var below to point to your lib architecture.
|
||||
ifndef LIBARCH
|
||||
LIBARCH = LIBC
|
||||
endif
|
||||
|
||||
# must be equal to DEBUG or NDEBUG
|
||||
DB = NDEBUG
|
||||
# DB = DEBUG
|
||||
# Optimization: -O<n> or debugging: -g
|
||||
ifeq ($(DB),NDEBUG)
|
||||
OPT = -O2
|
||||
OBJDIR = release
|
||||
else
|
||||
OPT = -g
|
||||
OBJDIR = debug
|
||||
endif
|
||||
|
||||
# Include the version info retrieved from jk_version.h
|
||||
-include $(OBJDIR)/version.inc
|
||||
|
||||
# The following line defines your compiler.
|
||||
ifdef METROWERKS
|
||||
CC = mwccnlm
|
||||
else
|
||||
CC = gcc
|
||||
endif
|
||||
# RM = rm -f
|
||||
# CP = cp -fv
|
||||
# if you want to mark the target as MTSAFE you will need a tool for
|
||||
# generating the xdc data for the linker; here's a minimal tool:
|
||||
# http://www.gknw.de/development/prgtools/mkxdc.zip
|
||||
MPKXDC = mkxdc
|
||||
|
||||
# Global flags for all compilers
|
||||
CFLAGS = $(OPT) -D$(DB) -DNETWARE -nostdinc
|
||||
#CFLAGS += -DHAVE_LIBZ
|
||||
|
||||
ifeq ($(CC),mwccnlm)
|
||||
LD = mwldnlm
|
||||
LDFLAGS = -nostdlib $(PRELUDE) $(OBJDIR)/*.o -o $(OBJDIR)/$(TARGET).nlm -commandfile
|
||||
CFLAGS += -gccinc -inline off -opt nointrinsics
|
||||
CFLAGS += -relax_pointers
|
||||
#CFLAGS += -w on
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
|
||||
CFLAGS += -align 4 -inst mmx -proc 686
|
||||
CFLAGS += -D_POSIX_SOURCE
|
||||
# CFLAGS += -D__ANSIC__
|
||||
else
|
||||
PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
|
||||
# CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
|
||||
CFLAGS += -align 1 -proc 586
|
||||
endif
|
||||
else
|
||||
LD = nlmconv
|
||||
LDFLAGS = -T
|
||||
CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return
|
||||
CFLAGS += -Wall # -pedantic
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
|
||||
CFLAGS += -D_POSIX_SOURCE
|
||||
# CFLAGS += -D__ANSIC__
|
||||
else
|
||||
PRELUDE = $(SDK_CLIB)/imports/clibpre.gcc.o
|
||||
CFLAGS += -include $(BASE)/nlmconv/genlm.h
|
||||
endif
|
||||
endif
|
||||
|
||||
LDLIBS =
|
||||
|
||||
NDK_ROOT = $(BASE)/ndk
|
||||
SDK_CLIB = $(NDK_ROOT)/nwsdk
|
||||
SDK_LIBC = $(NDK_ROOT)/libc
|
||||
SDK_LDAP = $(NDK_ROOT)/cldapsdk/netware
|
||||
CURL_INC = ../include
|
||||
|
||||
INCLUDES = -I$(CURL_INC)
|
||||
INCLUDES += -I$(ZLIB_PATH)
|
||||
|
||||
ifeq ($(LIBARCH),LIBC)
|
||||
INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
|
||||
INCLUDES += -I$(SDK_LIBC)/include/winsock
|
||||
INCLUDES += -I$(SDK_LDAP)/libc/inc
|
||||
else
|
||||
INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
|
||||
# INCLUDES += -I$(SDK_CLIB)/include/nlm/obsolete
|
||||
INCLUDES += -I$(SDK_LDAP)/clib/inc
|
||||
CFLAGS += -DNETDB_USE_INTERNET
|
||||
endif
|
||||
CFLAGS += $(INCLUDES)
|
||||
|
||||
ifeq ($(MTSAFE),YES)
|
||||
XDCDATA = $(OBJDIR)/$(TARGET).xdc
|
||||
endif
|
||||
|
||||
ifeq ($(OSTYPE),linux)
|
||||
DL = '
|
||||
-include $(BASE)/nlmconv/ncpfs.inc
|
||||
endif
|
||||
|
||||
OBJS = \
|
||||
$(OBJDIR)/file.o \
|
||||
$(OBJDIR)/timeval.o \
|
||||
$(OBJDIR)/base64.o \
|
||||
$(OBJDIR)/hostip.o \
|
||||
$(OBJDIR)/progress.o \
|
||||
$(OBJDIR)/formdata.o \
|
||||
$(OBJDIR)/cookie.o \
|
||||
$(OBJDIR)/http.o \
|
||||
$(OBJDIR)/sendf.o \
|
||||
$(OBJDIR)/ftp.o \
|
||||
$(OBJDIR)/url.o \
|
||||
$(OBJDIR)/dict.o \
|
||||
$(OBJDIR)/if2ip.o \
|
||||
$(OBJDIR)/speedcheck.o \
|
||||
$(OBJDIR)/getdate.o \
|
||||
$(OBJDIR)/transfer.o \
|
||||
$(OBJDIR)/ldap.o \
|
||||
$(OBJDIR)/ssluse.o \
|
||||
$(OBJDIR)/version.o \
|
||||
$(OBJDIR)/getenv.o \
|
||||
$(OBJDIR)/escape.o \
|
||||
$(OBJDIR)/mprintf.o \
|
||||
$(OBJDIR)/telnet.o \
|
||||
$(OBJDIR)/netrc.o \
|
||||
$(OBJDIR)/getinfo.o \
|
||||
$(OBJDIR)/strequal.o \
|
||||
$(OBJDIR)/easy.o \
|
||||
$(OBJDIR)/security.o \
|
||||
$(OBJDIR)/krb4.o \
|
||||
$(OBJDIR)/memdebug.o \
|
||||
$(OBJDIR)/http_chunks.o \
|
||||
$(OBJDIR)/strtok.o \
|
||||
$(OBJDIR)/connect.o \
|
||||
$(OBJDIR)/hash.o \
|
||||
$(OBJDIR)/llist.o \
|
||||
$(OBJDIR)/multi.o \
|
||||
$(OBJDIR)/share.o \
|
||||
$(OBJDIR)/content_encoding.o \
|
||||
$(OBJDIR)/http_digest.o \
|
||||
$(OBJDIR)/http_negotiate.o \
|
||||
$(OBJDIR)/http_ntlm.o \
|
||||
$(OBJDIR)/md5.o \
|
||||
$(OBJDIR)/strtoofft.o \
|
||||
$(OBJDIR)/nwlib.o
|
||||
|
||||
|
||||
all: $(OBJDIR) $(OBJDIR)/version.inc $(OBJDIR)/$(TARGET).nlm
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@echo Compiling $<
|
||||
@$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OBJDIR)/version.inc: $(CURL_INC)/curl/curl.h $(OBJDIR)
|
||||
@echo Creating $@
|
||||
@awk -f ../packages/netware/get_ver.awk $< > $@
|
||||
|
||||
dist: all
|
||||
-$(RM) $(OBJDIR)/*.o $(OBJDIR)/$(TARGET).map $(OBJDIR)/$(TARGET).ncv
|
||||
-$(RM) $(OBJDIR)/$(TARGET).def $(OBJDIR)/version.inc $(XDCDATA)
|
||||
# -$(CP) ../changes.txt $(OBJDIR)/
|
||||
|
||||
install: all
|
||||
@[ -d $(INSTDIR) ] || mkdir $(INSTDIR)
|
||||
@$(CP) $(TARGET).nlm $(INSTDIR)
|
||||
|
||||
clean:
|
||||
-$(RM) -r $(OBJDIR)
|
||||
|
||||
$(OBJDIR):
|
||||
@mkdir $(OBJDIR)
|
||||
|
||||
$(OBJDIR)/$(TARGET).nlm: $(OBJS) $(OBJDIR)/$(TARGET).def $(XDCDATA)
|
||||
@echo Linking $@
|
||||
@-$(RM) $@
|
||||
@$(LD) $(LDFLAGS) $(OBJDIR)/$(TARGET).def
|
||||
|
||||
$(OBJDIR)/%.xdc: Makefile.netware
|
||||
@echo Creating $@
|
||||
@$(MPKXDC) $(XDCOPT) $@
|
||||
|
||||
$(OBJDIR)/%.def: Makefile.netware
|
||||
@echo $(DL)# DEF file for linking with $(LD)$(DL) > $@
|
||||
@echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
|
||||
@echo $(DL)# All your changes will be lost!!$(DL) >> $@
|
||||
@echo $(DL)#$(DL) >> $@
|
||||
@echo $(DL)copyright "$(COPYR)"$(DL) >> $@
|
||||
@echo $(DL)description "$(DESCR)"$(DL) >> $@
|
||||
@echo $(DL)version $(VERSION)$(DL) >> $@
|
||||
ifdef NLMTYPE
|
||||
@echo $(DL)type $(NLMTYPE)$(DL) >> $@
|
||||
endif
|
||||
ifdef STACK
|
||||
@echo $(DL)stack $(STACK)$(DL) >> $@
|
||||
endif
|
||||
ifdef SCREEN
|
||||
@echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)screenname "DEFAULT"$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(DB),DEBUG)
|
||||
@echo $(DL)debug$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)threadname "$(TARGET)"$(DL) >> $@
|
||||
ifdef XDCDATA
|
||||
@echo $(DL)xdcdata $(XDCDATA)$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(LIBARCH),CLIB)
|
||||
@echo $(DL)start _Prelude$(DL) >> $@
|
||||
@echo $(DL)exit _Stop$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/clib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/threads.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/nlmlib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_CLIB)/imports/socklib.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapssl.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/clib/imports/ldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module clib$(DL) >> $@
|
||||
else
|
||||
ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)flag_on 64$(DL) >> $@
|
||||
else
|
||||
@echo $(DL)autounload$(DL) >> $@
|
||||
endif
|
||||
@echo $(DL)pseudopreemption$(DL) >> $@
|
||||
@echo $(DL)start _LibCPrelude$(DL) >> $@
|
||||
@echo $(DL)exit _LibCPostlude$(DL) >> $@
|
||||
@echo $(DL)check _LibCCheckUnload$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/libc.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LIBC)/imports/netware.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapsdk.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapssl.imp$(DL) >> $@
|
||||
@echo $(DL)import @$(SDK_LDAP)/libc/imports/lldapx.imp$(DL) >> $@
|
||||
@echo $(DL)module libc$(DL) >> $@
|
||||
endif
|
||||
ifdef MODULES
|
||||
@echo $(DL)module $(MODULES)$(DL) >> $@
|
||||
endif
|
||||
ifdef EXPORTS
|
||||
@echo $(DL)export $(EXPORTS)$(DL) >> $@
|
||||
endif
|
||||
ifdef IMPORTS
|
||||
@echo $(DL)import $(IMPORTS)$(DL) >> $@
|
||||
endif
|
||||
ifeq ($(LD),nlmconv)
|
||||
@echo $(DL)input $(OBJS)$(DL) >> $@
|
||||
@echo $(DL)input $(PRELUDE)$(DL) >> $@
|
||||
@echo $(DL)output $(TARGET).nlm$(DL) >> $@
|
||||
endif
|
||||
|
131
curl/lib/Makefile.riscos
Normal file
131
curl/lib/Makefile.riscos
Normal file
|
@ -0,0 +1,131 @@
|
|||
# Makefile for project libcurl
|
||||
# Generated on Sun,13 Jan 2002.16:57:00 by EasyGCC (0.1.3 [beta 2] (3 Jan 2002))
|
||||
# Contact: easygcc@melotech.co.uk
|
||||
|
||||
# Project objects:
|
||||
objs = o.base64 o.connect o.cookie o.dict \
|
||||
o.dllinit o.easy o.escape o.file \
|
||||
o.formdata o.ftp o.getdate o.getenv \
|
||||
o.getinfo o.getpass o.hostip o.http \
|
||||
o.http_chunks o.if2ip o.krb4 o.ldap \
|
||||
o.memdebug o.mprintf o.netrc o.progress \
|
||||
o.security o.sendf o.speedcheck o.ssluse \
|
||||
o.strequal o.strtok o.telnet o.timeval \
|
||||
o.transfer o.url o.version o.strtoofft
|
||||
|
||||
# Compile options:
|
||||
linkopts = -o libcurl
|
||||
compileropts = -mpoke-function-name -IUtilLib: -mthrowback
|
||||
|
||||
# Project target:
|
||||
libcurl: $(objs)
|
||||
makealf $(linkopts) $(objs)
|
||||
|
||||
# Static dependancies:
|
||||
o.base64: c.base64
|
||||
gcc $(compileropts) -c -o base64.o c.base64
|
||||
|
||||
o.connect: c.connect
|
||||
gcc $(compileropts) -c -o connect.o c.connect
|
||||
|
||||
o.cookie: c.cookie
|
||||
gcc $(compileropts) -c -o cookie.o c.cookie
|
||||
|
||||
o.dict: c.dict
|
||||
gcc $(compileropts) -c -o dict.o c.dict
|
||||
|
||||
o.dllinit: c.dllinit
|
||||
gcc $(compileropts) -c -o dllinit.o c.dllinit
|
||||
|
||||
o.easy: c.easy
|
||||
gcc $(compileropts) -c -o easy.o c.easy
|
||||
|
||||
o.escape: c.escape
|
||||
gcc $(compileropts) -c -o escape.o c.escape
|
||||
|
||||
o.file: c.file
|
||||
gcc $(compileropts) -c -o file.o c.file
|
||||
|
||||
o.formdata: c.formdata
|
||||
gcc $(compileropts) -c -o formdata.o c.formdata
|
||||
|
||||
o.ftp: c.ftp
|
||||
gcc $(compileropts) -c -o ftp.o c.ftp
|
||||
|
||||
o.getdate: c.getdate
|
||||
gcc $(compileropts) -c -o getdate.o c.getdate
|
||||
|
||||
o.getenv: c.getenv
|
||||
gcc $(compileropts) -c -o getenv.o c.getenv
|
||||
|
||||
o.getinfo: c.getinfo
|
||||
gcc $(compileropts) -c -o getinfo.o c.getinfo
|
||||
|
||||
o.getpass: c.getpass
|
||||
gcc $(compileropts) -c -o getpass.o c.getpass
|
||||
|
||||
o.hostip: c.hostip
|
||||
gcc $(compileropts) -c -o hostip.o c.hostip
|
||||
|
||||
o.http: c.http
|
||||
gcc $(compileropts) -c -o http.o c.http
|
||||
|
||||
o.http_chunks: c.http_chunks
|
||||
gcc $(compileropts) -c -o http_chunks.o c.http_chunks
|
||||
|
||||
o.if2ip: c.if2ip
|
||||
gcc $(compileropts) -c -o if2ip.o c.if2ip
|
||||
|
||||
o.krb4: c.krb4
|
||||
gcc $(compileropts) -c -o krb4.o c.krb4
|
||||
|
||||
o.ldap: c.ldap
|
||||
gcc $(compileropts) -IOpenLDAP: -c -o ldap.o c.ldap
|
||||
|
||||
o.memdebug: c.memdebug
|
||||
gcc $(compileropts) -c -o memdebug.o c.memdebug
|
||||
|
||||
o.mprintf: c.mprintf
|
||||
gcc $(compileropts) -c -o mprintf.o c.mprintf
|
||||
|
||||
o.netrc: c.netrc
|
||||
gcc $(compileropts) -c -o netrc.o c.netrc
|
||||
|
||||
o.progress: c.progress
|
||||
gcc $(compileropts) -c -o progress.o c.progress
|
||||
|
||||
o.security: c.security
|
||||
gcc $(compileropts) -c -o security.o c.security
|
||||
|
||||
o.sendf: c.sendf
|
||||
gcc $(compileropts) -c -o sendf.o c.sendf
|
||||
|
||||
o.speedcheck: c.speedcheck
|
||||
gcc $(compileropts) -c -o speedcheck.o c.speedcheck
|
||||
|
||||
o.ssluse: c.ssluse
|
||||
gcc $(compileropts) -c -o ssluse.o c.ssluse
|
||||
|
||||
o.strequal: c.strequal
|
||||
gcc $(compileropts) -c -o strequal.o c.strequal
|
||||
|
||||
o.strtok: c.strtok
|
||||
gcc $(compileropts) -c -o strtok.o c.strtok
|
||||
|
||||
o.strtoofft: c.strtoofft
|
||||
gcc $(compileropts) -c -o strtoofft.o c.strtoofft
|
||||
|
||||
o.telnet: c.telnet
|
||||
gcc $(compileropts) -c -o telnet.o c.telnet
|
||||
|
||||
o.timeval: c.timeval
|
||||
gcc $(compileropts) -c -o timeval.o c.timeval
|
||||
|
||||
o.transfer: c.transfer
|
||||
gcc $(compileropts) -c -o transfer.o c.transfer
|
||||
|
||||
o.url: c.url
|
||||
gcc $(compileropts) -c -o url.o c.url
|
||||
|
||||
o.version: c.version
|
||||
gcc $(compileropts) -c -o version.o c.version
|
257
curl/lib/Makefile.vc6
Normal file
257
curl/lib/Makefile.vc6
Normal file
|
@ -0,0 +1,257 @@
|
|||
#############################################################
|
||||
#
|
||||
# Makefile for building libcurl with MSVC6
|
||||
#
|
||||
# Usage: see usage message below
|
||||
# Should be invoked from \lib directory
|
||||
# Edit the paths and desired library name
|
||||
# SSL path is only required if you intend compiling
|
||||
# with SSL.
|
||||
#
|
||||
# This make file leaves the result either a .lib or .dll file
|
||||
# in the \lib directory. It should be called from the \lib
|
||||
# directory.
|
||||
#
|
||||
# An option would have been to allow the source directory to
|
||||
# be specified, but I saw no requirement.
|
||||
#
|
||||
# Another option would have been to leave the .lib and .dll
|
||||
# files in the "cfg" directory, but then the make file
|
||||
# in \src would need to be changed.
|
||||
#
|
||||
##############################################################
|
||||
# CHANGE LOG
|
||||
# ------------------------------------------------------------
|
||||
# 05.11.2001 John Lask Initial Release
|
||||
# 02.05.2002 Miklos Nemeth OPENSSL_PATH environment; no need
|
||||
# for OpenSSL libraries when creating a
|
||||
# static libcurl.lib
|
||||
# 10.14.2003 Added a target release-libcurl-ssl-dll which
|
||||
# is intended to allow static linking of libcurl with dynamic
|
||||
# linking of openssl
|
||||
##############################################################
|
||||
|
||||
LIB_NAME = libcurl
|
||||
LIB_NAME_DEBUG = libcurld
|
||||
!IFNDEF OPENSSL_PATH
|
||||
OPENSSL_PATH = ../../openssl-0.9.7a
|
||||
!ENDIF
|
||||
|
||||
#############################################################
|
||||
## Nothing more to do below this line!
|
||||
|
||||
CCNODBG = cl.exe /MD /O2 /D "NDEBUG"
|
||||
CCDEBUG = cl.exe /MDd /Od /Gm /Zi /D "_DEBUG" /GZ
|
||||
CFLAGSSSL = /D "USE_SSLEAY" /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
|
||||
CFLAGS = /I "." /I "../include" /nologo /W3 /GX /D "WIN32" /D "VC6" /D "_MBCS" /D "_LIB" /YX /FD /c /D "MSDOS"
|
||||
|
||||
LNKDLL = link.exe /DLL /def:libcurl.def
|
||||
LNKLIB = link.exe /lib
|
||||
LFLAGS = /nologo
|
||||
SSLLIBS = libeay32.lib ssleay32.lib
|
||||
# RSAglue.lib was formerly needed in the SSLLIBS
|
||||
CFGSET = FALSE
|
||||
|
||||
######################
|
||||
# release
|
||||
|
||||
!IF "$(CFG)" == "release"
|
||||
TARGET =$(LIB_NAME).lib
|
||||
DIROBJ =.\$(CFG)
|
||||
LNK = $(LNKLIB) /out:$(TARGET)
|
||||
CC = $(CCNODBG)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-dll
|
||||
|
||||
!IF "$(CFG)" == "release-dll"
|
||||
TARGET =$(LIB_NAME).dll
|
||||
DIROBJ =.\$(CFG)
|
||||
LNK = $(LNKDLL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
|
||||
CC = $(CCNODBG)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-ssl
|
||||
|
||||
!IF "$(CFG)" == "release-ssl"
|
||||
TARGET =$(LIB_NAME).lib
|
||||
DIROBJ =.\$(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32"
|
||||
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(TARGET)
|
||||
CC = $(CCNODBG) $(CFLAGSSSL)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-ssl-dll
|
||||
|
||||
!IF "$(CFG)" == "release-ssl-dll"
|
||||
TARGET =$(LIB_NAME).dll
|
||||
DIROBJ =.\$(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
||||
LNK = $(LNKDLL) $(LFLAGSSSL) /out:$(TARGET) /IMPLIB:"$(LIB_NAME).lib"
|
||||
CC = $(CCNODBG) $(CFLAGSSSL)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# release-libcurl-ssl-dll
|
||||
!IF "$(CFG)" == "release-libcurl-ssl-dll"
|
||||
TARGET =$(LIB_NAME).lib
|
||||
DIROBJ =.\$(CFG)
|
||||
LFLAGSSSL = "/LIBPATH:$(OPENSSL_PATH)/out32dll"
|
||||
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(TARGET)
|
||||
CC = $(CCNODBG) $(CFLAGSSSL)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
|
||||
######################
|
||||
# debug
|
||||
|
||||
!IF "$(CFG)" == "debug"
|
||||
TARGET =$(LIB_NAME_DEBUG).lib
|
||||
DIROBJ =.\$(CFG)
|
||||
LNK = $(LNKLIB) /out:$(TARGET)
|
||||
CC = $(CCDEBUG)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# debug-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-dll"
|
||||
TARGET =$(LIB_NAME_DEBUG).dll
|
||||
DIROBJ =.\$(CFG)
|
||||
LNK = $(LNKDLL) /DEBUG /out:$(TARGET) /IMPLIB:"$(LIB_NAME_DEBUG).lib" /PDB:"$(LIB_NAME_DEBUG).pdb"
|
||||
CC = $(CCDEBUG)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# debug-ssl
|
||||
#todo
|
||||
!IF "$(CFG)" == "debug-ssl"
|
||||
TARGET = $(LIB_NAME_DEBUG).lib
|
||||
DIROBJ =.\$(CFG)
|
||||
LNK = $(LNKLIB) $(LFLAGSSSL) /out:$(TARGET)
|
||||
CC = $(CCDEBUG) $(CFLAGSSSL)
|
||||
CFGSET = TRUE
|
||||
!ENDIF
|
||||
|
||||
######################
|
||||
# debug-ssl-dll
|
||||
|
||||
!IF "$(CFG)" == "debug-ssl-dll"
|
||||
TARGET =$(LIB_NAME_DEBUG).dll
|
||||
DIROBJ =.\$(CFG)
|
||||
LFLAGSSSL = /LIBPATH:$(OPENSSL_PATH)/out32dll
|
||||
LNK = $(LNKDLL) $(LFLAGSSSL) /DEBUG /out:$(TARGET) /IMPLIB:"$(LIB_NAME_DEBUG).lib" /PDB:"$(LIB_NAME_DEBUG).pdb"
|
||||
CC = $(CCDEBUG) $(CFLAGSSSL)
|
||||
CFGSET = TRUE
|
||||
RESOURCE = $(DIROBJ)\libcurl.res
|
||||
!ENDIF
|
||||
|
||||
#######################
|
||||
# Usage
|
||||
#
|
||||
!IF "$(CFGSET)" == "FALSE"
|
||||
!MESSAGE Usage: nmake /f makefile.vc6 CFG=<config> <target>
|
||||
!MESSAGE where <config> is one of:
|
||||
!MESSAGE release - release static library
|
||||
!MESSAGE release-dll - release dll
|
||||
!MESSAGE release-ssl - release static library with ssl
|
||||
!MESSAGE release-ssl-dll - release dll library with ssl
|
||||
!MESSAGE release-libcurl-ssl-dll - static libcurl with shared ssl
|
||||
!MESSAGE debug - debug static library
|
||||
!MESSAGE debug-dll - debug dll
|
||||
!MESSAGE debug-ssl - debug static library with ssl
|
||||
!MESSAGE debug-ssl-dll - debug dll library with ssl
|
||||
!MESSAGE <target> can be left blank in which case all is assumed
|
||||
!ERROR please choose a valid configuration "$(CFG)"
|
||||
!ENDIF
|
||||
|
||||
#######################
|
||||
#
|
||||
X_OBJS= \
|
||||
$(DIROBJ)\base64.obj \
|
||||
$(DIROBJ)\cookie.obj \
|
||||
$(DIROBJ)\transfer.obj \
|
||||
$(DIROBJ)\escape.obj \
|
||||
$(DIROBJ)\formdata.obj \
|
||||
$(DIROBJ)\ftp.obj \
|
||||
$(DIROBJ)\http.obj \
|
||||
$(DIROBJ)\http_chunks.obj \
|
||||
$(DIROBJ)\ldap.obj \
|
||||
$(DIROBJ)\dict.obj \
|
||||
$(DIROBJ)\telnet.obj \
|
||||
$(DIROBJ)\getdate.obj \
|
||||
$(DIROBJ)\getenv.obj \
|
||||
$(DIROBJ)\inet_pton.obj \
|
||||
$(DIROBJ)\hostip.obj \
|
||||
$(DIROBJ)\if2ip.obj \
|
||||
$(DIROBJ)\mprintf.obj \
|
||||
$(DIROBJ)\netrc.obj \
|
||||
$(DIROBJ)\progress.obj \
|
||||
$(DIROBJ)\sendf.obj \
|
||||
$(DIROBJ)\speedcheck.obj \
|
||||
$(DIROBJ)\ssluse.obj \
|
||||
$(DIROBJ)\timeval.obj \
|
||||
$(DIROBJ)\url.obj \
|
||||
$(DIROBJ)\file.obj \
|
||||
$(DIROBJ)\getinfo.obj \
|
||||
$(DIROBJ)\version.obj \
|
||||
$(DIROBJ)\easy.obj \
|
||||
$(DIROBJ)\strequal.obj \
|
||||
$(DIROBJ)\strtok.obj \
|
||||
$(DIROBJ)\strtoofft.obj \
|
||||
$(DIROBJ)\connect.obj \
|
||||
$(DIROBJ)\hash.obj \
|
||||
$(DIROBJ)\llist.obj \
|
||||
$(DIROBJ)\share.obj \
|
||||
$(DIROBJ)\multi.obj \
|
||||
$(DIROBJ)\http_digest.obj \
|
||||
$(DIROBJ)\http_negotiate.obj \
|
||||
$(DIROBJ)\http_ntlm.obj \
|
||||
$(DIROBJ)\md5.obj \
|
||||
$(RESOURCE)
|
||||
|
||||
all : $(TARGET)
|
||||
|
||||
|
||||
$(TARGET): $(X_OBJS)
|
||||
$(LNK) $(LFLAGS) $(X_OBJS)
|
||||
|
||||
$(X_OBJS): $(DIROBJ)
|
||||
|
||||
$(DIROBJ):
|
||||
@if not exist "$(DIROBJ)" mkdir $(DIROBJ)
|
||||
|
||||
.SUFFIXES: .c .obj .res
|
||||
|
||||
{.\}.c{$(DIROBJ)\}.obj:
|
||||
$(CC) $(CFLAGS) /Fo"$@" $<
|
||||
|
||||
debug-dll\libcurl.res \
|
||||
debug-ssl-dll\libcurl.res \
|
||||
release-libcurl-ssl-dll\libcurl.res: libcurl.rc
|
||||
rc /dCURLDEBUG=1 /Fo $@ libcurl.rc
|
||||
|
||||
release-dll\libcurl.res \
|
||||
release-ssl-dll\libcurl.res \
|
||||
release-libcurl-ssl-dll\libcurl.res: libcurl.rc
|
||||
rc /dCURLDEBUG=0 /Fo $@ libcurl.rc
|
||||
|
||||
clean:
|
||||
-@erase $(DIROBJ)\*.obj
|
||||
-@erase $(DIROBJ)\*.res
|
||||
-@erase vc60.idb
|
||||
-@erase vc60.pch
|
76
curl/lib/README.ares
Normal file
76
curl/lib/README.ares
Normal file
|
@ -0,0 +1,76 @@
|
|||
$Id: README.ares,v 1.9 2004/01/09 07:45:47 bagder Exp $
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
How To Build libcurl to Use ares For Asynch Name Resolves
|
||||
=========================================================
|
||||
|
||||
ares:
|
||||
ftp://athena-dist.mit.edu/pub/ATHENA/ares/ares-1.1.1.tar.gz
|
||||
http://curl.haxx.se/dev/ares-1.1.1.tar.gz
|
||||
http://curl.sourceforge.net/dev/ares-1.1.1.tar.gz
|
||||
http://curl.planetmirror.com/dev/ares-1.1.1.tar.gz
|
||||
http://curl.tsuren.net/dev/ares-1.1.1.tar.gz
|
||||
|
||||
c-ares: (a patched and improved version of ares)
|
||||
http://curl.haxx.se/beta/arescurl-1.0-pre1.tar.gz
|
||||
|
||||
NOTE
|
||||
libcurl works with ares 1.1.1, but several patches and improvements have
|
||||
been put into the c-ares package which has made it more portable and better
|
||||
working on several platforms.
|
||||
|
||||
Build ares
|
||||
==========
|
||||
|
||||
1. unpack the ares archive
|
||||
2. cd ares-dir
|
||||
3. ./configure
|
||||
4. make
|
||||
|
||||
Build libcurl to use ares in the curl source tree
|
||||
=================================================
|
||||
|
||||
1. name the ares source directory 'ares' in the curl source directory
|
||||
2. ./configure --enable-ares
|
||||
3. make
|
||||
|
||||
Build libcurl to use an installed ares
|
||||
======================================
|
||||
|
||||
1. ./configure --enable-ares=/path/to/ares/install
|
||||
2. make
|
||||
|
||||
Ares and ipv6
|
||||
=============
|
||||
|
||||
If the configure script enables IPv6 support you need to explicitly disable
|
||||
that (--disable-ipv6) since ares isn't IPv6 compatible (yet).
|
||||
|
||||
Ares on win32
|
||||
=============
|
||||
(description brought by Dominick Meglio)
|
||||
|
||||
First I compiled curl-ares. I changed the default C runtime library to be the
|
||||
single-threaded rather than the multi-threaded (this seems to be required to
|
||||
prevent linking errors later on). Then I simply build the areslib project (the
|
||||
other projects adig/ahost seem to fail under MSVC).
|
||||
|
||||
Next was libcurl. I opened lib/config-win32.h and I added a:
|
||||
#define USE_ARES 1
|
||||
|
||||
Next thing I did was I added the path for the ares includes to the include
|
||||
path, and the libares.lib to the libraries.
|
||||
|
||||
Lastly, I also changed libcurl to be single-threaded rather than
|
||||
multi-threaded, again this was to prevent some duplicate symbol errors. I'm
|
||||
not sure why I needed to change everything to single-threaded, but when I
|
||||
didn't I got redefinition errors for several CRT functions (malloc, stricmp,
|
||||
etc.)
|
||||
|
||||
I would have modified the MSVC++ project files, but I only have VC.NET and it
|
||||
uses a different format than VC6.0 so I didn't want to go and change
|
||||
everything and remove VC6.0 support from libcurl.
|
60
curl/lib/README.encoding
Normal file
60
curl/lib/README.encoding
Normal file
|
@ -0,0 +1,60 @@
|
|||
|
||||
Content Encoding Support for libcurl
|
||||
|
||||
* About content encodings:
|
||||
|
||||
HTTP/1.1 [RFC 2616] specifies that a client may request that a server encode
|
||||
its response. This is usually used to compress a response using one of a set
|
||||
of commonly available compression techniques. These schemes are `deflate' (the
|
||||
zlib algorithm), `gzip' and `compress' [sec 3.5, RFC 2616]. A client requests
|
||||
that the sever perform an encoding by including an Accept-Encoding header in
|
||||
the request document. The value of the header should be one of the recognized
|
||||
tokens `deflate', ... (there's a way to register new schemes/tokens, see sec
|
||||
3.5 of the spec). A server MAY honor the client's encoding request. When a
|
||||
response is encoded, the server includes a Content-Encoding header in the
|
||||
response. The value of the Content-Encoding header indicates which scheme was
|
||||
used to encode the data.
|
||||
|
||||
A client may tell a server that it can understand several different encoding
|
||||
schemes. In this case the server may choose any one of those and use it to
|
||||
encode the response (indicating which one using the Content-Encoding header).
|
||||
It's also possible for a client to attach priorities to different schemes so
|
||||
that the server knows which it prefers. See sec 14.3 of RFC 2616 for more
|
||||
information on the Accept-Encoding header.
|
||||
|
||||
* Current support for content encoding:
|
||||
|
||||
Support for the 'deflate' and 'gzip' content encoding are supported by
|
||||
libcurl. Both regular and chunked transfers should work fine. The library
|
||||
zlib is required for this feature. 'deflate' support was added by James
|
||||
Gallagher, and support for the 'gzip' encoding was added by Dan Fandrich.
|
||||
|
||||
* The libcurl interface:
|
||||
|
||||
To cause libcurl to request a content encoding use:
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_ENCODING, <string>)
|
||||
|
||||
where <string> is the intended value of the Accept-Encoding header.
|
||||
|
||||
Currently, libcurl only understands how to process responses that use the
|
||||
"deflate" or "gzip" Content-Encoding, so the only values for CURLOPT_ENCODING
|
||||
that will work (besides "identity," which does nothing) are "deflate" and
|
||||
"gzip" If a response is encoded using the "compress" or methods, libcurl will
|
||||
return an error indicating that the response could not be decoded. If
|
||||
<string> is NULL no Accept-Encoding header is generated. If <string> is a
|
||||
zero-length string, then an Accept-Encoding header containing all supported
|
||||
encodings will be generated.
|
||||
|
||||
The CURLOPT_ENCODING must be set to any non-NULL value for content to be
|
||||
automatically decoded. If it is not set and the server still sends encoded
|
||||
content (despite not having been asked), the data is returned in its raw form
|
||||
and the Content-Encoding type is not checked.
|
||||
|
||||
* The curl interface:
|
||||
|
||||
Use the --compressed option with curl to cause it to ask servers to compress
|
||||
responses using deflate.
|
||||
|
||||
James Gallagher <jgallagher@gso.uri.edu>
|
||||
Dan Fandrich <dan@coneharvesters.com>
|
56
curl/lib/README.memoryleak
Normal file
56
curl/lib/README.memoryleak
Normal file
|
@ -0,0 +1,56 @@
|
|||
$Id: README.memoryleak,v 1.3 2003/07/22 10:00:37 bagder Exp $
|
||||
_ _ ____ _
|
||||
___| | | | _ \| |
|
||||
/ __| | | | |_) | |
|
||||
| (__| |_| | _ <| |___
|
||||
\___|\___/|_| \_\_____|
|
||||
|
||||
How To Track Down Suspected Memory Leaks in libcurl
|
||||
===================================================
|
||||
|
||||
Single-threaded
|
||||
|
||||
Please note that this memory leak system is not adjusted to work in more
|
||||
than one thread. If you want/need to use it in a multi-threaded app. Please
|
||||
adjust accordingly.
|
||||
|
||||
|
||||
Build
|
||||
|
||||
Rebuild libcurl with -DCURLDEBUG (usually, rerunning configure with
|
||||
--enable-debug fixes this). 'make clean' first, then 'make' so that all
|
||||
files actually are rebuilt properly. It will also make sense to build
|
||||
libcurl with the debug option (usually -g to the compiler) so that debugging
|
||||
it will be easier if you actually do find a leak in the library.
|
||||
|
||||
This will create a library that has memory debugging enabled.
|
||||
|
||||
Modify Your Application
|
||||
|
||||
Add a line in your application code:
|
||||
|
||||
curl_memdebug("filename");
|
||||
|
||||
This will make the malloc debug system output a full trace of all resource
|
||||
using functions to the given file name. Make sure you rebuild your program
|
||||
and that you link with the same libcurl you built for this purpose as
|
||||
described above.
|
||||
|
||||
Run Your Application
|
||||
|
||||
Run your program as usual. Watch the specified memory trace file grow.
|
||||
|
||||
Make your program exit and use the proper libcurl cleanup functions etc. So
|
||||
that all non-leaks are returned/freed properly.
|
||||
|
||||
Analyze the Flow
|
||||
|
||||
Use the tests/memanalyze.pl perl script to analyze the memdump file:
|
||||
|
||||
tests/memanalyze.pl < memdump
|
||||
|
||||
This now outputs a report on what resources that were allocated but never
|
||||
freed etc. This report is very fine for posting to the list!
|
||||
|
||||
If this doesn't produce any output, no leak was detected in libcurl. Then
|
||||
the leak is mostly likely to be in your code.
|
49
curl/lib/amigaos.c
Normal file
49
curl/lib/amigaos.c
Normal file
|
@ -0,0 +1,49 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: amigaos.c,v 1.2 2004/01/07 09:19:35 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "amigaos.h"
|
||||
#include <stdio.h> /* for stderr */
|
||||
|
||||
struct Library *SocketBase = NULL;
|
||||
|
||||
void amiga_cleanup()
|
||||
{
|
||||
if(SocketBase)
|
||||
CloseLibrary(SocketBase);
|
||||
|
||||
SocketBase = NULL;
|
||||
}
|
||||
|
||||
BOOL amiga_init()
|
||||
{
|
||||
if(!SocketBase)
|
||||
SocketBase = OpenLibrary("bsdsocket.library", 4);
|
||||
|
||||
if(!SocketBase) {
|
||||
fprintf(stderr, "No TCP/IP Stack running!\n\a");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
atexit(amiga_cleanup);
|
||||
return TRUE;
|
||||
}
|
52
curl/lib/amigaos.h
Normal file
52
curl/lib/amigaos.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: amigaos.h,v 1.3 2004/01/13 08:35:57 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef LIBCURL_AMIGAOS_H
|
||||
#define LIBCURL_AMIGAOS_H
|
||||
|
||||
#ifndef __ixemul__
|
||||
|
||||
#include <exec/types.h>
|
||||
#include <exec/execbase.h>
|
||||
|
||||
#include <proto/exec.h>
|
||||
#include <proto/dos.h>
|
||||
|
||||
#include <bsdsocket.h>
|
||||
|
||||
#include "config-amigaos.h"
|
||||
|
||||
#define select(args...) WaitSelect( args, NULL)
|
||||
#define inet_ntoa(x) Inet_NtoA( x ## .s_addr)
|
||||
#define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
|
||||
#define _AMIGASF 1
|
||||
|
||||
extern void amiga_cleanup();
|
||||
extern BOOL amiga_init();
|
||||
|
||||
#else /* __ixemul__ */
|
||||
|
||||
#warning compiling with ixemul...
|
||||
|
||||
#endif /* __ixemul__ */
|
||||
#endif /* LIBCURL_AMIGAOS_H */
|
101
curl/lib/arpa_telnet.h
Normal file
101
curl/lib/arpa_telnet.h
Normal file
|
@ -0,0 +1,101 @@
|
|||
#ifndef __ARPA_TELNET_H
|
||||
#define __ARPA_TELNET_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: arpa_telnet.h,v 1.11 2004/01/07 09:19:35 bagder Exp $
|
||||
***************************************************************************/
|
||||
#ifndef CURL_DISABLE_TELNET
|
||||
/*
|
||||
* Telnet option defines. Add more here if in need.
|
||||
*/
|
||||
#define CURL_TELOPT_BINARY 0 /* binary 8bit data */
|
||||
#define CURL_TELOPT_SGA 3 /* Supress Go Ahead */
|
||||
#define CURL_TELOPT_EXOPL 255 /* EXtended OPtions List */
|
||||
#define CURL_TELOPT_TTYPE 24 /* Terminal TYPE */
|
||||
#define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */
|
||||
|
||||
#define CURL_TELOPT_NEW_ENVIRON 39 /* NEW ENVIRONment variables */
|
||||
#define CURL_NEW_ENV_VAR 0
|
||||
#define CURL_NEW_ENV_VALUE 1
|
||||
|
||||
/*
|
||||
* The telnet options represented as strings
|
||||
*/
|
||||
static const char *telnetoptions[]=
|
||||
{
|
||||
"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD",
|
||||
"NAME", "STATUS", "TIMING MARK", "RCTE",
|
||||
"NAOL", "NAOP", "NAOCRD", "NAOHTS",
|
||||
"NAOHTD", "NAOFFD", "NAOVTS", "NAOVTD",
|
||||
"NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
|
||||
"DE TERMINAL", "SUPDUP", "SUPDUP OUTPUT", "SEND LOCATION",
|
||||
"TERM TYPE", "END OF RECORD", "TACACS UID", "OUTPUT MARKING",
|
||||
"TTYLOC", "3270 REGIME", "X3 PAD", "NAWS",
|
||||
"TERM SPEED", "LFLOW", "LINEMODE", "XDISPLOC",
|
||||
"OLD-ENVIRON", "AUTHENTICATION", "ENCRYPT", "NEW-ENVIRON"
|
||||
};
|
||||
|
||||
#define CURL_TELOPT_MAXIMUM CURL_TELOPT_NEW_ENVIRON
|
||||
|
||||
#define CURL_TELOPT_OK(x) ((x) <= CURL_TELOPT_MAXIMUM)
|
||||
#define CURL_TELOPT(x) telnetoptions[x]
|
||||
|
||||
#define CURL_NTELOPTS 40
|
||||
|
||||
/*
|
||||
* First some defines
|
||||
*/
|
||||
#define CURL_xEOF 236 /* End Of File */
|
||||
#define CURL_SE 240 /* Sub negotiation End */
|
||||
#define CURL_NOP 241 /* No OPeration */
|
||||
#define CURL_DM 242 /* Data Mark */
|
||||
#define CURL_GA 249 /* Go Ahead, reverse the line */
|
||||
#define CURL_SB 250 /* SuBnegotiation */
|
||||
#define CURL_WILL 251 /* Our side WILL use this option */
|
||||
#define CURL_WONT 252 /* Our side WON'T use this option */
|
||||
#define CURL_DO 253 /* DO use this option! */
|
||||
#define CURL_DONT 254 /* DON'T use this option! */
|
||||
#define CURL_IAC 255 /* Interpret As Command */
|
||||
|
||||
/*
|
||||
* Then those numbers represented as strings:
|
||||
*/
|
||||
static const char *telnetcmds[]=
|
||||
{
|
||||
"EOF", "SUSP", "ABORT", "EOR", "SE",
|
||||
"NOP", "DMARK", "BRK", "IP", "AO",
|
||||
"AYT", "EC", "EL", "GA", "SB",
|
||||
"WILL", "WONT", "DO", "DONT", "IAC"
|
||||
};
|
||||
|
||||
#define CURL_TELCMD_MINIMUM CURL_xEOF /* the first one */
|
||||
#define CURL_TELCMD_MAXIMUM CURL_IAC /* surprise, 255 is the last one! ;-) */
|
||||
|
||||
#define CURL_TELQUAL_IS 0
|
||||
#define CURL_TELQUAL_SEND 1
|
||||
#define CURL_TELQUAL_INFO 2
|
||||
#define CURL_TELQUAL_NAME 3
|
||||
|
||||
#define CURL_TELCMD_OK(x) ( ((unsigned int)(x) >= CURL_TELCMD_MINIMUM) && \
|
||||
((unsigned int)(x) <= CURL_TELCMD_MAXIMUM) )
|
||||
#define CURL_TELCMD(x) telnetcmds[(x)-CURL_TELCMD_MINIMUM]
|
||||
#endif
|
||||
#endif
|
285
curl/lib/base64.c
Normal file
285
curl/lib/base64.c
Normal file
|
@ -0,0 +1,285 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: base64.c,v 1.28 2004/03/01 12:54:59 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/* Base64 encoding/decoding
|
||||
*
|
||||
* Test harnesses down the bottom - compile with -DTEST_ENCODE for
|
||||
* a program that will read in raw data from stdin and write out
|
||||
* a base64-encoded version to stdout, and the length returned by the
|
||||
* encoding function to stderr. Compile with -DTEST_DECODE for a program that
|
||||
* will go the other way.
|
||||
*
|
||||
* This code will break if int is smaller than 32 bits
|
||||
*/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define _MPRINTF_REPLACE /* use our functions only */
|
||||
#include <curl/mprintf.h>
|
||||
|
||||
#include "base64.h"
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
static void decodeQuantum(unsigned char *dest, const char *src)
|
||||
{
|
||||
unsigned int x = 0;
|
||||
int i;
|
||||
for(i = 0; i < 4; i++) {
|
||||
if(src[i] >= 'A' && src[i] <= 'Z')
|
||||
x = (x << 6) + (unsigned int)(src[i] - 'A' + 0);
|
||||
else if(src[i] >= 'a' && src[i] <= 'z')
|
||||
x = (x << 6) + (unsigned int)(src[i] - 'a' + 26);
|
||||
else if(src[i] >= '0' && src[i] <= '9')
|
||||
x = (x << 6) + (unsigned int)(src[i] - '0' + 52);
|
||||
else if(src[i] == '+')
|
||||
x = (x << 6) + 62;
|
||||
else if(src[i] == '/')
|
||||
x = (x << 6) + 63;
|
||||
else if(src[i] == '=')
|
||||
x = (x << 6);
|
||||
}
|
||||
|
||||
dest[2] = (unsigned char)(x & 255);
|
||||
x >>= 8;
|
||||
dest[1] = (unsigned char)(x & 255);
|
||||
x >>= 8;
|
||||
dest[0] = (unsigned char)(x & 255);
|
||||
}
|
||||
|
||||
/*
|
||||
* Curl_base64_decode()
|
||||
*
|
||||
* Given a base64 string at src, decode it into the memory pointed to by
|
||||
* dest. Returns the length of the decoded data.
|
||||
*/
|
||||
size_t Curl_base64_decode(const char *src, char *dest)
|
||||
{
|
||||
int length = 0;
|
||||
int equalsTerm = 0;
|
||||
int i;
|
||||
int numQuantums;
|
||||
unsigned char lastQuantum[3];
|
||||
size_t rawlen=0;
|
||||
|
||||
while((src[length] != '=') && src[length])
|
||||
length++;
|
||||
while(src[length+equalsTerm] == '=')
|
||||
equalsTerm++;
|
||||
|
||||
numQuantums = (length + equalsTerm) / 4;
|
||||
|
||||
rawlen = (numQuantums * 3) - equalsTerm;
|
||||
|
||||
for(i = 0; i < numQuantums - 1; i++) {
|
||||
decodeQuantum((unsigned char *)dest, src);
|
||||
dest += 3; src += 4;
|
||||
}
|
||||
|
||||
decodeQuantum(lastQuantum, src);
|
||||
for(i = 0; i < 3 - equalsTerm; i++)
|
||||
dest[i] = lastQuantum[i];
|
||||
|
||||
return rawlen;
|
||||
}
|
||||
|
||||
/* ---- Base64 Encoding --- */
|
||||
static char table64[]=
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
/*
|
||||
* Curl_base64_encode()
|
||||
*
|
||||
* Returns the length of the newly created base64 string. The third argument
|
||||
* is a pointer to an allocated area holding the base64 data. If something
|
||||
* went wrong, -1 is returned.
|
||||
*
|
||||
*/
|
||||
size_t Curl_base64_encode(const char *inp, size_t insize, char **outptr)
|
||||
{
|
||||
unsigned char ibuf[3];
|
||||
unsigned char obuf[4];
|
||||
int i;
|
||||
int inputparts;
|
||||
char *output;
|
||||
char *base64data;
|
||||
|
||||
char *indata = (char *)inp;
|
||||
|
||||
if(0 == insize)
|
||||
insize = strlen(indata);
|
||||
|
||||
base64data = output = (char*)malloc(insize*4/3+4);
|
||||
if(NULL == output)
|
||||
return 0;
|
||||
|
||||
while(insize > 0) {
|
||||
for (i = inputparts = 0; i < 3; i++) {
|
||||
if(insize > 0) {
|
||||
inputparts++;
|
||||
ibuf[i] = *indata;
|
||||
indata++;
|
||||
insize--;
|
||||
}
|
||||
else
|
||||
ibuf[i] = 0;
|
||||
}
|
||||
|
||||
obuf [0] = (ibuf [0] & 0xFC) >> 2;
|
||||
obuf [1] = ((ibuf [0] & 0x03) << 4) | ((ibuf [1] & 0xF0) >> 4);
|
||||
obuf [2] = ((ibuf [1] & 0x0F) << 2) | ((ibuf [2] & 0xC0) >> 6);
|
||||
obuf [3] = ibuf [2] & 0x3F;
|
||||
|
||||
switch(inputparts) {
|
||||
case 1: /* only one byte read */
|
||||
sprintf(output, "%c%c==",
|
||||
table64[obuf[0]],
|
||||
table64[obuf[1]]);
|
||||
break;
|
||||
case 2: /* two bytes read */
|
||||
sprintf(output, "%c%c%c=",
|
||||
table64[obuf[0]],
|
||||
table64[obuf[1]],
|
||||
table64[obuf[2]]);
|
||||
break;
|
||||
default:
|
||||
sprintf(output, "%c%c%c%c",
|
||||
table64[obuf[0]],
|
||||
table64[obuf[1]],
|
||||
table64[obuf[2]],
|
||||
table64[obuf[3]] );
|
||||
break;
|
||||
}
|
||||
output += 4;
|
||||
}
|
||||
*output=0;
|
||||
*outptr = base64data; /* make it return the actual data memory */
|
||||
|
||||
return strlen(base64data); /* return the length of the new data */
|
||||
}
|
||||
/* ---- End of Base64 Encoding ---- */
|
||||
|
||||
/************* TEST HARNESS STUFF ****************/
|
||||
|
||||
|
||||
#ifdef TEST_ENCODE
|
||||
/* encoding test harness. Read in standard input and write out the length
|
||||
* returned by Curl_base64_encode, followed by the base64'd data itself
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NEED_SUCK
|
||||
void *suck(int *);
|
||||
|
||||
int main(int argc, char **argv, char **envp)
|
||||
{
|
||||
char *base64;
|
||||
size_t base64Len;
|
||||
unsigned char *data;
|
||||
int dataLen;
|
||||
|
||||
data = (unsigned char *)suck(&dataLen);
|
||||
base64Len = Curl_base64_encode(data, dataLen, &base64);
|
||||
|
||||
fprintf(stderr, "%d\n", base64Len);
|
||||
fprintf(stdout, "%s", base64);
|
||||
|
||||
free(base64); free(data);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST_DECODE
|
||||
/* decoding test harness. Read in a base64 string from stdin and write out the
|
||||
* length returned by Curl_base64_decode, followed by the decoded data itself
|
||||
*
|
||||
* gcc -DTEST_DECODE base64.c -o base64 mprintf.o memdebug.o
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
#define TEST_NEED_SUCK
|
||||
void *suck(int *);
|
||||
|
||||
int main(int argc, char **argv, char **envp)
|
||||
{
|
||||
char *base64;
|
||||
int base64Len;
|
||||
unsigned char *data;
|
||||
int dataLen;
|
||||
int i, j;
|
||||
|
||||
base64 = (char *)suck(&base64Len);
|
||||
data = (unsigned char *)malloc(base64Len * 3/4 + 8);
|
||||
dataLen = Curl_base64_decode(base64, data);
|
||||
|
||||
fprintf(stderr, "%d\n", dataLen);
|
||||
|
||||
for(i=0; i < dataLen; i+=0x10) {
|
||||
printf("0x%02x: ", i);
|
||||
for(j=0; j < 0x10; j++)
|
||||
if((j+i) < dataLen)
|
||||
printf("%02x ", data[i+j]);
|
||||
else
|
||||
printf(" ");
|
||||
|
||||
printf(" | ");
|
||||
|
||||
for(j=0; j < 0x10; j++)
|
||||
if((j+i) < dataLen)
|
||||
printf("%c", isgraph(data[i+j])?data[i+j]:'.');
|
||||
else
|
||||
break;
|
||||
puts("");
|
||||
}
|
||||
|
||||
free(base64); free(data);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST_NEED_SUCK
|
||||
/* this function 'sucks' in as much as possible from stdin */
|
||||
void *suck(int *lenptr)
|
||||
{
|
||||
int cursize = 8192;
|
||||
unsigned char *buf = NULL;
|
||||
int lastread;
|
||||
int len = 0;
|
||||
|
||||
do {
|
||||
cursize *= 2;
|
||||
buf = (unsigned char *)realloc(buf, cursize);
|
||||
memset(buf + len, 0, cursize - len);
|
||||
lastread = fread(buf + len, 1, cursize - len, stdin);
|
||||
len += lastread;
|
||||
} while(!feof(stdin));
|
||||
|
||||
lenptr[0] = len;
|
||||
return (void *)buf;
|
||||
}
|
||||
#endif
|
27
curl/lib/base64.h
Normal file
27
curl/lib/base64.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef __BASE64_H
|
||||
#define __BASE64_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: base64.h,v 1.14 2004/02/23 11:44:03 bagder Exp $
|
||||
***************************************************************************/
|
||||
size_t Curl_base64_encode(const char *input, size_t size, char **str);
|
||||
size_t Curl_base64_decode(const char *source, char *dest);
|
||||
#endif
|
4371
curl/lib/ca-bundle.crt
Normal file
4371
curl/lib/ca-bundle.crt
Normal file
File diff suppressed because it is too large
Load diff
2
curl/lib/ca-bundle.h
Normal file
2
curl/lib/ca-bundle.h
Normal file
|
@ -0,0 +1,2 @@
|
|||
/* This file is generated automatically */
|
||||
#undef CURL_CA_BUNDLE /* unknown */
|
84
curl/lib/config-amigaos.h
Normal file
84
curl/lib/config-amigaos.h
Normal file
|
@ -0,0 +1,84 @@
|
|||
|
||||
#ifndef LIBCURL_CONFIG_AMIGAOS_H
|
||||
#define LIBCURL_CONFIG_AMIGAOS_H
|
||||
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
#define HAVE_INET_ADDR 1
|
||||
#define HAVE_INET_NTOA 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_IOCTLSOCKET_CASE 1
|
||||
#define HAVE_LIBCRYPTO 1
|
||||
#define HAVE_LIBSSL 1
|
||||
#define HAVE_LIBZ 1
|
||||
#define HAVE_LONGLONG 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_NETDB_H 1
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_NET_IF_H 1
|
||||
#define HAVE_OPENSSL_CRYPTO_H 1
|
||||
#define HAVE_OPENSSL_ERR_H 1
|
||||
#define HAVE_OPENSSL_PEM_H 1
|
||||
#define HAVE_OPENSSL_RSA_H 1
|
||||
#define HAVE_OPENSSL_SSL_H 1
|
||||
#define HAVE_OPENSSL_X509_H 1
|
||||
#define HAVE_PERROR 1
|
||||
#define HAVE_PWD_H 1
|
||||
#define HAVE_RAND_EGD 1
|
||||
#define HAVE_RAND_STATUS 1
|
||||
#define HAVE_SELECT 1
|
||||
#define HAVE_SETJMP_H 1
|
||||
#define HAVE_SGTTY_H 1
|
||||
#define HAVE_SIGNAL 1
|
||||
#define HAVE_SOCKET 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRFTIME 1
|
||||
#define HAVE_STRICMP 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_SOCKIO_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_TERMIOS_H 1
|
||||
#define HAVE_TERMIO_H 1
|
||||
#define HAVE_TIME_H 1
|
||||
#define HAVE_UNAME 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_UTIME_H 1
|
||||
#define HAVE_WRITABLE_ARGV 1
|
||||
#define HAVE_ZLIB_H 1
|
||||
|
||||
#define OS "AmigaOS"
|
||||
|
||||
#define PACKAGE "curl"
|
||||
#define PACKAGE_BUGREPORT "curl-bug@haxx.se"
|
||||
#define PACKAGE_NAME "curl"
|
||||
#define PACKAGE_STRING "curl -"
|
||||
#define PACKAGE_TARNAME "curl"
|
||||
#define PACKAGE_VERSION "-"
|
||||
#define CURL_CA_BUNDLE "s:curl-ca-bundle.crt"
|
||||
|
||||
#define RETSIGTYPE void
|
||||
#define SELECT_TYPE_ARG1 int
|
||||
#define SELECT_TYPE_ARG234 (fd_set *)
|
||||
#define SELECT_TYPE_ARG5 (struct timeval *)
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
#define in_addr_t int
|
||||
#define socklen_t int
|
||||
|
||||
#ifndef O_RDONLY
|
||||
# define O_RDONLY 0x0000
|
||||
#endif
|
||||
|
||||
#endif /* LIBCURL_CONFIG_AMIGAOS_H */
|
45
curl/lib/config-mac.h
Normal file
45
curl/lib/config-mac.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
#define OS "mac"
|
||||
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
#define HAVE_NETDB_H 1
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_NET_IF_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_TIME_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_UTIME 1
|
||||
#define HAVE_INET_NTOA 1
|
||||
#define HAVE_SETVBUF 1
|
||||
#define HAVE_STRFTIME 1
|
||||
#define HAVE_INET_ADDR 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_SELECT 1
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
//#define HAVE_STRICMP 1
|
||||
#define HAVE_SIGACTION 1
|
||||
|
||||
#ifdef MACOS_SSL_SUPPORT
|
||||
# define USE_SSLEAY 1
|
||||
# define USE_OPENSSL 1
|
||||
#endif
|
||||
|
||||
#define HAVE_RAND_STATUS 1
|
||||
#define HAVE_RAND_EGD 1
|
||||
|
||||
#define HAVE_FIONBIO 1
|
||||
|
||||
#include <extra/stricmp.h>
|
||||
#include <extra/strdup.h>
|
485
curl/lib/config-netware.h
Normal file
485
curl/lib/config-netware.h
Normal file
|
@ -0,0 +1,485 @@
|
|||
/* lib/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* to disable DICT */
|
||||
#undef CURL_DISABLE_DICT
|
||||
|
||||
/* to disable FILE */
|
||||
#undef CURL_DISABLE_FILE
|
||||
|
||||
/* to disable FTP */
|
||||
#undef CURL_DISABLE_FTP
|
||||
|
||||
/* to disable GOPHER */
|
||||
#undef CURL_DISABLE_GOPHER
|
||||
|
||||
/* to disable HTTP */
|
||||
#undef CURL_DISABLE_HTTP
|
||||
|
||||
/* to disable LDAP */
|
||||
#undef CURL_DISABLE_LDAP
|
||||
|
||||
/* to disable TELNET */
|
||||
#undef CURL_DISABLE_TELNET
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
#undef DISABLED_THREADSAFE
|
||||
|
||||
/* your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define to 1 if you have the `closesocket' function. */
|
||||
#undef HAVE_CLOSESOCKET
|
||||
|
||||
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
|
||||
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
|
||||
|
||||
/* Define to 1 if you have the <crypto.h> header file. */
|
||||
#undef HAVE_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <des.h> header file. */
|
||||
#undef HAVE_DES_H
|
||||
|
||||
/* disabled non-blocking sockets */
|
||||
#undef HAVE_DISABLED_NONBLOCKING
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* XXX: #undef HAVE_DLFCN_H */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `dlopen' function. */
|
||||
#define HAVE_DLOPEN 1
|
||||
|
||||
/* Define to 1 if you have the <err.h> header file. */
|
||||
#define HAVE_ERR_H 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* use FIONBIO for non-blocking sockets */
|
||||
/* XXX: #undef HAVE_FIONBIO */
|
||||
#define HAVE_FIONBIO 1
|
||||
|
||||
/* Define if getaddrinfo exists and works */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr' function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr_r' function. */
|
||||
#undef HAVE_GETHOSTBYADDR_R
|
||||
|
||||
/* gethostbyaddr_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* gethostbyaddr_r() takes 7 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* gethostbyaddr_r() takes 8 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname_r' function. */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* gethostbyname_r() takes 3 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* gethostbyname_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* gethostbyname_r() takes 6 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define to 1 if you have the `getpass_r' function. */
|
||||
#undef HAVE_GETPASS_R
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
#undef HAVE_GETPWUID
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#undef HAVE_GMTIME_R
|
||||
|
||||
/* if you have the gssapi libraries */
|
||||
#undef HAVE_GSSAPI
|
||||
|
||||
/* if you have the Heimdal gssapi libraries */
|
||||
#undef HAVE_GSSHEIMDAL
|
||||
|
||||
/* if you have the MIT gssapi libraries */
|
||||
#undef HAVE_GSSMIT
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#define HAVE_INET_NTOA 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa_r' function. */
|
||||
#undef HAVE_INET_NTOA_R
|
||||
|
||||
/* inet_ntoa_r() is declared */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#define HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET
|
||||
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET_CASE
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
/* if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
|
||||
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
|
||||
|
||||
/* Define to 1 if you have the <krb.h> header file. */
|
||||
#undef HAVE_KRB_H
|
||||
|
||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
#undef HAVE_LIBCRYPTO
|
||||
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||
#undef HAVE_LIBRESOLVE
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
/* If zlib is available */
|
||||
#undef HAVE_LIBZ
|
||||
//#define HAVE_LIBZ 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* if your compiler supports 'long long' */
|
||||
#define HAVE_LONGLONG 1
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/crypto.h> header file. */
|
||||
#undef HAVE_OPENSSL_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
#undef HAVE_OPENSSL_ENGINE_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||
#undef HAVE_OPENSSL_PEM_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||
#undef HAVE_OPENSSL_RSA_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/x509.h> header file. */
|
||||
#undef HAVE_OPENSSL_X509_H
|
||||
|
||||
/* use O_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_O_NONBLOCK
|
||||
|
||||
/* Define to 1 if you have the <pem.h> header file. */
|
||||
#undef HAVE_PEM_H
|
||||
|
||||
/* Define to 1 if you have the `perror' function. */
|
||||
#undef HAVE_PERROR
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#undef HAVE_POLL
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the `RAND_egd' function. */
|
||||
#undef HAVE_RAND_EGD
|
||||
|
||||
/* Define to 1 if you have the `RAND_screen' function. */
|
||||
#undef HAVE_RAND_SCREEN
|
||||
|
||||
/* Define to 1 if you have the `RAND_status' function. */
|
||||
#undef HAVE_RAND_STATUS
|
||||
|
||||
/* Define to 1 if you have the <rsa.h> header file. */
|
||||
#undef HAVE_RSA_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#define HAVE_SETJMP_H 1
|
||||
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the `siginterrupt' function. */
|
||||
#undef HAVE_SIGINTERRUPT
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* If you have sigsetjmp */
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* use SO_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_SO_NONBLOCK
|
||||
|
||||
/* Define this if you have the SPNEGO library fbopenssl */
|
||||
#undef HAVE_SPNEGO
|
||||
|
||||
/* Define to 1 if you have the <ssl.h> header file. */
|
||||
#undef HAVE_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strcmpi' function. */
|
||||
#undef HAVE_STRCMPI
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define to 1 if you have the `stricmp' function. */
|
||||
#undef HAVE_STRICMP
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#define HAVE_STRLCAT 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#define HAVE_STRLCPY 1
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#undef HAVE_STRTOLL
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
#define HAVE_SYS_SOCKIO_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#undef HAVE_SYS_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the `tcgetattr' function. */
|
||||
#undef HAVE_TCGETATTR
|
||||
|
||||
/* Define to 1 if you have the `tcsetattr' function. */
|
||||
#undef HAVE_TCSETATTR
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define to 1 if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `utime' function. */
|
||||
#undef HAVE_UTIME
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#undef HAVE_WINSOCK_H
|
||||
|
||||
/* Define this symbol if your OS supports changing the contents of argv */
|
||||
#undef HAVE_WRITABLE_ARGV
|
||||
|
||||
/* Define to 1 if you have the <x509.h> header file. */
|
||||
#undef HAVE_X509_H
|
||||
|
||||
/* if you have the zlib.h header file */
|
||||
#define HAVE_ZLIB_H 1
|
||||
|
||||
/* need REENTRANT defined */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* cpu-machine-OS */
|
||||
#define OS "i386-pc-NetWare"
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#undef SELECT_TYPE_ARG1
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#undef SELECT_TYPE_ARG234
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* The size of a `curl_off_t', as computed by sizeof. */
|
||||
#define SIZEOF_CURL_OFF_T 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
/* XXX: #undef STDC_HEADERS */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if you want to enable ares support */
|
||||
#undef USE_ARES
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* type to use in place of in_addr_t if not defined */
|
||||
#undef in_addr_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* type to use in place of socklen_t if not defined */
|
||||
#define socklen_t int
|
||||
|
||||
/* the signed version of size_t */
|
||||
#undef ssize_t
|
||||
|
||||
|
393
curl/lib/config-riscos.h
Normal file
393
curl/lib/config-riscos.h
Normal file
|
@ -0,0 +1,393 @@
|
|||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
/* Name of this package! */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Version number of this archive. */
|
||||
#undef VERSION
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
#undef HAVE_GETPASS
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#define OS "ARM-RISC OS"
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 7 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 8 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 3 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 6 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define if you have the inet_ntoa_r function declared. */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define if you need the _REENTRANT define for some functions */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* Define if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Define this to 'int' if ssize_t is not an available typedefed type */
|
||||
#undef ssize_t
|
||||
|
||||
/* Define this to 'int' if socklen_t is not an available typedefed type */
|
||||
#undef socklen_t
|
||||
|
||||
/* Define this as a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define this to your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* Define if you have a working OpenSSL installation */
|
||||
#undef OPENSSL_ENABLED
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
#define DISABLED_THREADSAFE
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Define if you have the <alloca.h> header file. */
|
||||
#define HAVE_ALLOCA_H
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H
|
||||
|
||||
/* Define if you have the `closesocket' function. */
|
||||
#undef HAVE_CLOSESOCKET
|
||||
|
||||
/* Define if you have the <crypto.h> header file. */
|
||||
#undef HAVE_CRYPTO_H
|
||||
|
||||
/* Define if you have the <des.h> header file. */
|
||||
#undef HAVE_DES_H
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if you have the `dlopen' function. */
|
||||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define if you have the <err.h> header file. */
|
||||
#undef HAVE_ERR_H
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H
|
||||
|
||||
/* Define if getaddrinfo exists and works */
|
||||
#define HAVE_GETADDRINFO
|
||||
|
||||
/* Define if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define if you have the `gethostbyaddr' function. */
|
||||
#define HAVE_GETHOSTBYADDR
|
||||
|
||||
/* Define if you have the `gethostbyaddr_r' function. */
|
||||
#undef HAVE_GETHOSTBYADDR_R
|
||||
|
||||
/* Define if you have the `gethostbyname_r' function. */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* Define if you have the `gethostname' function. */
|
||||
#define HAVE_GETHOSTNAME
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H
|
||||
|
||||
/* Define if you have the `getpass_r' function. */
|
||||
#undef HAVE_GETPASS_R
|
||||
|
||||
/* Define if you have the `getpwuid' function. */
|
||||
#undef HAVE_GETPWUID
|
||||
|
||||
/* Define if you have the `getservbyname' function. */
|
||||
#undef HAVE_GETSERVBYNAME
|
||||
|
||||
/* Define if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define if you have the `inet_addr' function. */
|
||||
#undef HAVE_INET_ADDR
|
||||
|
||||
/* Define if you have the `inet_ntoa' function. */
|
||||
#undef HAVE_INET_NTOA
|
||||
|
||||
/* Define if you have the `inet_ntoa_r' function. */
|
||||
#undef HAVE_INET_NTOA_R
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H
|
||||
|
||||
/* Define if you have the `krb_get_our_ip_for_realm' function. */
|
||||
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
|
||||
|
||||
/* Define if you have the <krb.h> header file. */
|
||||
#undef HAVE_KRB_H
|
||||
|
||||
/* Define if you have the `crypto' library (-lcrypto). */
|
||||
#undef HAVE_LIBCRYPTO
|
||||
|
||||
/* Define if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define if you have the `resolve' library (-lresolve). */
|
||||
#undef HAVE_LIBRESOLVE
|
||||
|
||||
/* Define if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define if you have the `ssl' library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
/* Define if you have the `ucb' library (-lucb). */
|
||||
#undef HAVE_LIBUCB
|
||||
|
||||
/* Define if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H
|
||||
|
||||
/* Define if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H
|
||||
|
||||
/* Define if you have the <netinet/if_ether.h> header file. */
|
||||
#undef HAVE_NETINET_IF_ETHER_H
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H
|
||||
|
||||
/* Define if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H
|
||||
|
||||
/* Define if you have the <openssl/crypto.h> header file. */
|
||||
#undef HAVE_OPENSSL_CRYPTO_H
|
||||
|
||||
/* Define if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define if you have the <openssl/pem.h> header file. */
|
||||
#undef HAVE_OPENSSL_PEM_H
|
||||
|
||||
/* Define if you have the <openssl/rsa.h> header file. */
|
||||
#undef HAVE_OPENSSL_RSA_H
|
||||
|
||||
/* Define if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
/* Define if you have the <openssl/x509.h> header file. */
|
||||
#undef HAVE_OPENSSL_X509_H
|
||||
|
||||
/* Define if you have the <pem.h> header file. */
|
||||
#undef HAVE_PEM_H
|
||||
|
||||
/* Define if you have the `perror' function. */
|
||||
#undef HAVE_PERROR
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define if you have the `RAND_egd' function. */
|
||||
#undef HAVE_RAND_EGD
|
||||
|
||||
/* Define if you have the `RAND_screen' function. */
|
||||
#undef HAVE_RAND_SCREEN
|
||||
|
||||
/* Define if you have the `RAND_status' function. */
|
||||
#undef HAVE_RAND_STATUS
|
||||
|
||||
/* Define if you have the <rsa.h> header file. */
|
||||
#undef HAVE_RSA_H
|
||||
|
||||
/* Define if you have the `select' function. */
|
||||
#define HAVE_SELECT
|
||||
|
||||
/* Define if you have the `setvbuf' function. */
|
||||
#undef HAVE_SETVBUF
|
||||
|
||||
/* Define if you have the <sgtty.h> header file. */
|
||||
#define HAVE_SGTTY_H
|
||||
|
||||
/* Define if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define if you have the `signal' function. */
|
||||
#define HAVE_SIGNAL
|
||||
|
||||
/* Define if you have the `socket' function. */
|
||||
#define HAVE_SOCKET
|
||||
|
||||
/* Define if you have the <ssl.h> header file. */
|
||||
#undef HAVE_SSL_H
|
||||
|
||||
/* Define if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H
|
||||
|
||||
/* Define if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define if you have the `strcmpi' function. */
|
||||
#undef HAVE_STRCMPI
|
||||
|
||||
/* Define if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP
|
||||
|
||||
/* Define if you have the `strftime' function. */
|
||||
#define HAVE_STRFTIME
|
||||
|
||||
/* Define if you have the `stricmp' function. */
|
||||
#define HAVE_STRICMP
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H
|
||||
|
||||
/* Define if you have the `strlcat' function. */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define if you have the `strlcpy' function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR
|
||||
|
||||
/* Define if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
/* Define if you have the `strtoll' function. */
|
||||
#undef HAVE_STRTOLL
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
#undef HAVE_SYS_SOCKIO_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define if you have the `tcgetattr' function. */
|
||||
#define HAVE_TCGETATTR
|
||||
|
||||
/* Define if you have the `tcsetattr' function. */
|
||||
#define HAVE_TCSETATTR
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define if you have the `uname' function. */
|
||||
#define HAVE_UNAME
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
#undef HAVE_WINSOCK_H
|
||||
|
||||
/* Define if you have the <x509.h> header file. */
|
||||
#undef HAVE_X509_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* The size of a `long double', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_DOUBLE
|
||||
|
||||
/* The size of a `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* type to use in place of socklen_t if not defined */
|
||||
#undef socklen_t
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
#undef ssize_t
|
||||
|
||||
/* this is a quick hack. I hope it's correct. */
|
||||
#define ifr_dstaddr ifr_addr
|
||||
|
||||
#define IOCTL_3_ARGS
|
||||
|
||||
#define HAVE_FIONBIO
|
||||
|
384
curl/lib/config-vms.h
Normal file
384
curl/lib/config-vms.h
Normal file
|
@ -0,0 +1,384 @@
|
|||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
#undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
#undef const
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#define OS "ALPHA-COMPAQ-VMS"
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 7 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* Define if you have the gethostbyaddr_r() function with 8 arguments */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 3 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 5 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* Define if you have the gethostbyname_r() function with 6 arguments */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define if you have the inet_ntoa_r function declared. */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define if you need the _REENTRANT define for some functions */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* Define if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define this to 'int' if ssize_t is not an available typedefed type */
|
||||
#undef ssize_t
|
||||
|
||||
/* Define this to 'int' if socklen_t is not an available typedefed type */
|
||||
#define socklen_t size_t
|
||||
|
||||
/* Define this as a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define this to your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* The number of bytes in a long double. */
|
||||
#define SIZEOF_LONG_DOUBLE 8
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
|
||||
/* Define if you have the RAND_egd function. */
|
||||
#undef HAVE_RAND_EGD
|
||||
|
||||
/* Define if you have the RAND_screen function. */
|
||||
#undef HAVE_RAND_SCREEN
|
||||
|
||||
/* Define if you have the RAND_status function. */
|
||||
#undef HAVE_RAND_STATUS
|
||||
|
||||
/* Define if you have the closesocket function. */
|
||||
#undef HAVE_CLOSESOCKET
|
||||
|
||||
/* Define if you have the geteuid function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define if you have the gethostbyaddr function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define if you have the gethostbyaddr_r function. */
|
||||
#undef HAVE_GETHOSTBYADDR_R
|
||||
|
||||
/* Define if you have the gethostbyname_r function. */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define if you have the getpass_r function. */
|
||||
#undef HAVE_GETPASS_R
|
||||
|
||||
/* Define if you have the getpwuid function. */
|
||||
#define HAVE_GETPWUID 1
|
||||
|
||||
/* Define if you have the getservbyname function. */
|
||||
#define HAVE_GETSERVBYNAME 1
|
||||
|
||||
/* Define if you have the gettimeofday function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define if you have the inet_addr function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define if you have the inet_ntoa function. */
|
||||
#define HAVE_INET_NTOA 1
|
||||
|
||||
/* Define if you have the inet_ntoa_r function. */
|
||||
#undef HAVE_INET_NTOA_R
|
||||
|
||||
/* Define if you have the krb_get_our_ip_for_realm function. */
|
||||
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
|
||||
|
||||
/* Define if you have the localtime_r function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define if you have the perror function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the setvbuf function. */
|
||||
#undef HAVE_SETVBUF
|
||||
|
||||
/* Define if you have the sigaction function. */
|
||||
#define HAVE_SIGACTION 1
|
||||
|
||||
/* Define if you have the signal function. */
|
||||
#define HAVE_SIGNAL 1
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define if you have the strcmpi function. */
|
||||
#define HAVE_STRCMPI 1
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define if you have the strlcat function. */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define if you have the strlcpy function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define if you have the tcgetattr function. */
|
||||
#undef HAVE_TCGETATTR
|
||||
|
||||
/* Define if you have the tcsetattr function. */
|
||||
#undef HAVE_TCSETATTR
|
||||
|
||||
/* Define if you have the uname function. */
|
||||
#define HAVE_UNAME 1
|
||||
|
||||
/* Define if you have the <alloca.h> header file. */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define if you have the <crypto.h> header file. */
|
||||
#undef HAVE_CRYPTO_H
|
||||
|
||||
/* Define if you have the <des.h> header file. */
|
||||
#undef HAVE_DES_H
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define if you have the <err.h> header file. */
|
||||
#define HAVE_ERR_H 1
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
/* Define if you have the <krb.h> header file. */
|
||||
#undef HAVE_KRB_H
|
||||
|
||||
/* Define if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <net/if.h> header file. */
|
||||
#define HAVE_NET_IF_H 1
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define if you have the <netinet/if_ether.h> header file. */
|
||||
#define HAVE_NETINET_IF_ETHER_H 1
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define if you have the <openssl/crypto.h> header file. */
|
||||
#define HAVE_OPENSSL_CRYPTO_H 1
|
||||
|
||||
/* Define if you have the <openssl/err.h> header file. */
|
||||
#define HAVE_OPENSSL_ERR_H 1
|
||||
|
||||
/* Define if you have the <openssl/pem.h> header file. */
|
||||
#define HAVE_OPENSSL_PEM_H 1
|
||||
|
||||
/* Define if you have the <openssl/rsa.h> header file. */
|
||||
#define HAVE_OPENSSL_RSA_H 1
|
||||
|
||||
/* Define if you have the <openssl/ssl.h> header file. */
|
||||
#define HAVE_OPENSSL_SSL_H 1
|
||||
|
||||
/* Define if you have the <openssl/x509.h> header file. */
|
||||
#define HAVE_OPENSSL_X509_H 1
|
||||
|
||||
/* Define if you have the <pem.h> header file. */
|
||||
#undef HAVE_PEM_H
|
||||
|
||||
/* Define if you have the <pwd.h> header file. */
|
||||
#define HAVE_PWD_H 1
|
||||
|
||||
/* Define if you have the <rsa.h> header file. */
|
||||
#undef HAVE_RSA_H
|
||||
|
||||
/* Define if you have the <sgtty.h> header file. */
|
||||
#define HAVE_SGTTY_H 1
|
||||
|
||||
/* Define if you have the <ssl.h> header file. */
|
||||
#undef HAVE_SSL_H
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
#undef HAVE_SYS_SOCKIO_H
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
#define HAVE_TERMIOS_H 1
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
#undef HAVE_WINSOCK_H
|
||||
|
||||
/* Define if you have the <x509.h> header file. */
|
||||
#undef HAVE_X509_H
|
||||
|
||||
/* Define if you have the crypto library (-lcrypto). */
|
||||
#define HAVE_LIBCRYPTO 1
|
||||
|
||||
/* Define if you have the dl library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if you have the nsl library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define if you have the resolv library (-lresolv). */
|
||||
#define HAVE_LIBRESOLV 1
|
||||
|
||||
/* Define if you have the resolve library (-lresolve). */
|
||||
#undef HAVE_LIBRESOLVE
|
||||
|
||||
/* Define if you have the socket library (-lsocket). */
|
||||
#define HAVE_LIBSOCKET 1
|
||||
|
||||
/* Define if you have the ssl library (-lssl). */
|
||||
#define HAVE_LIBSSL 1
|
||||
|
||||
/* Define if you have the ucb library (-lucb). */
|
||||
#undef HAVE_LIBUCB
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define if getaddrinfo exists and works */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
#undef DISABLED_THREADSAFE
|
||||
|
||||
#define HAVE_TIMEVAL_H 1
|
||||
|
||||
/* Name of this package! */
|
||||
#define PACKAGE "not-used"
|
||||
|
||||
/* Version number of this archive. */
|
||||
#define VERSION "not-used"
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
#undef HAVE_GETPASS
|
||||
|
||||
/* Define if you have a working OpenSSL installation */
|
||||
#define OPENSSL_ENABLED 1
|
||||
|
||||
/* Define if you have the `dlopen' function. */
|
||||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
/* Define if you have the `strtoll' function. */
|
||||
#undef HAVE_STRTOLL
|
||||
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
#define HAVE_FIONBIO 1
|
||||
|
||||
/* Define if you have the `sigsetjmp' function. */
|
||||
#define HAVE_SIGSETJMP 1
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#define HAVE_SETJMP_H 1
|
||||
|
||||
/*
|
||||
* This needs to be defined for OpenSSL 0.9.7 and other versions that have the
|
||||
* ENGINE stuff supported. If an include of "openssl/engine.h" fails, then
|
||||
* undefine the define below.
|
||||
*/
|
||||
#define HAVE_OPENSSL_ENGINE_H 1
|
231
curl/lib/config-win32.h
Normal file
231
curl/lib/config-win32.h
Normal file
|
@ -0,0 +1,231 @@
|
|||
/* config.h. Generated automatically by configure. */
|
||||
/* config.h.in. Generated automatically from configure.in by autoheader. */
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
/* #undef _ALL_SOURCE */
|
||||
#endif
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define if you don't have vprintf but do have _doprnt. */
|
||||
/* #undef HAVE_DOPRNT */
|
||||
|
||||
/* Define if you have the vprintf function. */
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
/* Define as the return type of signal handlers (int or void). */
|
||||
/*#define RETSIGTYPE void */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define this to 'int' if ssize_t is not an available typedefed type */
|
||||
#define ssize_t int
|
||||
|
||||
/* Define this to 'int' if socklen_t is not an available typedefed type */
|
||||
#if !defined(ENABLE_IPV6) && ((_MSC_VER < 1300) || !defined(USE_SSLEAY))
|
||||
#define socklen_t int
|
||||
#endif
|
||||
|
||||
/* The size of a `curl_off_t', as computed by sizeof. */
|
||||
#ifdef SIZEOF_CURL_OFF_T
|
||||
#undef SIZEOF_CURL_OFF_T
|
||||
#endif
|
||||
|
||||
#define SIZEOF_CURL_OFF_T 8
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* #define TIME_WITH_SYS_TIME 1 */
|
||||
|
||||
/* Define cpu-machine-OS */
|
||||
#define OS "i386-pc-win32"
|
||||
|
||||
/* The number of bytes in a long double. */
|
||||
#define SIZEOF_LONG_DOUBLE 16
|
||||
|
||||
/* The number of bytes in a long long. */
|
||||
/* #define SIZEOF_LONG_LONG 8 */
|
||||
|
||||
/* Define if you have the gethostbyaddr function. */
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
|
||||
/* Define if you have the gethostname function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Define if you have the getpass function. */
|
||||
/*#define HAVE_GETPASS 1*/
|
||||
|
||||
/* Define if you have the getservbyname function. */
|
||||
#define HAVE_GETSERVBYNAME 1
|
||||
|
||||
/* Define if you have the gettimeofday function. */
|
||||
/* #define HAVE_GETTIMEOFDAY 1 */
|
||||
|
||||
/* Define if you have the inet_addr function. */
|
||||
#define HAVE_INET_ADDR 1
|
||||
|
||||
/* Define if you have the inet_ntoa function. */
|
||||
#define HAVE_INET_NTOA 1
|
||||
|
||||
/* Define if you have the perror function. */
|
||||
#define HAVE_PERROR 1
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the socket function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/*#define HAVE_STRCASECMP 1*/
|
||||
|
||||
/* Define if you have the stricmp function. */
|
||||
#define HAVE_STRICMP 1
|
||||
|
||||
/* Define if you have the strdup function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define if you have the strftime function. */
|
||||
#define HAVE_STRFTIME 1
|
||||
|
||||
/* Define if you have the strstr function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define if you have the strtoll function. */
|
||||
#ifdef MINGW32
|
||||
#define HAVE_STRTOLL 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the tcgetattr function. */
|
||||
/*#define HAVE_TCGETATTR 1*/
|
||||
|
||||
/* Define if you have the tcsetattr function. */
|
||||
/*#define HAVE_TCSETATTR 1*/
|
||||
|
||||
/* Define if you have the uname function. */
|
||||
/*#define HAVE_UNAME 1*/
|
||||
|
||||
/* Define if you have utime() */
|
||||
#define HAVE_UTIME 1
|
||||
|
||||
/* Define if you have the <alloca.h> header file. */
|
||||
/*#define HAVE_ALLOCA_H 1*/
|
||||
|
||||
/* Define if you have the malloc.h file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define if you have the <arpa/inet.h> header file. */
|
||||
/* #define HAVE_ARPA_INET_H 1 */
|
||||
|
||||
/* Define if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
||||
/* Define if you have the <crypto.h> header file. */
|
||||
/* #undef HAVE_CRYPTO_H */
|
||||
|
||||
/* Define if you have the <dlfcn.h> header file. */
|
||||
/*#define HAVE_DLFCN_H 1*/
|
||||
|
||||
/* Define if you have the <err.h> header file. */
|
||||
/* #undef HAVE_ERR_H */
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define if you have the <getopt.h> header file. */
|
||||
/* #undef HAVE_GETOPT_H */
|
||||
|
||||
/* Define if you have the <netdb.h> header file. */
|
||||
/* #define HAVE_NETDB_H 1 */
|
||||
|
||||
/* Define if you have the <netinet/in.h> header file. */
|
||||
/*#define HAVE_NETINET_IN_H 1*/
|
||||
|
||||
/* Define if you have the <sgtty.h> header file. */
|
||||
/*#define HAVE_SGTTY_H 1*/
|
||||
|
||||
/* Define if you have the <ssl.h> header file. */
|
||||
/* #undef HAVE_SSL_H */
|
||||
|
||||
/* Define if you have the <sys/param.h> header file. */
|
||||
/*#define HAVE_SYS_PARAM_H 1*/
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
/* #define HAVE_SYS_SELECT_H 1 */
|
||||
|
||||
/* Define if you have the <sys/socket.h> header file. */
|
||||
/*#define HAVE_SYS_SOCKET_H 1*/
|
||||
|
||||
/* Define if you have the <sys/sockio.h> header file. */
|
||||
/* #define HAVE_SYS_SOCKIO_H 1 */
|
||||
|
||||
/* Define if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define if you have the <sys/utime.h> header file */
|
||||
#define HAVE_SYS_UTIME_H 1
|
||||
|
||||
/* Define if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define if you have the <termio.h> header file. */
|
||||
/* #define HAVE_TERMIO_H 1 */
|
||||
|
||||
/* Define if you have the <termios.h> header file. */
|
||||
/* #define HAVE_TERMIOS_H 1 */
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "curl"
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H 1
|
||||
|
||||
/* Define if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define if you have the <winsock.h> header file. */
|
||||
#define HAVE_WINSOCK_H 1
|
||||
|
||||
/* Define if you have the <winsock2.h> header file. */
|
||||
#define HAVE_WINSOCK2_H 1
|
||||
|
||||
/* Define if you have the <ws2tcpip.h> header file. */
|
||||
#define HAVE_WS2TCPIP_H 1
|
||||
|
||||
/* Define if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define if you have the closesocket function. */
|
||||
#define HAVE_CLOSESOCKET 1
|
||||
|
||||
/* Define if you have the setvbuf function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
/* Define if you have the RAND_screen function when using SSL */
|
||||
#define HAVE_RAND_SCREEN 1
|
||||
|
||||
/* Define if you have the `RAND_status' function. */
|
||||
#define HAVE_RAND_STATUS 1
|
||||
|
||||
/* Define this to if in_addr_t is not an available typedefed type */
|
||||
#define in_addr_t unsigned long
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
#define HAVE_IOCTLSOCKET
|
||||
|
||||
/*************************************************
|
||||
* This section is for compiler specific defines.*
|
||||
*************************************************/
|
||||
#if defined(MINGW32) || defined(__WATCOMC__) /* Borland and MS don't have this */
|
||||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
#endif
|
101
curl/lib/config.dj
Normal file
101
curl/lib/config.dj
Normal file
|
@ -0,0 +1,101 @@
|
|||
#ifndef _CURL_CONFIG_DJGPP_H
|
||||
#define _CURL_CONFIG_DJGPP_H
|
||||
|
||||
#define OS "MSDOS/djgpp"
|
||||
#define PACKAGE "curl"
|
||||
|
||||
#define CURL_CA_BUNDLE "/dev/env/CURL_CA_BUNDLE"
|
||||
|
||||
#if (DJGPP_MINOR >= 4)
|
||||
/* #define HAVE_DLOPEN 1 maybe not (DXE3) */
|
||||
#endif
|
||||
|
||||
#define HAVE_ALARM 1
|
||||
#define HAVE_ASSERT_T 1
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
#define HAVE_CLOSESOCKET 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_GETHOSTBYADDR 1
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
#define HAVE_GETPASS 1
|
||||
#define HAVE_GETSERVBYNAME 1
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_INET_ADDR 1
|
||||
#define HAVE_INET_NTOA 1
|
||||
#define HAVE_IO_H 1
|
||||
#define HAVE_IOCTLSOCKET 1
|
||||
#define HAVE_INET_PTON 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_NETDB_H 1
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
#define HAVE_NET_IF_H 1
|
||||
#define HAVE_PERROR 1
|
||||
#define HAVE_SELECT 1
|
||||
#define HAVE_SETJMP_H 1
|
||||
#define HAVE_SETVBUF 1
|
||||
#define HAVE_SIGNAL 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SIGSETJMP 1
|
||||
#define HAVE_SOCKET 1
|
||||
#define HAVE_STRCASECMP 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRFTIME 1
|
||||
#define HAVE_STRICMP 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_TERMIOS_H 1
|
||||
#define HAVE_TIME_H 1
|
||||
#define HAVE_UNAME 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_VPRINTF 1
|
||||
|
||||
#define RETSIGTYPE void
|
||||
#define SIZEOF_LONG_DOUBLE 16
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define STDC_HEADERS 1
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
#define BSD
|
||||
|
||||
/* #define MALLOCDEBUG */
|
||||
|
||||
#ifdef USE_ZLIB /* on cmd-line */
|
||||
#define HAVE_ZLIB_H 1
|
||||
#define HAVE_LIBZ 1
|
||||
#endif
|
||||
|
||||
#ifdef USE_SSLEAY /* on cmd-line */
|
||||
#define HAVE_OPENSSL_X509_H 1
|
||||
#define HAVE_OPENSSL_SSL_H 1
|
||||
#define HAVE_OPENSSL_RSA_H 1
|
||||
#define HAVE_OPENSSL_PEM_H 1
|
||||
#define HAVE_OPENSSL_ERR_H 1
|
||||
#define HAVE_OPENSSL_CRYPTO_H 1
|
||||
#define HAVE_OPENSSL_ENGINE_H 1
|
||||
#define HAVE_LIBSSL 1
|
||||
#define HAVE_LIBCRYPTO 1
|
||||
#define OPENSSL_NO_KRB5 1
|
||||
#endif
|
||||
|
||||
/* Because djgpp < 2.03 doesn't have snprintf() etc.
|
||||
*/
|
||||
#if (DJGPP_MINOR < 4)
|
||||
#define _MPRINTF_REPLACE
|
||||
#endif
|
||||
|
||||
#define in_addr_t u_long
|
||||
#define socklen_t int
|
||||
#define ssize_t int
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <tcp.h> /* Watt-32 API */
|
||||
|
||||
#undef word
|
||||
|
||||
#endif /* _CURL_CONFIG_DJGPP_H */
|
||||
|
485
curl/lib/config.h.in
Normal file
485
curl/lib/config.h.in
Normal file
|
@ -0,0 +1,485 @@
|
|||
/* lib/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* to disable DICT */
|
||||
#undef CURL_DISABLE_DICT
|
||||
|
||||
/* to disable FILE */
|
||||
#undef CURL_DISABLE_FILE
|
||||
|
||||
/* to disable FTP */
|
||||
#undef CURL_DISABLE_FTP
|
||||
|
||||
/* to disable GOPHER */
|
||||
#undef CURL_DISABLE_GOPHER
|
||||
|
||||
/* to disable HTTP */
|
||||
#undef CURL_DISABLE_HTTP
|
||||
|
||||
/* to disable LDAP */
|
||||
#undef CURL_DISABLE_LDAP
|
||||
|
||||
/* to disable TELNET */
|
||||
#undef CURL_DISABLE_TELNET
|
||||
|
||||
/* Set to explicitly specify we don't want to use thread-safe functions */
|
||||
#undef DISABLED_THREADSAFE
|
||||
|
||||
/* your Entropy Gathering Daemon socket pathname */
|
||||
#undef EGD_SOCKET
|
||||
|
||||
/* Define if you want to enable IPv6 support */
|
||||
#undef ENABLE_IPV6
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#undef HAVE_ASSERT_H
|
||||
|
||||
/* Define to 1 if you have the `closesocket' function. */
|
||||
#undef HAVE_CLOSESOCKET
|
||||
|
||||
/* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function. */
|
||||
#undef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA
|
||||
|
||||
/* Define to 1 if you have the <crypto.h> header file. */
|
||||
#undef HAVE_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <des.h> header file. */
|
||||
#undef HAVE_DES_H
|
||||
|
||||
/* disabled non-blocking sockets */
|
||||
#undef HAVE_DISABLED_NONBLOCKING
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the `dlopen' function. */
|
||||
#undef HAVE_DLOPEN
|
||||
|
||||
/* Define to 1 if you have the <err.h> header file. */
|
||||
#undef HAVE_ERR_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* use FIONBIO for non-blocking sockets */
|
||||
#undef HAVE_FIONBIO
|
||||
|
||||
/* Define if getaddrinfo exists and works */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#undef HAVE_GETEUID
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr' function. */
|
||||
#undef HAVE_GETHOSTBYADDR
|
||||
|
||||
/* Define to 1 if you have the `gethostbyaddr_r' function. */
|
||||
#undef HAVE_GETHOSTBYADDR_R
|
||||
|
||||
/* gethostbyaddr_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_5
|
||||
|
||||
/* gethostbyaddr_r() takes 7 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_7
|
||||
|
||||
/* gethostbyaddr_r() takes 8 args */
|
||||
#undef HAVE_GETHOSTBYADDR_R_8
|
||||
|
||||
/* If you have gethostbyname */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname_r' function. */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
|
||||
/* gethostbyname_r() takes 3 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_3
|
||||
|
||||
/* gethostbyname_r() takes 5 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_5
|
||||
|
||||
/* gethostbyname_r() takes 6 args */
|
||||
#undef HAVE_GETHOSTBYNAME_R_6
|
||||
|
||||
/* Define to 1 if you have the `getpass_r' function. */
|
||||
#undef HAVE_GETPASS_R
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
#undef HAVE_GETPWUID
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#undef HAVE_GMTIME_R
|
||||
|
||||
/* if you have the gssapi libraries */
|
||||
#undef HAVE_GSSAPI
|
||||
|
||||
/* if you have the Heimdal gssapi libraries */
|
||||
#undef HAVE_GSSHEIMDAL
|
||||
|
||||
/* if you have the MIT gssapi libraries */
|
||||
#undef HAVE_GSSMIT
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#undef HAVE_INET_ADDR
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#undef HAVE_INET_NTOA
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa_r' function. */
|
||||
#undef HAVE_INET_NTOA_R
|
||||
|
||||
/* inet_ntoa_r() is declared */
|
||||
#undef HAVE_INET_NTOA_R_DECL
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#undef HAVE_INET_PTON
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* use ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET
|
||||
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET_CASE
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
/* if you have the Kerberos4 libraries (including -ldes) */
|
||||
#undef HAVE_KRB4
|
||||
|
||||
/* Define to 1 if you have the `krb_get_our_ip_for_realm' function. */
|
||||
#undef HAVE_KRB_GET_OUR_IP_FOR_REALM
|
||||
|
||||
/* Define to 1 if you have the <krb.h> header file. */
|
||||
#undef HAVE_KRB_H
|
||||
|
||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
#undef HAVE_LIBCRYPTO
|
||||
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define to 1 if you have the `resolve' library (-lresolve). */
|
||||
#undef HAVE_LIBRESOLVE
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
/* if zlib is available */
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* if your compiler supports 'long long' */
|
||||
#undef HAVE_LONGLONG
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#undef HAVE_MALLOC_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
#undef HAVE_NET_IF_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/crypto.h> header file. */
|
||||
#undef HAVE_OPENSSL_CRYPTO_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/engine.h> header file. */
|
||||
#undef HAVE_OPENSSL_ENGINE_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/err.h> header file. */
|
||||
#undef HAVE_OPENSSL_ERR_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/pem.h> header file. */
|
||||
#undef HAVE_OPENSSL_PEM_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/rsa.h> header file. */
|
||||
#undef HAVE_OPENSSL_RSA_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
#undef HAVE_OPENSSL_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <openssl/x509.h> header file. */
|
||||
#undef HAVE_OPENSSL_X509_H
|
||||
|
||||
/* use O_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_O_NONBLOCK
|
||||
|
||||
/* Define to 1 if you have the <pem.h> header file. */
|
||||
#undef HAVE_PEM_H
|
||||
|
||||
/* Define to 1 if you have the `perror' function. */
|
||||
#undef HAVE_PERROR
|
||||
|
||||
/* Define to 1 if you have the `poll' function. */
|
||||
#undef HAVE_POLL
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the `RAND_egd' function. */
|
||||
#undef HAVE_RAND_EGD
|
||||
|
||||
/* Define to 1 if you have the `RAND_screen' function. */
|
||||
#undef HAVE_RAND_SCREEN
|
||||
|
||||
/* Define to 1 if you have the `RAND_status' function. */
|
||||
#undef HAVE_RAND_STATUS
|
||||
|
||||
/* Define to 1 if you have the <rsa.h> header file. */
|
||||
#undef HAVE_RSA_H
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the <setjmp.h> header file. */
|
||||
#undef HAVE_SETJMP_H
|
||||
|
||||
/* Define to 1 if you have the <sgtty.h> header file. */
|
||||
#undef HAVE_SGTTY_H
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the `siginterrupt' function. */
|
||||
#undef HAVE_SIGINTERRUPT
|
||||
|
||||
/* Define to 1 if you have the `signal' function. */
|
||||
#undef HAVE_SIGNAL
|
||||
|
||||
/* If you have sigsetjmp */
|
||||
#undef HAVE_SIGSETJMP
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* use SO_NONBLOCK for non-blocking sockets */
|
||||
#undef HAVE_SO_NONBLOCK
|
||||
|
||||
/* Define this if you have the SPNEGO library fbopenssl */
|
||||
#undef HAVE_SPNEGO
|
||||
|
||||
/* Define to 1 if you have the <ssl.h> header file. */
|
||||
#undef HAVE_SSL_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#undef HAVE_STRCASECMP
|
||||
|
||||
/* Define to 1 if you have the `strcmpi' function. */
|
||||
#undef HAVE_STRCMPI
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#undef HAVE_STRDUP
|
||||
|
||||
/* Define to 1 if you have the `strftime' function. */
|
||||
#undef HAVE_STRFTIME
|
||||
|
||||
/* Define to 1 if you have the `stricmp' function. */
|
||||
#undef HAVE_STRICMP
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#undef HAVE_STRSTR
|
||||
|
||||
/* Define to 1 if you have the `strtok_r' function. */
|
||||
#undef HAVE_STRTOK_R
|
||||
|
||||
/* Define to 1 if you have the `strtoll' function. */
|
||||
#undef HAVE_STRTOLL
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
#undef HAVE_SYS_SOCKIO_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#undef HAVE_SYS_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the `tcgetattr' function. */
|
||||
#undef HAVE_TCGETATTR
|
||||
|
||||
/* Define to 1 if you have the `tcsetattr' function. */
|
||||
#undef HAVE_TCSETATTR
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
||||
|
||||
/* Define to 1 if you have the <termio.h> header file. */
|
||||
#undef HAVE_TERMIO_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#undef HAVE_UNAME
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `utime' function. */
|
||||
#undef HAVE_UTIME
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the <winsock.h> header file. */
|
||||
#undef HAVE_WINSOCK_H
|
||||
|
||||
/* Define this symbol if your OS supports changing the contents of argv */
|
||||
#undef HAVE_WRITABLE_ARGV
|
||||
|
||||
/* Define to 1 if you have the <x509.h> header file. */
|
||||
#undef HAVE_X509_H
|
||||
|
||||
/* if you have the zlib.h header file */
|
||||
#undef HAVE_ZLIB_H
|
||||
|
||||
/* need REENTRANT defined */
|
||||
#undef NEED_REENTRANT
|
||||
|
||||
/* cpu-machine-OS */
|
||||
#undef OS
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* a suitable file to read random data from */
|
||||
#undef RANDOM_FILE
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to the type of arg 1 for `select'. */
|
||||
#undef SELECT_TYPE_ARG1
|
||||
|
||||
/* Define to the type of args 2, 3 and 4 for `select'. */
|
||||
#undef SELECT_TYPE_ARG234
|
||||
|
||||
/* Define to the type of arg 5 for `select'. */
|
||||
#undef SELECT_TYPE_ARG5
|
||||
|
||||
/* The size of a `curl_off_t', as computed by sizeof. */
|
||||
#undef SIZEOF_CURL_OFF_T
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#undef TIME_WITH_SYS_TIME
|
||||
|
||||
/* Define if you want to enable ares support */
|
||||
#undef USE_ARES
|
||||
|
||||
/* If you want to build curl with the built-in manual */
|
||||
#undef USE_MANUAL
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define to 1 if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# undef _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
/* Number of bits in a file offset, on hosts where this is settable. */
|
||||
#undef _FILE_OFFSET_BITS
|
||||
|
||||
/* Define for large files, on AIX-style hosts. */
|
||||
#undef _LARGE_FILES
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
||||
|
||||
/* type to use in place of in_addr_t if not defined */
|
||||
#undef in_addr_t
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* type to use in place of socklen_t if not defined */
|
||||
#undef socklen_t
|
||||
|
||||
/* the signed version of size_t */
|
||||
#undef ssize_t
|
715
curl/lib/connect.c
Normal file
715
curl/lib/connect.c
Normal file
|
@ -0,0 +1,715 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: connect.c,v 1.82 2004/03/17 12:46:45 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifndef WIN32
|
||||
/* headers for non-win32 */
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h> /* required for free() prototype, without it, this crashes
|
||||
on macos 68K */
|
||||
#endif
|
||||
#if (defined(HAVE_FIONBIO) && defined(__NOVELL_LIBC__))
|
||||
#include <sys/filio.h>
|
||||
#endif
|
||||
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
|
||||
#undef in_addr_t
|
||||
#define in_addr_t unsigned long
|
||||
#endif
|
||||
#ifdef VMS
|
||||
#include <in.h>
|
||||
#include <inet.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#define EINPROGRESS WSAEINPROGRESS
|
||||
#define EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define EISCONN WSAEISCONN
|
||||
#define ENOTSOCK WSAENOTSOCK
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include "sendf.h"
|
||||
#include "if2ip.h"
|
||||
#include "connect.h"
|
||||
|
||||
/* The last #include file should be: */
|
||||
#ifdef CURLDEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
static bool verifyconnect(curl_socket_t sockfd);
|
||||
|
||||
int Curl_ourerrno(void)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return (int)GetLastError();
|
||||
#else
|
||||
return errno;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* Curl_nonblock
|
||||
*
|
||||
* Description:
|
||||
* Set the socket to either blocking or non-blocking mode.
|
||||
*/
|
||||
|
||||
int Curl_nonblock(curl_socket_t sockfd, /* operate on this */
|
||||
int nonblock /* TRUE or FALSE */)
|
||||
{
|
||||
#undef SETBLOCK
|
||||
#ifdef HAVE_O_NONBLOCK
|
||||
/* most recent unix versions */
|
||||
int flags;
|
||||
|
||||
flags = fcntl(sockfd, F_GETFL, 0);
|
||||
if (TRUE == nonblock)
|
||||
return fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
|
||||
else
|
||||
return fcntl(sockfd, F_SETFL, flags & (~O_NONBLOCK));
|
||||
#define SETBLOCK 1
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FIONBIO
|
||||
/* older unix versions */
|
||||
int flags;
|
||||
|
||||
flags = nonblock;
|
||||
return ioctl(sockfd, FIONBIO, &flags);
|
||||
#define SETBLOCK 2
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IOCTLSOCKET
|
||||
/* Windows? */
|
||||
int flags;
|
||||
flags = nonblock;
|
||||
return ioctlsocket(sockfd, FIONBIO, &flags);
|
||||
#define SETBLOCK 3
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IOCTLSOCKET_CASE
|
||||
/* presumably for Amiga */
|
||||
return IoctlSocket(sockfd, FIONBIO, (long)nonblock);
|
||||
#define SETBLOCK 4
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SO_NONBLOCK
|
||||
/* BeOS */
|
||||
long b = nonblock ? 1 : 0;
|
||||
return setsockopt(sockfd, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b));
|
||||
#define SETBLOCK 5
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DISABLED_NONBLOCKING
|
||||
return 0; /* returns success */
|
||||
#define SETBLOCK 6
|
||||
#endif
|
||||
|
||||
#ifndef SETBLOCK
|
||||
#error "no non-blocking method was found/used/set"
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* waitconnect() returns:
|
||||
* 0 fine connect
|
||||
* -1 select() error
|
||||
* 1 select() timeout
|
||||
* 2 select() returned with an error condition
|
||||
*/
|
||||
static
|
||||
int waitconnect(curl_socket_t sockfd, /* socket */
|
||||
long timeout_msec)
|
||||
{
|
||||
fd_set fd;
|
||||
fd_set errfd;
|
||||
struct timeval interval;
|
||||
int rc;
|
||||
#ifdef mpeix
|
||||
/* Call this function once now, and ignore the results. We do this to
|
||||
"clear" the error state on the socket so that we can later read it
|
||||
reliably. This is reported necessary on the MPE/iX operating system. */
|
||||
verifyconnect(sockfd);
|
||||
#endif
|
||||
|
||||
/* now select() until we get connect or timeout */
|
||||
FD_ZERO(&fd);
|
||||
FD_SET(sockfd, &fd);
|
||||
|
||||
FD_ZERO(&errfd);
|
||||
FD_SET(sockfd, &errfd);
|
||||
|
||||
interval.tv_sec = timeout_msec/1000;
|
||||
timeout_msec -= interval.tv_sec*1000;
|
||||
|
||||
interval.tv_usec = timeout_msec*1000;
|
||||
|
||||
rc = select(sockfd+1, NULL, &fd, &errfd, &interval);
|
||||
if(-1 == rc)
|
||||
/* error, no connect here, try next */
|
||||
return -1;
|
||||
|
||||
else if(0 == rc)
|
||||
/* timeout, no connect today */
|
||||
return 1;
|
||||
|
||||
if(FD_ISSET(sockfd, &errfd))
|
||||
/* error condition caught */
|
||||
return 2;
|
||||
|
||||
/* we have a connect! */
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CURLcode bindlocal(struct connectdata *conn,
|
||||
curl_socket_t sockfd)
|
||||
{
|
||||
#ifdef HAVE_INET_NTOA
|
||||
bool bindworked = FALSE;
|
||||
struct SessionHandle *data = conn->data;
|
||||
|
||||
/*************************************************************
|
||||
* Select device to bind socket to
|
||||
*************************************************************/
|
||||
if (strlen(data->set.device)<255) {
|
||||
struct Curl_dns_entry *h=NULL;
|
||||
size_t size;
|
||||
char myhost[256] = "";
|
||||
in_addr_t in;
|
||||
int rc;
|
||||
bool was_iface = FALSE;
|
||||
|
||||
/* First check if the given name is an IP address */
|
||||
in=inet_addr(data->set.device);
|
||||
|
||||
if((in == CURL_INADDR_NONE) &&
|
||||
Curl_if2ip(data->set.device, myhost, sizeof(myhost))) {
|
||||
/*
|
||||
* We now have the numerical IPv4-style x.y.z.w in the 'myhost' buffer
|
||||
*/
|
||||
rc = Curl_resolv(conn, myhost, 0, &h);
|
||||
if(rc == 1)
|
||||
(void)Curl_wait_for_resolv(conn, &h);
|
||||
|
||||
if(h)
|
||||
was_iface = TRUE;
|
||||
}
|
||||
|
||||
if(!was_iface) {
|
||||
/*
|
||||
* This was not an interface, resolve the name as a host name
|
||||
* or IP number
|
||||
*/
|
||||
rc = Curl_resolv(conn, data->set.device, 0, &h);
|
||||
if(rc == 1)
|
||||
(void)Curl_wait_for_resolv(conn, &h);
|
||||
|
||||
if(h)
|
||||
/* we know data->set.device is shorter than the myhost array */
|
||||
strcpy(myhost, data->set.device);
|
||||
}
|
||||
|
||||
if(! *myhost) {
|
||||
/* need to fix this
|
||||
h=Curl_gethost(data,
|
||||
getmyhost(*myhost,sizeof(myhost)),
|
||||
hostent_buf,
|
||||
sizeof(hostent_buf));
|
||||
*/
|
||||
failf(data, "Couldn't bind to '%s'", data->set.device);
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
|
||||
infof(data, "We bind local end to %s\n", myhost);
|
||||
|
||||
#ifdef SO_BINDTODEVICE
|
||||
/* I am not sure any other OSs than Linux that provide this feature, and
|
||||
* at the least I cannot test. --Ben
|
||||
*
|
||||
* This feature allows one to tightly bind the local socket to a
|
||||
* particular interface. This will force even requests to other local
|
||||
* interfaces to go out the external interface.
|
||||
*
|
||||
*/
|
||||
if (was_iface) {
|
||||
/* Only bind to the interface when specified as interface, not just as a
|
||||
* hostname or ip address.
|
||||
*/
|
||||
if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
|
||||
data->set.device, strlen(data->set.device)+1) != 0) {
|
||||
/* printf("Failed to BINDTODEVICE, socket: %d device: %s error: %s\n",
|
||||
sockfd, data->set.device, strerror(errno)); */
|
||||
infof(data, "SO_BINDTODEVICE %s failed\n",
|
||||
data->set.device);
|
||||
/* This is typiclally "errno 1, error: Operation not permitted" if
|
||||
you're not running as root or another suitable privileged user */
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
in=inet_addr(myhost);
|
||||
if (CURL_INADDR_NONE != in) {
|
||||
|
||||
if ( h ) {
|
||||
Curl_addrinfo *addr = h->addr;
|
||||
|
||||
Curl_resolv_unlock(data, h);
|
||||
/* we don't need it anymore after this function has returned */
|
||||
|
||||
#ifdef ENABLE_IPV6
|
||||
if( bind(sockfd, addr->ai_addr, addr->ai_addrlen) >= 0) {
|
||||
/* we succeeded to bind */
|
||||
struct sockaddr_in6 add;
|
||||
|
||||
bindworked = TRUE;
|
||||
|
||||
size = sizeof(add);
|
||||
if(getsockname(sockfd, (struct sockaddr *) &add,
|
||||
(socklen_t *)&size)<0) {
|
||||
failf(data, "getsockname() failed");
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
struct sockaddr_in sa;
|
||||
|
||||
memset((char *)&sa, 0, sizeof(sa));
|
||||
memcpy((char *)&sa.sin_addr, addr->h_addr, addr->h_length);
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_addr.s_addr = in;
|
||||
sa.sin_port = 0; /* get any port */
|
||||
|
||||
if( bind(sockfd, (struct sockaddr *)&sa, sizeof(sa)) >= 0) {
|
||||
/* we succeeded to bind */
|
||||
struct sockaddr_in add;
|
||||
|
||||
bindworked = TRUE;
|
||||
|
||||
size = sizeof(add);
|
||||
if(getsockname(sockfd, (struct sockaddr *) &add,
|
||||
(socklen_t *)&size)<0) {
|
||||
failf(data, "getsockname() failed");
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(!bindworked) {
|
||||
switch(errno) {
|
||||
case EBADF:
|
||||
failf(data, "Invalid descriptor: %d", errno);
|
||||
break;
|
||||
case EINVAL:
|
||||
failf(data, "Invalid request: %d", errno);
|
||||
break;
|
||||
case EACCES:
|
||||
failf(data, "Address is protected, user not superuser: %d", errno);
|
||||
break;
|
||||
case ENOTSOCK:
|
||||
failf(data,
|
||||
"Argument is a descriptor for a file, not a socket: %d",
|
||||
errno);
|
||||
break;
|
||||
case EFAULT:
|
||||
failf(data, "Inaccessable memory error: %d", errno);
|
||||
break;
|
||||
case ENAMETOOLONG:
|
||||
failf(data, "Address too long: %d", errno);
|
||||
break;
|
||||
case ENOMEM:
|
||||
failf(data, "Insufficient kernel memory was available: %d", errno);
|
||||
break;
|
||||
default:
|
||||
failf(data, "errno %d", errno);
|
||||
break;
|
||||
} /* end of switch(errno) */
|
||||
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
} /* end of else */
|
||||
|
||||
} /* end of if h */
|
||||
else {
|
||||
failf(data,"could't find my own IP address (%s)", myhost);
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
} /* end of inet_addr */
|
||||
|
||||
else {
|
||||
failf(data, "could't find my own IP address (%s)", myhost);
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
|
||||
return CURLE_OK;
|
||||
|
||||
} /* end of device selection support */
|
||||
#endif /* end of HAVE_INET_NTOA */
|
||||
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
|
||||
/*
|
||||
* verifyconnect() returns TRUE if the connect really has happened.
|
||||
*/
|
||||
static bool verifyconnect(curl_socket_t sockfd)
|
||||
{
|
||||
#if defined(SO_ERROR) && !defined(WIN32)
|
||||
int err = 0;
|
||||
socklen_t errSize = sizeof(err);
|
||||
if( -1 == getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
|
||||
(void *)&err, &errSize))
|
||||
err = Curl_ourerrno();
|
||||
|
||||
if ((0 == err) || (EISCONN == err))
|
||||
/* we are connected, awesome! */
|
||||
return TRUE;
|
||||
|
||||
/* This wasn't a successful connect */
|
||||
return FALSE;
|
||||
#else
|
||||
(void)sockfd;
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Curl_is_connected() is used from the multi interface to check if the
|
||||
* firstsocket has connected.
|
||||
*/
|
||||
|
||||
CURLcode Curl_is_connected(struct connectdata *conn,
|
||||
curl_socket_t sockfd,
|
||||
bool *connected)
|
||||
{
|
||||
int rc;
|
||||
struct SessionHandle *data = conn->data;
|
||||
|
||||
*connected = FALSE; /* a very negative world view is best */
|
||||
|
||||
if(data->set.timeout || data->set.connecttimeout) {
|
||||
/* there is a timeout set */
|
||||
|
||||
/* Evaluate in milliseconds how much time that has passed */
|
||||
long has_passed = Curl_tvdiff(Curl_tvnow(), data->progress.start);
|
||||
|
||||
/* subtract the most strict timeout of the ones */
|
||||
if(data->set.timeout && data->set.connecttimeout) {
|
||||
if (data->set.timeout < data->set.connecttimeout)
|
||||
has_passed -= data->set.timeout*1000;
|
||||
else
|
||||
has_passed -= data->set.connecttimeout*1000;
|
||||
}
|
||||
else if(data->set.timeout)
|
||||
has_passed -= data->set.timeout*1000;
|
||||
else
|
||||
has_passed -= data->set.connecttimeout*1000;
|
||||
|
||||
if(has_passed > 0 ) {
|
||||
/* time-out, bail out, go home */
|
||||
failf(data, "Connection time-out");
|
||||
return CURLE_OPERATION_TIMEOUTED;
|
||||
}
|
||||
}
|
||||
if(conn->bits.tcpconnect) {
|
||||
/* we are connected already! */
|
||||
*connected = TRUE;
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
/* check for connect without timeout as we want to return immediately */
|
||||
rc = waitconnect(sockfd, 0);
|
||||
|
||||
if(0 == rc) {
|
||||
if (verifyconnect(sockfd)) {
|
||||
/* we are connected, awesome! */
|
||||
*connected = TRUE;
|
||||
return CURLE_OK;
|
||||
}
|
||||
/* nope, not connected for real */
|
||||
failf(data, "Connection failed");
|
||||
return CURLE_COULDNT_CONNECT;
|
||||
}
|
||||
else if(1 != rc) {
|
||||
int error = Curl_ourerrno();
|
||||
failf(data, "Failed connect to %s:%d, errno: %d",
|
||||
conn->hostname, conn->port, error);
|
||||
return CURLE_COULDNT_CONNECT;
|
||||
}
|
||||
/*
|
||||
* If the connection phase is "done" here, we should attempt to connect
|
||||
* to the "next address" in the Curl_hostaddr structure that we resolved
|
||||
* before. But we don't have that struct around anymore and we can't just
|
||||
* keep a pointer since the cache might in fact have gotten pruned by the
|
||||
* time we want to read this... Alas, we don't do this yet.
|
||||
*/
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* TCP connect to the given host with timeout, proxy or remote doesn't matter.
|
||||
* There might be more than one IP address to try out. Fill in the passed
|
||||
* pointer with the connected socket.
|
||||
*/
|
||||
|
||||
CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
||||
struct Curl_dns_entry *remotehost, /* use this one */
|
||||
int port, /* connect to this */
|
||||
curl_socket_t *sockconn, /* the connected socket */
|
||||
Curl_ipconnect **addr, /* the one we used */
|
||||
bool *connected) /* really connected? */
|
||||
{
|
||||
struct SessionHandle *data = conn->data;
|
||||
int rc;
|
||||
curl_socket_t sockfd= CURL_SOCKET_BAD;
|
||||
int aliasindex=0;
|
||||
char *hostname;
|
||||
|
||||
struct timeval after;
|
||||
struct timeval before = Curl_tvnow();
|
||||
|
||||
#ifdef ENABLE_IPV6
|
||||
struct addrinfo *ai;
|
||||
#endif
|
||||
|
||||
/*************************************************************
|
||||
* Figure out what maximum time we have left
|
||||
*************************************************************/
|
||||
long timeout_ms=300000; /* milliseconds, default to five minutes */
|
||||
|
||||
*connected = FALSE; /* default to not connected */
|
||||
|
||||
if(data->set.timeout || data->set.connecttimeout) {
|
||||
double has_passed;
|
||||
|
||||
/* Evaluate in milliseconds how much time that has passed */
|
||||
has_passed = Curl_tvdiff(Curl_tvnow(), data->progress.start);
|
||||
|
||||
#ifndef min
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/* get the most strict timeout of the ones converted to milliseconds */
|
||||
if(data->set.timeout && data->set.connecttimeout) {
|
||||
if (data->set.timeout < data->set.connecttimeout)
|
||||
timeout_ms = data->set.timeout*1000;
|
||||
else
|
||||
timeout_ms = data->set.connecttimeout*1000;
|
||||
}
|
||||
else if(data->set.timeout)
|
||||
timeout_ms = data->set.timeout*1000;
|
||||
else
|
||||
timeout_ms = data->set.connecttimeout*1000;
|
||||
|
||||
/* subtract the passed time */
|
||||
timeout_ms -= (long)has_passed;
|
||||
|
||||
if(timeout_ms < 0) {
|
||||
/* a precaution, no need to continue if time already is up */
|
||||
failf(data, "Connection time-out");
|
||||
return CURLE_OPERATION_TIMEOUTED;
|
||||
}
|
||||
}
|
||||
|
||||
hostname = data->change.proxy?conn->proxyhost:conn->hostname;
|
||||
infof(data, "About to connect() to %s port %d\n",
|
||||
hostname, port);
|
||||
|
||||
#ifdef ENABLE_IPV6
|
||||
/*
|
||||
* Connecting with a getaddrinfo chain
|
||||
*/
|
||||
for (ai = remotehost->addr; ai; ai = ai->ai_next, aliasindex++) {
|
||||
sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
|
||||
if (sockfd == CURL_SOCKET_BAD)
|
||||
continue;
|
||||
#else
|
||||
/*
|
||||
* Connecting with old style IPv4-only support
|
||||
*/
|
||||
|
||||
/* This is the loop that attempts to connect to all IP-addresses we
|
||||
know for the given host. One by one. */
|
||||
for(rc=-1, aliasindex=0;
|
||||
rc && (struct in_addr *)remotehost->addr->h_addr_list[aliasindex];
|
||||
aliasindex++) {
|
||||
struct sockaddr_in serv_addr;
|
||||
|
||||
/* create an IPv4 TCP socket */
|
||||
sockfd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if(CURL_SOCKET_BAD == sockfd) {
|
||||
failf(data, "couldn't create socket");
|
||||
return CURLE_COULDNT_CONNECT; /* big time error */
|
||||
}
|
||||
|
||||
/* nasty address work before connect can be made */
|
||||
memset((char *) &serv_addr, '\0', sizeof(serv_addr));
|
||||
memcpy((char *)&(serv_addr.sin_addr),
|
||||
(struct in_addr *)remotehost->addr->h_addr_list[aliasindex],
|
||||
sizeof(struct in_addr));
|
||||
serv_addr.sin_family = remotehost->addr->h_addrtype;
|
||||
serv_addr.sin_port = htons((unsigned short)port);
|
||||
#endif
|
||||
|
||||
if(conn->data->set.device) {
|
||||
/* user selected to bind the outgoing socket to a specified "device"
|
||||
before doing connect */
|
||||
CURLcode res = bindlocal(conn, sockfd);
|
||||
if(res)
|
||||
return res;
|
||||
}
|
||||
|
||||
/* set socket non-blocking */
|
||||
Curl_nonblock(sockfd, TRUE);
|
||||
|
||||
/* do not use #ifdef within the function arguments below, as connect() is
|
||||
a defined macro on some platforms and some compilers don't like to mix
|
||||
#ifdefs with macro usage! (AmigaOS is one such platform) */
|
||||
#ifdef ENABLE_IPV6
|
||||
rc = connect(sockfd, ai->ai_addr, ai->ai_addrlen);
|
||||
#else
|
||||
rc = connect(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
|
||||
#endif
|
||||
|
||||
if(-1 == rc) {
|
||||
int error=Curl_ourerrno();
|
||||
|
||||
switch (error) {
|
||||
case EINPROGRESS:
|
||||
case EWOULDBLOCK:
|
||||
#if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
|
||||
/* On some platforms EAGAIN and EWOULDBLOCK are the
|
||||
* same value, and on others they are different, hence
|
||||
* the odd #if
|
||||
*/
|
||||
case EAGAIN:
|
||||
#endif
|
||||
/* asynchronous connect, wait for connect or timeout */
|
||||
if(data->state.used_interface == Curl_if_multi)
|
||||
/* don't hang when doing multi */
|
||||
timeout_ms = 0;
|
||||
|
||||
rc = waitconnect(sockfd, timeout_ms);
|
||||
break;
|
||||
default:
|
||||
/* unknown error, fallthrough and try another address! */
|
||||
failf(data, "Failed to connect to %s IP number %d: %d",
|
||||
hostname, aliasindex+1, error);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* The '1 == rc' comes from the waitconnect(), and not from connect().
|
||||
We can be sure of this since connect() cannot return 1. */
|
||||
if((1 == rc) && (data->state.used_interface == Curl_if_multi)) {
|
||||
/* Timeout when running the multi interface, we return here with a
|
||||
CURLE_OK return code. */
|
||||
rc = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(0 == rc) {
|
||||
if (verifyconnect(sockfd)) {
|
||||
/* we are connected, awesome! */
|
||||
*connected = TRUE; /* this is a true connect */
|
||||
break;
|
||||
}
|
||||
/* nope, not connected for real */
|
||||
rc = -1;
|
||||
}
|
||||
|
||||
/* connect failed or timed out */
|
||||
sclose(sockfd);
|
||||
sockfd = -1;
|
||||
|
||||
/* get a new timeout for next attempt */
|
||||
after = Curl_tvnow();
|
||||
timeout_ms -= Curl_tvdiff(after, before);
|
||||
if(timeout_ms < 0) {
|
||||
failf(data, "connect() timed out!");
|
||||
return CURLE_OPERATION_TIMEOUTED;
|
||||
}
|
||||
before = after;
|
||||
}
|
||||
if (sockfd == CURL_SOCKET_BAD) {
|
||||
/* no good connect was made */
|
||||
*sockconn = -1;
|
||||
failf(data, "Connect failed");
|
||||
return CURLE_COULDNT_CONNECT;
|
||||
}
|
||||
|
||||
/* leave the socket in non-blocking mode */
|
||||
|
||||
/* store the address we use */
|
||||
if(addr) {
|
||||
#ifdef ENABLE_IPV6
|
||||
*addr = ai;
|
||||
#else
|
||||
*addr = (struct in_addr *)remotehost->addr->h_addr_list[aliasindex];
|
||||
#endif
|
||||
}
|
||||
|
||||
/* allow NULL-pointers to get passed in */
|
||||
if(sockconn)
|
||||
*sockconn = sockfd; /* the socket descriptor we've connected */
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
42
curl/lib/connect.h
Normal file
42
curl/lib/connect.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#ifndef __CONNECT_H
|
||||
#define __CONNECT_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: connect.h,v 1.16 2004/03/09 22:52:50 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
int Curl_nonblock(curl_socket_t sockfd, /* operate on this */
|
||||
int nonblock /* TRUE or FALSE */);
|
||||
|
||||
CURLcode Curl_is_connected(struct connectdata *conn,
|
||||
curl_socket_t sockfd,
|
||||
bool *connected);
|
||||
|
||||
CURLcode Curl_connecthost(struct connectdata *conn,
|
||||
struct Curl_dns_entry *host, /* connect to this */
|
||||
int port, /* connect to this port number */
|
||||
curl_socket_t *sockconn, /* not set if error */
|
||||
Curl_ipconnect **addr, /* the one we used */
|
||||
bool *connected /* truly connected? */
|
||||
);
|
||||
|
||||
int Curl_ourerrno(void);
|
||||
#endif
|
359
curl/lib/content_encoding.c
Normal file
359
curl/lib/content_encoding.c
Normal file
|
@ -0,0 +1,359 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: content_encoding.c,v 1.13 2004/02/15 13:58:57 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "urldata.h"
|
||||
#include <curl/curl.h>
|
||||
#include <curl/types.h>
|
||||
#include "sendf.h"
|
||||
#include "content_encoding.h"
|
||||
|
||||
#define DSIZ 0x10000 /* buffer size for decompressed data */
|
||||
|
||||
#define GZIP_MAGIC_0 0x1f
|
||||
#define GZIP_MAGIC_1 0x8b
|
||||
|
||||
/* gzip flag byte */
|
||||
#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
|
||||
#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
|
||||
#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
|
||||
#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
|
||||
#define COMMENT 0x10 /* bit 4 set: file comment present */
|
||||
#define RESERVED 0xE0 /* bits 5..7: reserved */
|
||||
|
||||
static CURLcode
|
||||
process_zlib_error(struct SessionHandle *data, z_stream *z)
|
||||
{
|
||||
if (z->msg)
|
||||
failf (data, "Error while processing content unencoding.\n%s",
|
||||
z->msg);
|
||||
else
|
||||
failf (data, "Error while processing content unencoding.\n"
|
||||
"Unknown failure within decompression software.");
|
||||
|
||||
return CURLE_BAD_CONTENT_ENCODING;
|
||||
}
|
||||
|
||||
static CURLcode
|
||||
exit_zlib(z_stream *z, bool *zlib_init, CURLcode result)
|
||||
{
|
||||
inflateEnd(z);
|
||||
*zlib_init = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
CURLcode
|
||||
Curl_unencode_deflate_write(struct SessionHandle *data,
|
||||
struct Curl_transfer_keeper *k,
|
||||
ssize_t nread)
|
||||
{
|
||||
int status; /* zlib status */
|
||||
CURLcode result = CURLE_OK; /* Curl_client_write status */
|
||||
char decomp[DSIZ]; /* Put the decompressed data here. */
|
||||
z_stream *z = &k->z; /* zlib state structure */
|
||||
|
||||
/* Initialize zlib? */
|
||||
if (!k->zlib_init) {
|
||||
z->zalloc = (alloc_func)Z_NULL;
|
||||
z->zfree = (free_func)Z_NULL;
|
||||
z->opaque = 0; /* of dubious use 08/27/02 jhrg */
|
||||
z->next_in = NULL;
|
||||
z->avail_in = 0;
|
||||
if (inflateInit(z) != Z_OK)
|
||||
return process_zlib_error(data, z);
|
||||
k->zlib_init = 1;
|
||||
}
|
||||
|
||||
/* Set the compressed input when this function is called */
|
||||
z->next_in = (Bytef *)k->str;
|
||||
z->avail_in = nread;
|
||||
|
||||
/* because the buffer size is fixed, iteratively decompress
|
||||
and transfer to the client via client_write. */
|
||||
for (;;) {
|
||||
/* (re)set buffer for decompressed output for every iteration */
|
||||
z->next_out = (Bytef *)&decomp[0];
|
||||
z->avail_out = DSIZ;
|
||||
|
||||
status = inflate(z, Z_SYNC_FLUSH);
|
||||
if (status == Z_OK || status == Z_STREAM_END) {
|
||||
if (DSIZ - z->avail_out) {
|
||||
result = Curl_client_write(data, CLIENTWRITE_BODY, decomp,
|
||||
DSIZ - z->avail_out);
|
||||
/* if !CURLE_OK, clean up, return */
|
||||
if (result)
|
||||
return exit_zlib(z, &k->zlib_init, result);
|
||||
}
|
||||
|
||||
/* Done?; clean up, return */
|
||||
if (status == Z_STREAM_END) {
|
||||
if (inflateEnd(z) == Z_OK)
|
||||
return exit_zlib(z, &k->zlib_init, result);
|
||||
else
|
||||
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z));
|
||||
}
|
||||
|
||||
/* Done with these bytes, exit */
|
||||
if (status == Z_OK && z->avail_in == 0 && z->avail_out > 0)
|
||||
return result;
|
||||
}
|
||||
else { /* Error; exit loop, handle below */
|
||||
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Skip over the gzip header */
|
||||
static enum {
|
||||
GZIP_OK,
|
||||
GZIP_BAD,
|
||||
GZIP_UNDERFLOW
|
||||
} check_gzip_header(unsigned char const *data, ssize_t len, ssize_t *headerlen)
|
||||
{
|
||||
int method, flags;
|
||||
const ssize_t totallen = len;
|
||||
|
||||
/* The shortest header is 10 bytes */
|
||||
if (len < 10)
|
||||
return GZIP_UNDERFLOW;
|
||||
|
||||
if ((data[0] != GZIP_MAGIC_0) || (data[1] != GZIP_MAGIC_1))
|
||||
return GZIP_BAD;
|
||||
|
||||
method = data[2];
|
||||
flags = data[3];
|
||||
|
||||
if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
|
||||
/* Can't handle this compression method or unknown flag */
|
||||
return GZIP_BAD;
|
||||
}
|
||||
|
||||
/* Skip over time, xflags, OS code and all previous bytes */
|
||||
len -= 10;
|
||||
data += 10;
|
||||
|
||||
if (flags & EXTRA_FIELD) {
|
||||
ssize_t extra_len;
|
||||
|
||||
if (len < 2)
|
||||
return GZIP_UNDERFLOW;
|
||||
|
||||
extra_len = (data[1] << 8) | data[0];
|
||||
|
||||
if (len < (extra_len+2))
|
||||
return GZIP_UNDERFLOW;
|
||||
|
||||
len -= (extra_len + 2);
|
||||
}
|
||||
|
||||
if (flags & ORIG_NAME) {
|
||||
/* Skip over NUL-terminated file name */
|
||||
while (len && *data) {
|
||||
--len;
|
||||
++data;
|
||||
}
|
||||
if (!len || *data)
|
||||
return GZIP_UNDERFLOW;
|
||||
|
||||
/* Skip over the NUL */
|
||||
--len;
|
||||
++data;
|
||||
}
|
||||
|
||||
if (flags & COMMENT) {
|
||||
/* Skip over NUL-terminated comment */
|
||||
while (len && *data) {
|
||||
--len;
|
||||
++data;
|
||||
}
|
||||
if (!len || *data)
|
||||
return GZIP_UNDERFLOW;
|
||||
|
||||
/* Skip over the NUL */
|
||||
--len;
|
||||
++data;
|
||||
}
|
||||
|
||||
if (flags & HEAD_CRC) {
|
||||
if (len < 2)
|
||||
return GZIP_UNDERFLOW;
|
||||
|
||||
len -= 2;
|
||||
data += 2;
|
||||
}
|
||||
|
||||
*headerlen = totallen - len;
|
||||
return GZIP_OK;
|
||||
}
|
||||
|
||||
CURLcode
|
||||
Curl_unencode_gzip_write(struct SessionHandle *data,
|
||||
struct Curl_transfer_keeper *k,
|
||||
ssize_t nread)
|
||||
{
|
||||
int status; /* zlib status */
|
||||
CURLcode result = CURLE_OK; /* Curl_client_write status */
|
||||
char decomp[DSIZ]; /* Put the decompressed data here. */
|
||||
z_stream *z = &k->z; /* zlib state structure */
|
||||
|
||||
/* Initialize zlib? */
|
||||
if (!k->zlib_init) {
|
||||
z->zalloc = (alloc_func)Z_NULL;
|
||||
z->zfree = (free_func)Z_NULL;
|
||||
z->opaque = 0; /* of dubious use 08/27/02 jhrg */
|
||||
z->next_in = NULL;
|
||||
z->avail_in = 0;
|
||||
if (inflateInit2(z, -MAX_WBITS) != Z_OK)
|
||||
return process_zlib_error(data, z);
|
||||
k->zlib_init = 1; /* Initial call state */
|
||||
}
|
||||
|
||||
/* This next mess is to get around the potential case where there isn't
|
||||
enough data passed in to skip over the gzip header. If that happens,
|
||||
we malloc a block and copy what we have then wait for the next call. If
|
||||
there still isn't enough (this is definitely a worst-case scenario), we
|
||||
make the block bigger, copy the next part in and keep waiting. */
|
||||
|
||||
/* Skip over gzip header? */
|
||||
if (k->zlib_init == 1) {
|
||||
/* Initial call state */
|
||||
ssize_t hlen;
|
||||
|
||||
switch (check_gzip_header((unsigned char *)k->str, nread, &hlen)) {
|
||||
case GZIP_OK:
|
||||
z->next_in = (Bytef *)k->str + hlen;
|
||||
z->avail_in = nread - hlen;
|
||||
k->zlib_init = 3; /* Inflating stream state */
|
||||
break;
|
||||
|
||||
case GZIP_UNDERFLOW:
|
||||
/* We need more data so we can find the end of the gzip header.
|
||||
It's possible that the memory block we malloc here will never be
|
||||
freed if the transfer abruptly aborts after this point. Since it's
|
||||
unlikely that circumstances will be right for this code path to be
|
||||
followed in the first place, and it's even more unlikely for a transfer
|
||||
to fail immediately afterwards, it should seldom be a problem. */
|
||||
z->avail_in = nread;
|
||||
z->next_in = malloc(z->avail_in);
|
||||
if (z->next_in == NULL) {
|
||||
return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY);
|
||||
}
|
||||
memcpy(z->next_in, k->str, z->avail_in);
|
||||
k->zlib_init = 2; /* Need more gzip header data state */
|
||||
/* We don't have any data to inflate yet */
|
||||
return CURLE_OK;
|
||||
|
||||
case GZIP_BAD:
|
||||
default:
|
||||
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z));
|
||||
}
|
||||
|
||||
}
|
||||
else if (k->zlib_init == 2) {
|
||||
/* Need more gzip header data state */
|
||||
ssize_t hlen;
|
||||
unsigned char *oldblock = z->next_in;
|
||||
|
||||
z->avail_in += nread;
|
||||
z->next_in = realloc(z->next_in, z->avail_in);
|
||||
if (z->next_in == NULL) {
|
||||
free(oldblock);
|
||||
return exit_zlib(z, &k->zlib_init, CURLE_OUT_OF_MEMORY);
|
||||
}
|
||||
/* Append the new block of data to the previous one */
|
||||
memcpy(z->next_in + z->avail_in - nread, k->str, nread);
|
||||
|
||||
switch (check_gzip_header(z->next_in, z->avail_in, &hlen)) {
|
||||
case GZIP_OK:
|
||||
/* This is the zlib stream data */
|
||||
free(z->next_in);
|
||||
/* Don't point into the malloced block since we just freed it */
|
||||
z->next_in = (Bytef *)k->str + hlen + nread - z->avail_in;
|
||||
z->avail_in = z->avail_in - hlen;
|
||||
k->zlib_init = 3; /* Inflating stream state */
|
||||
break;
|
||||
|
||||
case GZIP_UNDERFLOW:
|
||||
/* We still don't have any data to inflate! */
|
||||
return CURLE_OK;
|
||||
|
||||
case GZIP_BAD:
|
||||
default:
|
||||
free(z->next_in);
|
||||
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z));
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
/* Inflating stream state */
|
||||
z->next_in = (Bytef *)k->str;
|
||||
z->avail_in = nread;
|
||||
}
|
||||
|
||||
if (z->avail_in == 0) {
|
||||
/* We don't have any data to inflate; wait until next time */
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
/* because the buffer size is fixed, iteratively decompress
|
||||
and transfer to the client via client_write. */
|
||||
for (;;) {
|
||||
/* (re)set buffer for decompressed output for every iteration */
|
||||
z->next_out = (Bytef *)&decomp[0];
|
||||
z->avail_out = DSIZ;
|
||||
|
||||
status = inflate(z, Z_SYNC_FLUSH);
|
||||
if (status == Z_OK || status == Z_STREAM_END) {
|
||||
if(DSIZ - z->avail_out) {
|
||||
result = Curl_client_write(data, CLIENTWRITE_BODY, decomp,
|
||||
DSIZ - z->avail_out);
|
||||
/* if !CURLE_OK, clean up, return */
|
||||
if (result)
|
||||
return exit_zlib(z, &k->zlib_init, result);
|
||||
}
|
||||
|
||||
/* Done?; clean up, return */
|
||||
/* We should really check the gzip CRC here */
|
||||
if (status == Z_STREAM_END) {
|
||||
if (inflateEnd(z) == Z_OK)
|
||||
return exit_zlib(z, &k->zlib_init, result);
|
||||
else
|
||||
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z));
|
||||
}
|
||||
|
||||
/* Done with these bytes, exit */
|
||||
if (status == Z_OK && z->avail_in == 0 && z->avail_out > 0)
|
||||
return result;
|
||||
}
|
||||
else { /* Error; exit loop, handle below */
|
||||
return exit_zlib(z, &k->zlib_init, process_zlib_error(data, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LIBZ */
|
41
curl/lib/content_encoding.h
Normal file
41
curl/lib/content_encoding.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: content_encoding.h,v 1.7 2004/01/07 09:19:35 bagder Exp $
|
||||
***************************************************************************/
|
||||
#include "setup.h"
|
||||
|
||||
/*
|
||||
* Comma-separated list all supported Content-Encodings ('identity' is implied)
|
||||
*/
|
||||
#ifdef HAVE_LIBZ
|
||||
#define ALL_CONTENT_ENCODINGS "deflate, gzip"
|
||||
#else
|
||||
#define ALL_CONTENT_ENCODINGS "identity"
|
||||
#endif
|
||||
|
||||
CURLcode Curl_unencode_deflate_write(struct SessionHandle *data,
|
||||
struct Curl_transfer_keeper *k,
|
||||
ssize_t nread);
|
||||
|
||||
CURLcode
|
||||
Curl_unencode_gzip_write(struct SessionHandle *data,
|
||||
struct Curl_transfer_keeper *k,
|
||||
ssize_t nread);
|
848
curl/lib/cookie.c
Normal file
848
curl/lib/cookie.c
Normal file
|
@ -0,0 +1,848 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: cookie.c,v 1.52 2004/03/10 09:41:37 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/***
|
||||
|
||||
|
||||
RECEIVING COOKIE INFORMATION
|
||||
============================
|
||||
|
||||
struct CookieInfo *cookie_init(char *file);
|
||||
|
||||
Inits a cookie struct to store data in a local file. This is always
|
||||
called before any cookies are set.
|
||||
|
||||
int cookies_set(struct CookieInfo *cookie, char *cookie_line);
|
||||
|
||||
The 'cookie_line' parameter is a full "Set-cookie:" line as
|
||||
received from a server.
|
||||
|
||||
The function need to replace previously stored lines that this new
|
||||
line superceeds.
|
||||
|
||||
It may remove lines that are expired.
|
||||
|
||||
It should return an indication of success/error.
|
||||
|
||||
|
||||
SENDING COOKIE INFORMATION
|
||||
==========================
|
||||
|
||||
struct Cookies *cookie_getlist(struct CookieInfo *cookie,
|
||||
char *host, char *path, bool secure);
|
||||
|
||||
For a given host and path, return a linked list of cookies that
|
||||
the client should send to the server if used now. The secure
|
||||
boolean informs the cookie if a secure connection is achieved or
|
||||
not.
|
||||
|
||||
It shall only return cookies that haven't expired.
|
||||
|
||||
|
||||
Example set of cookies:
|
||||
|
||||
Set-cookie: PRODUCTINFO=webxpress; domain=.fidelity.com; path=/; secure
|
||||
Set-cookie: PERSONALIZE=none;expires=Monday, 13-Jun-1988 03:04:55 GMT;
|
||||
domain=.fidelity.com; path=/ftgw; secure
|
||||
Set-cookie: FidHist=none;expires=Monday, 13-Jun-1988 03:04:55 GMT;
|
||||
domain=.fidelity.com; path=/; secure
|
||||
Set-cookie: FidOrder=none;expires=Monday, 13-Jun-1988 03:04:55 GMT;
|
||||
domain=.fidelity.com; path=/; secure
|
||||
Set-cookie: DisPend=none;expires=Monday, 13-Jun-1988 03:04:55 GMT;
|
||||
domain=.fidelity.com; path=/; secure
|
||||
Set-cookie: FidDis=none;expires=Monday, 13-Jun-1988 03:04:55 GMT;
|
||||
domain=.fidelity.com; path=/; secure
|
||||
Set-cookie:
|
||||
Session_Key@6791a9e0-901a-11d0-a1c8-9b012c88aa77=none;expires=Monday,
|
||||
13-Jun-1988 03:04:55 GMT; domain=.fidelity.com; path=/; secure
|
||||
****/
|
||||
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifndef CURL_DISABLE_HTTP
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "urldata.h"
|
||||
#include "cookie.h"
|
||||
#include "getdate.h"
|
||||
#include "strequal.h"
|
||||
#include "strtok.h"
|
||||
#include "sendf.h"
|
||||
|
||||
/* The last #include file should be: */
|
||||
#ifdef CURLDEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
static void
|
||||
free_cookiemess(struct Cookie *co)
|
||||
{
|
||||
if(co->domain)
|
||||
free(co->domain);
|
||||
if(co->path)
|
||||
free(co->path);
|
||||
if(co->name)
|
||||
free(co->name);
|
||||
if(co->value)
|
||||
free(co->value);
|
||||
|
||||
free(co);
|
||||
}
|
||||
|
||||
static bool tailmatch(const char *little, const char *bigone)
|
||||
{
|
||||
size_t littlelen = strlen(little);
|
||||
size_t biglen = strlen(bigone);
|
||||
|
||||
if(littlelen > biglen)
|
||||
return FALSE;
|
||||
|
||||
return (bool)strequal(little, bigone+biglen-littlelen);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
* Curl_cookie_add()
|
||||
*
|
||||
* Add a single cookie line to the cookie keeping object.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
struct Cookie *
|
||||
Curl_cookie_add(struct SessionHandle *data,
|
||||
/* The 'data' pointer here may be NULL at times, and thus
|
||||
must only be used very carefully for things that can deal
|
||||
with data being NULL. Such as infof() and similar */
|
||||
|
||||
struct CookieInfo *c,
|
||||
bool httpheader, /* TRUE if HTTP header-style line */
|
||||
char *lineptr, /* first character of the line */
|
||||
char *domain, /* default domain */
|
||||
char *path) /* full path used when this cookie is set,
|
||||
used to get default path for the cookie
|
||||
unless set */
|
||||
{
|
||||
struct Cookie *clist;
|
||||
char what[MAX_COOKIE_LINE];
|
||||
char name[MAX_NAME];
|
||||
char *ptr;
|
||||
char *semiptr;
|
||||
struct Cookie *co;
|
||||
struct Cookie *lastc=NULL;
|
||||
time_t now = time(NULL);
|
||||
bool replace_old = FALSE;
|
||||
bool badcookie = FALSE; /* cookies are good by default. mmmmm yummy */
|
||||
|
||||
/* First, alloc and init a new struct for it */
|
||||
co = (struct Cookie *)calloc(sizeof(struct Cookie), 1);
|
||||
if(!co)
|
||||
return NULL; /* bail out if we're this low on memory */
|
||||
|
||||
if(httpheader) {
|
||||
/* This line was read off a HTTP-header */
|
||||
char *sep;
|
||||
semiptr=strchr(lineptr, ';'); /* first, find a semicolon */
|
||||
|
||||
while(*lineptr && isspace((int)*lineptr))
|
||||
lineptr++;
|
||||
|
||||
ptr = lineptr;
|
||||
do {
|
||||
/* we have a <what>=<this> pair or a 'secure' word here */
|
||||
sep = strchr(ptr, '=');
|
||||
if(sep && (!semiptr || (semiptr>sep)) ) {
|
||||
/*
|
||||
* There is a = sign and if there was a semicolon too, which make sure
|
||||
* that the semicolon comes _after_ the equal sign.
|
||||
*/
|
||||
|
||||
name[0]=what[0]=0; /* init the buffers */
|
||||
if(1 <= sscanf(ptr, "%" MAX_NAME_TXT "[^;=]=%"
|
||||
MAX_COOKIE_LINE_TXT "[^;\r\n]",
|
||||
name, what)) {
|
||||
/* this is a <name>=<what> pair */
|
||||
|
||||
char *whatptr;
|
||||
|
||||
/* Strip off trailing whitespace from the 'what' */
|
||||
size_t len=strlen(what);
|
||||
while(len && isspace((int)what[len-1])) {
|
||||
what[len-1]=0;
|
||||
len--;
|
||||
}
|
||||
|
||||
/* Skip leading whitespace from the 'what' */
|
||||
whatptr=what;
|
||||
while(isspace((int)*whatptr)) {
|
||||
whatptr++;
|
||||
}
|
||||
|
||||
if(strequal("path", name)) {
|
||||
co->path=strdup(whatptr);
|
||||
}
|
||||
else if(strequal("domain", name)) {
|
||||
/* note that this name may or may not have a preceeding dot, but
|
||||
we don't care about that, we treat the names the same anyway */
|
||||
|
||||
const char *domptr=whatptr;
|
||||
int dotcount=1;
|
||||
unsigned int i;
|
||||
|
||||
static const char *seventhree[]= {
|
||||
"com", "edu", "net", "org", "gov", "mil", "int"
|
||||
};
|
||||
|
||||
/* Count the dots, we need to make sure that there are THREE dots
|
||||
in the normal domains, or TWO in the seventhree-domains. */
|
||||
|
||||
if('.' == whatptr[0])
|
||||
/* don't count the initial dot, assume it */
|
||||
domptr++;
|
||||
|
||||
do {
|
||||
domptr = strchr(domptr, '.');
|
||||
if(domptr) {
|
||||
domptr++;
|
||||
dotcount++;
|
||||
}
|
||||
} while(domptr);
|
||||
|
||||
for(i=0;
|
||||
i<sizeof(seventhree)/sizeof(seventhree[0]); i++) {
|
||||
if(tailmatch(seventhree[i], whatptr)) {
|
||||
dotcount++; /* we allow one dot less for these */
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* The original Netscape cookie spec defined that this domain name
|
||||
MUST have three dots (or two if one of the seven holy TLDs),
|
||||
but it seems that these kinds of cookies are in use "out there"
|
||||
so we cannot be that strict. I've therefore lowered the check
|
||||
to not allow less than two dots. */
|
||||
|
||||
if(dotcount < 2) {
|
||||
/* Received and skipped a cookie with a domain using too few
|
||||
dots. */
|
||||
badcookie=TRUE; /* mark this as a bad cookie */
|
||||
infof(data, "skipped cookie with illegal dotcount domain: %s",
|
||||
whatptr);
|
||||
}
|
||||
else {
|
||||
/* Now, we make sure that our host is within the given domain,
|
||||
or the given domain is not valid and thus cannot be set. */
|
||||
|
||||
if(!domain || tailmatch(whatptr, domain)) {
|
||||
const char *tailptr=whatptr;
|
||||
if(tailptr[0] == '.')
|
||||
tailptr++;
|
||||
co->domain=strdup(tailptr); /* don't prefix w/dots internally */
|
||||
co->tailmatch=TRUE; /* we always do that if the domain name was
|
||||
given */
|
||||
}
|
||||
else {
|
||||
/* we did not get a tailmatch and then the attempted set domain
|
||||
is not a domain to which the current host belongs. Mark as
|
||||
bad. */
|
||||
badcookie=TRUE;
|
||||
infof(data, "skipped cookie with bad tailmatch domain: %s",
|
||||
whatptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(strequal("version", name)) {
|
||||
co->version=strdup(whatptr);
|
||||
}
|
||||
else if(strequal("max-age", name)) {
|
||||
/* Defined in RFC2109:
|
||||
|
||||
Optional. The Max-Age attribute defines the lifetime of the
|
||||
cookie, in seconds. The delta-seconds value is a decimal non-
|
||||
negative integer. After delta-seconds seconds elapse, the
|
||||
client should discard the cookie. A value of zero means the
|
||||
cookie should be discarded immediately.
|
||||
|
||||
*/
|
||||
co->maxage = strdup(whatptr);
|
||||
co->expires =
|
||||
atoi((*co->maxage=='\"')?&co->maxage[1]:&co->maxage[0]) + now;
|
||||
}
|
||||
else if(strequal("expires", name)) {
|
||||
co->expirestr=strdup(whatptr);
|
||||
co->expires = curl_getdate(what, &now);
|
||||
}
|
||||
else if(!co->name) {
|
||||
co->name = strdup(name);
|
||||
co->value = strdup(whatptr);
|
||||
}
|
||||
/*
|
||||
else this is the second (or more) name we don't know
|
||||
about! */
|
||||
}
|
||||
else {
|
||||
/* this is an "illegal" <what>=<this> pair */
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(sscanf(ptr, "%" MAX_COOKIE_LINE_TXT "[^;\r\n]",
|
||||
what)) {
|
||||
if(strequal("secure", what))
|
||||
co->secure = TRUE;
|
||||
/* else,
|
||||
unsupported keyword without assign! */
|
||||
|
||||
}
|
||||
}
|
||||
if(!semiptr || !*semiptr) {
|
||||
/* we already know there are no more cookies */
|
||||
semiptr = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
ptr=semiptr+1;
|
||||
while(ptr && *ptr && isspace((int)*ptr))
|
||||
ptr++;
|
||||
semiptr=strchr(ptr, ';'); /* now, find the next semicolon */
|
||||
|
||||
if(!semiptr && *ptr)
|
||||
/* There are no more semicolons, but there's a final name=value pair
|
||||
coming up */
|
||||
semiptr=strchr(ptr, '\0');
|
||||
} while(semiptr);
|
||||
|
||||
if(badcookie || (NULL == co->name)) {
|
||||
/* we didn't get a cookie name or a bad one,
|
||||
this is an illegal line, bail out */
|
||||
if(co->expirestr)
|
||||
free(co->expirestr);
|
||||
if(co->domain)
|
||||
free(co->domain);
|
||||
if(co->path)
|
||||
free(co->path);
|
||||
if(co->name)
|
||||
free(co->name);
|
||||
if(co->value)
|
||||
free(co->value);
|
||||
free(co);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(NULL == co->domain)
|
||||
/* no domain was given in the header line, set the default now */
|
||||
co->domain=domain?strdup(domain):NULL;
|
||||
if((NULL == co->path) && path) {
|
||||
/* no path was given in the header line, set the default now */
|
||||
char *endslash = strrchr(path, '/');
|
||||
if(endslash) {
|
||||
size_t pathlen = endslash-path+1; /* include the ending slash */
|
||||
co->path=malloc(pathlen+1); /* one extra for the zero byte */
|
||||
if(co->path) {
|
||||
memcpy(co->path, path, pathlen);
|
||||
co->path[pathlen]=0; /* zero terminate */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* This line is NOT a HTTP header style line, we do offer support for
|
||||
reading the odd netscape cookies-file format here */
|
||||
char *firstptr;
|
||||
char *tok_buf;
|
||||
int fields;
|
||||
|
||||
if(lineptr[0]=='#') {
|
||||
/* don't even try the comments */
|
||||
free(co);
|
||||
return NULL;
|
||||
}
|
||||
/* strip off the possible end-of-line characters */
|
||||
ptr=strchr(lineptr, '\r');
|
||||
if(ptr)
|
||||
*ptr=0; /* clear it */
|
||||
ptr=strchr(lineptr, '\n');
|
||||
if(ptr)
|
||||
*ptr=0; /* clear it */
|
||||
|
||||
firstptr=strtok_r(lineptr, "\t", &tok_buf); /* first tokenize it on the TAB */
|
||||
|
||||
/* Here's a quick check to eliminate normal HTTP-headers from this */
|
||||
if(!firstptr || strchr(firstptr, ':')) {
|
||||
free(co);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Now loop through the fields and init the struct we already have
|
||||
allocated */
|
||||
for(ptr=firstptr, fields=0; ptr;
|
||||
ptr=strtok_r(NULL, "\t", &tok_buf), fields++) {
|
||||
switch(fields) {
|
||||
case 0:
|
||||
if(ptr[0]=='.') /* skip preceeding dots */
|
||||
ptr++;
|
||||
co->domain = strdup(ptr);
|
||||
break;
|
||||
case 1:
|
||||
/* This field got its explanation on the 23rd of May 2001 by
|
||||
Andrés García:
|
||||
|
||||
flag: A TRUE/FALSE value indicating if all machines within a given
|
||||
domain can access the variable. This value is set automatically by
|
||||
the browser, depending on the value you set for the domain.
|
||||
|
||||
As far as I can see, it is set to true when the cookie says
|
||||
.domain.com and to false when the domain is complete www.domain.com
|
||||
*/
|
||||
co->tailmatch=(bool)strequal(ptr, "TRUE"); /* store information */
|
||||
break;
|
||||
case 2:
|
||||
/* It turns out, that sometimes the file format allows the path
|
||||
field to remain not filled in, we try to detect this and work
|
||||
around it! Andrés García made us aware of this... */
|
||||
if (strcmp("TRUE", ptr) && strcmp("FALSE", ptr)) {
|
||||
/* only if the path doesn't look like a boolean option! */
|
||||
co->path = strdup(ptr);
|
||||
break;
|
||||
}
|
||||
/* this doesn't look like a path, make one up! */
|
||||
co->path = strdup("/");
|
||||
fields++; /* add a field and fall down to secure */
|
||||
/* FALLTHROUGH */
|
||||
case 3:
|
||||
co->secure = (bool)strequal(ptr, "TRUE");
|
||||
break;
|
||||
case 4:
|
||||
co->expires = atoi(ptr);
|
||||
break;
|
||||
case 5:
|
||||
co->name = strdup(ptr);
|
||||
break;
|
||||
case 6:
|
||||
co->value = strdup(ptr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(6 == fields) {
|
||||
/* we got a cookie with blank contents, fix it */
|
||||
co->value = strdup("");
|
||||
}
|
||||
else if(7 != fields) {
|
||||
/* we did not find the sufficient number of fields to recognize this
|
||||
as a valid line, abort and go home */
|
||||
free_cookiemess(co);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if(!c->running && /* read from a file */
|
||||
c->newsession && /* clean session cookies */
|
||||
!co->expires) { /* this is a session cookie since it doesn't expire! */
|
||||
free_cookiemess(co);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
co->livecookie = c->running;
|
||||
|
||||
/* now, we have parsed the incoming line, we must now check if this
|
||||
superceeds an already existing cookie, which it may if the previous have
|
||||
the same domain and path as this */
|
||||
|
||||
clist = c->cookies;
|
||||
replace_old = FALSE;
|
||||
while(clist) {
|
||||
if(strequal(clist->name, co->name)) {
|
||||
/* the names are identical */
|
||||
|
||||
if(clist->domain && co->domain) {
|
||||
if(strequal(clist->domain, co->domain))
|
||||
/* The domains are identical */
|
||||
replace_old=TRUE;
|
||||
}
|
||||
else if(!clist->domain && !co->domain)
|
||||
replace_old = TRUE;
|
||||
|
||||
if(replace_old) {
|
||||
/* the domains were identical */
|
||||
|
||||
if(clist->path && co->path) {
|
||||
if(strequal(clist->path, co->path)) {
|
||||
replace_old = TRUE;
|
||||
}
|
||||
else
|
||||
replace_old = FALSE;
|
||||
}
|
||||
else if(!clist->path && !co->path)
|
||||
replace_old = TRUE;
|
||||
else
|
||||
replace_old = FALSE;
|
||||
|
||||
}
|
||||
|
||||
if(replace_old && !co->livecookie && clist->livecookie) {
|
||||
/* Both cookies matched fine, except that the already present
|
||||
cookie is "live", which means it was set from a header, while
|
||||
the new one isn't "live" and thus only read from a file. We let
|
||||
live cookies stay alive */
|
||||
|
||||
/* Free the newcomer and get out of here! */
|
||||
if(co->domain)
|
||||
free(co->domain);
|
||||
if(co->path)
|
||||
free(co->path);
|
||||
if(co->name)
|
||||
free(co->name);
|
||||
if(co->value)
|
||||
free(co->value);
|
||||
|
||||
free(co);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(replace_old) {
|
||||
co->next = clist->next; /* get the next-pointer first */
|
||||
|
||||
/* then free all the old pointers */
|
||||
if(clist->name)
|
||||
free(clist->name);
|
||||
if(clist->value)
|
||||
free(clist->value);
|
||||
if(clist->domain)
|
||||
free(clist->domain);
|
||||
if(clist->path)
|
||||
free(clist->path);
|
||||
if(clist->expirestr)
|
||||
free(clist->expirestr);
|
||||
|
||||
if(clist->version)
|
||||
free(clist->version);
|
||||
if(clist->maxage)
|
||||
free(clist->maxage);
|
||||
|
||||
*clist = *co; /* then store all the new data */
|
||||
|
||||
free(co); /* free the newly alloced memory */
|
||||
co = clist; /* point to the previous struct instead */
|
||||
|
||||
/* We have replaced a cookie, now skip the rest of the list but
|
||||
make sure the 'lastc' pointer is properly set */
|
||||
do {
|
||||
lastc = clist;
|
||||
clist = clist->next;
|
||||
} while(clist);
|
||||
break;
|
||||
}
|
||||
}
|
||||
lastc = clist;
|
||||
clist = clist->next;
|
||||
}
|
||||
|
||||
if(c->running)
|
||||
/* Only show this when NOT reading the cookies from a file */
|
||||
infof(data, "%s cookie %s=\"%s\" for domain %s, path %s, expire %d\n",
|
||||
replace_old?"Replaced":"Added", co->name, co->value,
|
||||
co->domain, co->path, co->expires);
|
||||
|
||||
if(!replace_old) {
|
||||
/* then make the last item point on this new one */
|
||||
if(lastc)
|
||||
lastc->next = co;
|
||||
else
|
||||
c->cookies = co;
|
||||
}
|
||||
|
||||
c->numcookies++; /* one more cookie in the jar */
|
||||
return co;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Curl_cookie_init()
|
||||
*
|
||||
* Inits a cookie struct to read data from a local file. This is always
|
||||
* called before any cookies are set. File may be NULL.
|
||||
*
|
||||
* If 'newsession' is TRUE, discard all "session cookies" on read from file.
|
||||
*
|
||||
****************************************************************************/
|
||||
struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
|
||||
char *file,
|
||||
struct CookieInfo *inc,
|
||||
bool newsession)
|
||||
{
|
||||
char line[MAX_COOKIE_LINE];
|
||||
struct CookieInfo *c;
|
||||
FILE *fp;
|
||||
bool fromfile=TRUE;
|
||||
|
||||
if(NULL == inc) {
|
||||
/* we didn't get a struct, create one */
|
||||
c = (struct CookieInfo *)malloc(sizeof(struct CookieInfo));
|
||||
if(!c)
|
||||
return NULL; /* failed to get memory */
|
||||
memset(c, 0, sizeof(struct CookieInfo));
|
||||
c->filename = strdup(file?file:"none"); /* copy the name just in case */
|
||||
}
|
||||
else {
|
||||
/* we got an already existing one, use that */
|
||||
c = inc;
|
||||
}
|
||||
c->running = FALSE; /* this is not running, this is init */
|
||||
|
||||
if(file && strequal(file, "-")) {
|
||||
fp = stdin;
|
||||
fromfile=FALSE;
|
||||
}
|
||||
else
|
||||
fp = file?fopen(file, "r"):NULL;
|
||||
|
||||
c->newsession = newsession; /* new session? */
|
||||
|
||||
if(fp) {
|
||||
char *lineptr;
|
||||
bool headerline;
|
||||
while(fgets(line, MAX_COOKIE_LINE, fp)) {
|
||||
if(checkprefix("Set-Cookie:", line)) {
|
||||
/* This is a cookie line, get it! */
|
||||
lineptr=&line[11];
|
||||
headerline=TRUE;
|
||||
}
|
||||
else {
|
||||
lineptr=line;
|
||||
headerline=FALSE;
|
||||
}
|
||||
while(*lineptr && isspace((int)*lineptr))
|
||||
lineptr++;
|
||||
|
||||
Curl_cookie_add(data, c, headerline, lineptr, NULL, NULL);
|
||||
}
|
||||
if(fromfile)
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
c->running = TRUE; /* now, we're running */
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Curl_cookie_getlist()
|
||||
*
|
||||
* For a given host and path, return a linked list of cookies that the
|
||||
* client should send to the server if used now. The secure boolean informs
|
||||
* the cookie if a secure connection is achieved or not.
|
||||
*
|
||||
* It shall only return cookies that haven't expired.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
|
||||
char *host, char *path, bool secure)
|
||||
{
|
||||
struct Cookie *newco;
|
||||
struct Cookie *co;
|
||||
time_t now = time(NULL);
|
||||
struct Cookie *mainco=NULL;
|
||||
|
||||
if(!c || !c->cookies)
|
||||
return NULL; /* no cookie struct or no cookies in the struct */
|
||||
|
||||
co = c->cookies;
|
||||
|
||||
while(co) {
|
||||
/* only process this cookie if it is not expired or had no expire
|
||||
date AND that if the cookie requires we're secure we must only
|
||||
continue if we are! */
|
||||
if( (co->expires<=0 || (co->expires> now)) &&
|
||||
(co->secure?secure:TRUE) ) {
|
||||
|
||||
/* now check if the domain is correct */
|
||||
if(!co->domain ||
|
||||
(co->tailmatch && tailmatch(co->domain, host)) ||
|
||||
(!co->tailmatch && strequal(host, co->domain)) ) {
|
||||
/* the right part of the host matches the domain stuff in the
|
||||
cookie data */
|
||||
|
||||
/* now check the left part of the path with the cookies path
|
||||
requirement */
|
||||
if(!co->path ||
|
||||
checkprefix(co->path, path) ) {
|
||||
|
||||
/* and now, we know this is a match and we should create an
|
||||
entry for the return-linked-list */
|
||||
|
||||
newco = (struct Cookie *)malloc(sizeof(struct Cookie));
|
||||
if(newco) {
|
||||
/* first, copy the whole source cookie: */
|
||||
memcpy(newco, co, sizeof(struct Cookie));
|
||||
|
||||
/* then modify our next */
|
||||
newco->next = mainco;
|
||||
|
||||
/* point the main to us */
|
||||
mainco = newco;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
co = co->next;
|
||||
}
|
||||
|
||||
return mainco; /* return the new list */
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Curl_cookie_freelist()
|
||||
*
|
||||
* Free a list of cookies previously returned by Curl_cookie_getlist();
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void Curl_cookie_freelist(struct Cookie *co)
|
||||
{
|
||||
struct Cookie *next;
|
||||
if(co) {
|
||||
while(co) {
|
||||
next = co->next;
|
||||
free(co); /* we only free the struct since the "members" are all
|
||||
just copied! */
|
||||
co = next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Curl_cookie_cleanup()
|
||||
*
|
||||
* Free a "cookie object" previous created with cookie_init().
|
||||
*
|
||||
****************************************************************************/
|
||||
void Curl_cookie_cleanup(struct CookieInfo *c)
|
||||
{
|
||||
struct Cookie *co;
|
||||
struct Cookie *next;
|
||||
if(c) {
|
||||
if(c->filename)
|
||||
free(c->filename);
|
||||
co = c->cookies;
|
||||
|
||||
while(co) {
|
||||
if(co->name)
|
||||
free(co->name);
|
||||
if(co->value)
|
||||
free(co->value);
|
||||
if(co->domain)
|
||||
free(co->domain);
|
||||
if(co->path)
|
||||
free(co->path);
|
||||
if(co->expirestr)
|
||||
free(co->expirestr);
|
||||
|
||||
if(co->version)
|
||||
free(co->version);
|
||||
if(co->maxage)
|
||||
free(co->maxage);
|
||||
|
||||
next = co->next;
|
||||
free(co);
|
||||
co = next;
|
||||
}
|
||||
free(c); /* free the base struct as well */
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Curl_cookie_output()
|
||||
*
|
||||
* Writes all internally known cookies to the specified file. Specify
|
||||
* "-" as file name to write to stdout.
|
||||
*
|
||||
* The function returns non-zero on write failure.
|
||||
*/
|
||||
int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
|
||||
{
|
||||
struct Cookie *co;
|
||||
FILE *out;
|
||||
bool use_stdout=FALSE;
|
||||
|
||||
if((NULL == c) || (0 == c->numcookies))
|
||||
/* If there are no known cookies, we don't write or even create any
|
||||
destination file */
|
||||
return 0;
|
||||
|
||||
if(strequal("-", dumphere)) {
|
||||
/* use stdout */
|
||||
out = stdout;
|
||||
use_stdout=TRUE;
|
||||
}
|
||||
else {
|
||||
out = fopen(dumphere, "w");
|
||||
if(!out)
|
||||
return 1; /* failure */
|
||||
}
|
||||
|
||||
if(c) {
|
||||
fputs("# Netscape HTTP Cookie File\n"
|
||||
"# http://www.netscape.com/newsref/std/cookie_spec.html\n"
|
||||
"# This file was generated by libcurl! Edit at your own risk.\n\n",
|
||||
out);
|
||||
co = c->cookies;
|
||||
|
||||
while(co) {
|
||||
fprintf(out,
|
||||
"%s%s\t" /* domain */
|
||||
"%s\t" /* tailmatch */
|
||||
"%s\t" /* path */
|
||||
"%s\t" /* secure */
|
||||
"%u\t" /* expires */
|
||||
"%s\t" /* name */
|
||||
"%s\n", /* value */
|
||||
|
||||
/* Make sure all domains are prefixed with a dot if they allow
|
||||
tailmatching. This is Mozilla-style. */
|
||||
(co->tailmatch && co->domain && co->domain[0] != '.')? ".":"",
|
||||
co->domain?co->domain:"unknown",
|
||||
co->tailmatch?"TRUE":"FALSE",
|
||||
co->path?co->path:"/",
|
||||
co->secure?"TRUE":"FALSE",
|
||||
(unsigned int)co->expires,
|
||||
co->name,
|
||||
co->value?co->value:"");
|
||||
|
||||
co=co->next;
|
||||
}
|
||||
}
|
||||
|
||||
if(!use_stdout)
|
||||
fclose(out);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* CURL_DISABLE_HTTP */
|
88
curl/lib/cookie.h
Normal file
88
curl/lib/cookie.h
Normal file
|
@ -0,0 +1,88 @@
|
|||
#ifndef __COOKIE_H
|
||||
#define __COOKIE_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: cookie.h,v 1.15 2004/01/07 09:19:35 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef WIN32
|
||||
#include <time.h>
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
struct Cookie {
|
||||
struct Cookie *next; /* next in the chain */
|
||||
char *name; /* <this> = value */
|
||||
char *value; /* name = <this> */
|
||||
char *path; /* path = <this> */
|
||||
char *domain; /* domain = <this> */
|
||||
long expires; /* expires = <this> */
|
||||
char *expirestr; /* the plain text version */
|
||||
bool tailmatch; /* weather we do tail-matchning of the domain name */
|
||||
|
||||
/* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */
|
||||
char *version; /* Version = <value> */
|
||||
char *maxage; /* Max-Age = <value> */
|
||||
|
||||
bool secure; /* whether the 'secure' keyword was used */
|
||||
bool livecookie; /* updated from a server, not a stored file */
|
||||
};
|
||||
|
||||
struct CookieInfo {
|
||||
/* linked list of cookies we know of */
|
||||
struct Cookie *cookies;
|
||||
|
||||
char *filename; /* file we read from/write to */
|
||||
bool running; /* state info, for cookie adding information */
|
||||
long numcookies; /* number of cookies in the "jar" */
|
||||
bool newsession; /* new session, discard session cookies on load */
|
||||
};
|
||||
|
||||
/* This is the maximum line length we accept for a cookie line */
|
||||
#define MAX_COOKIE_LINE 2048
|
||||
#define MAX_COOKIE_LINE_TXT "2047"
|
||||
|
||||
/* This is the maximum length of a cookie name we deal with: */
|
||||
#define MAX_NAME 256
|
||||
#define MAX_NAME_TXT "255"
|
||||
|
||||
struct SessionHandle;
|
||||
/*
|
||||
* Add a cookie to the internal list of cookies. The domain and path arguments
|
||||
* are only used if the header boolean is TRUE.
|
||||
*/
|
||||
|
||||
struct Cookie *Curl_cookie_add(struct SessionHandle *data,
|
||||
struct CookieInfo *, bool header, char *line,
|
||||
char *domain, char *path);
|
||||
|
||||
struct CookieInfo *Curl_cookie_init(struct SessionHandle *data,
|
||||
char *, struct CookieInfo *, bool);
|
||||
struct Cookie *Curl_cookie_getlist(struct CookieInfo *, char *, char *, bool);
|
||||
void Curl_cookie_freelist(struct Cookie *);
|
||||
void Curl_cookie_cleanup(struct CookieInfo *);
|
||||
int Curl_cookie_output(struct CookieInfo *, char *);
|
||||
|
||||
#endif
|
422
curl/lib/curllib.dsp
Normal file
422
curl/lib/curllib.dsp
Normal file
|
@ -0,0 +1,422 @@
|
|||
# Microsoft Developer Studio Project File - Name="curllib" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=curllib - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "curllib.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "curllib.mak" CFG="curllib - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "curllib - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "curllib - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "curllib - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CURLLIB_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /Zi /O2 /I "..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CURLLIB_EXPORTS" /D "_WINDLL" /FR /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /map /debug /machine:I386 /out:"Release/libcurl.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "curllib - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CURLLIB_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /I "..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CURLLIB_EXPORTS" /FR /FD /GZ /c
|
||||
# SUBTRACT CPP /WX /YX
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib ws2_32.lib winmm.lib /nologo /dll /incremental:no /map /debug /machine:I386 /out:"Debug/libcurl.dll" /pdbtype:sept
|
||||
# SUBTRACT LINK32 /nodefaultlib
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "curllib - Win32 Release"
|
||||
# Name "curllib - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\base64.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\connect.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cookie.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dict.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\easy.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\escape.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\file.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\formdata.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ftp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\getdate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\getenv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\getinfo.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hostip.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_chunks.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\if2ip.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\krb4.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ldap.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libcurl.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\llist.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\memdebug.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\multi.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netrc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progress.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\security.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sendf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\speedcheck.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ssluse.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strequal.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strtok.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\telnet.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\timeval.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\transfer.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\url.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\share.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\version.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\arpa_telnet.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\base64.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\connect.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cookie.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dict.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\escape.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\file.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\formdata.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ftp.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\getdate.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\getenv.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hostip.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_chunks.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\if2ip.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inet_ntoa_r.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\krb4.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ldap.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\memdebug.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\netrc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\progress.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\security.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sendf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\setup.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\speedcheck.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ssluse.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strequal.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strtok.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\telnet.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\timeval.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\transfer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\url.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\urldata.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_digest.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_ntlm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_ntlm.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inet_pton.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\inet_pton.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\md5.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\http_digest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\md5.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
29
curl/lib/curllib.dsw
Normal file
29
curl/lib/curllib.dsw
Normal file
|
@ -0,0 +1,29 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "curllib"=".\curllib.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
362
curl/lib/curllib.vcproj
Normal file
362
curl/lib/curllib.vcproj
Normal file
|
@ -0,0 +1,362 @@
|
|||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="curllib"
|
||||
ProjectGUID="{F46F5D4E-C1D4-4ADE-9FAA-5F0CE3AA07F1}"
|
||||
SccProjectName=""
|
||||
SccAuxPath=""
|
||||
SccLocalPath=""
|
||||
SccProvider="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;CURLLIB_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
PrecompiledHeaderFile=".\Debug/curllib.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/curl.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/curllib.tlb"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CURLLIB_EXPORTS"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\Release/curllib.pch"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/curl.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/curllib.tlb"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath=".\base64.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\connect.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cookie.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dict.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\easy.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\escape.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\file.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\formdata.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ftp.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getdate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getenv.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getinfo.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hash.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hostip.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http_chunks.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\if2ip.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\krb4.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ldap.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\libcurl.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\llist.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\memdebug.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mprintf.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\multi.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\netrc.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\progress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\security.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sendf.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\share.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\speedcheck.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ssluse.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strequal.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strtok.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\telnet.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\timeval.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\transfer.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\url.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\version.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath=".\arpa_telnet.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\base64.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\connect.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\cookie.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dict.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\escape.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\file.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\formdata.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ftp.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getdate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\hostip.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http_chunks.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http_digest.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http_digest.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http_ntlm.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\http_ntlm.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\if2ip.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\inet_ntoa_r.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\inet_pton.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\inet_pton.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\krb4.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ldap.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\md5.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\md5.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\memdebug.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\netrc.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\progress.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\security.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sendf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\setup.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\speedcheck.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ssluse.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strequal.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\strtok.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\telnet.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\timeval.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\transfer.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\url.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\urldata.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
220
curl/lib/dict.c
Normal file
220
curl/lib/dict.c
Normal file
|
@ -0,0 +1,220 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: dict.c,v 1.34 2004/03/09 22:52:50 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
/* -- WIN32 approved -- */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||
#include <time.h>
|
||||
#include <io.h>
|
||||
#else
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include <curl/curl.h>
|
||||
#include "transfer.h"
|
||||
#include "sendf.h"
|
||||
|
||||
#include "progress.h"
|
||||
#include "strequal.h"
|
||||
#include "dict.h"
|
||||
|
||||
#define _MPRINTF_REPLACE /* use our functions only */
|
||||
#include <curl/mprintf.h>
|
||||
|
||||
CURLcode Curl_dict(struct connectdata *conn)
|
||||
{
|
||||
char *word;
|
||||
char *ppath;
|
||||
char *database = NULL;
|
||||
char *strategy = NULL;
|
||||
char *nthdef = NULL; /* This is not part of the protocol, but required
|
||||
by RFC 2229 */
|
||||
CURLcode result=CURLE_OK;
|
||||
struct SessionHandle *data=conn->data;
|
||||
curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
|
||||
|
||||
char *path = conn->path;
|
||||
curl_off_t *bytecount = &conn->bytecount;
|
||||
|
||||
if(conn->bits.user_passwd) {
|
||||
/* AUTH is missing */
|
||||
}
|
||||
|
||||
if (strnequal(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
|
||||
strnequal(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
|
||||
strnequal(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
|
||||
|
||||
word = strchr(path, ':');
|
||||
if (word) {
|
||||
word++;
|
||||
database = strchr(word, ':');
|
||||
if (database) {
|
||||
*database++ = (char)0;
|
||||
strategy = strchr(database, ':');
|
||||
if (strategy) {
|
||||
*strategy++ = (char)0;
|
||||
nthdef = strchr(strategy, ':');
|
||||
if (nthdef) {
|
||||
*nthdef++ = (char)0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((word == NULL) || (*word == (char)0)) {
|
||||
failf(data, "lookup word is missing");
|
||||
}
|
||||
if ((database == NULL) || (*database == (char)0)) {
|
||||
database = (char *)"!";
|
||||
}
|
||||
if ((strategy == NULL) || (*strategy == (char)0)) {
|
||||
strategy = (char *)".";
|
||||
}
|
||||
|
||||
result = Curl_sendf(sockfd, conn,
|
||||
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
|
||||
"MATCH "
|
||||
"%s " /* database */
|
||||
"%s " /* strategy */
|
||||
"%s\n" /* word */
|
||||
"QUIT\n",
|
||||
|
||||
database,
|
||||
strategy,
|
||||
word
|
||||
);
|
||||
if(result)
|
||||
failf(data, "Failed sending DICT request");
|
||||
else
|
||||
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
|
||||
-1, NULL); /* no upload */
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
else if (strnequal(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
|
||||
strnequal(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
|
||||
strnequal(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
|
||||
|
||||
word = strchr(path, ':');
|
||||
if (word) {
|
||||
word++;
|
||||
database = strchr(word, ':');
|
||||
if (database) {
|
||||
*database++ = (char)0;
|
||||
nthdef = strchr(database, ':');
|
||||
if (nthdef) {
|
||||
*nthdef++ = (char)0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((word == NULL) || (*word == (char)0)) {
|
||||
failf(data, "lookup word is missing");
|
||||
}
|
||||
if ((database == NULL) || (*database == (char)0)) {
|
||||
database = (char *)"!";
|
||||
}
|
||||
|
||||
result = Curl_sendf(sockfd, conn,
|
||||
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
|
||||
"DEFINE "
|
||||
"%s " /* database */
|
||||
"%s\n" /* word */
|
||||
"QUIT\n",
|
||||
database,
|
||||
word);
|
||||
if(result)
|
||||
failf(data, "Failed sending DICT request");
|
||||
else
|
||||
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
|
||||
-1, NULL); /* no upload */
|
||||
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
ppath = strchr(path, '/');
|
||||
if (ppath) {
|
||||
int i;
|
||||
|
||||
ppath++;
|
||||
for (i = 0; ppath[i]; i++) {
|
||||
if (ppath[i] == ':')
|
||||
ppath[i] = ' ';
|
||||
}
|
||||
result = Curl_sendf(sockfd, conn,
|
||||
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
|
||||
"%s\n"
|
||||
"QUIT\n", ppath);
|
||||
if(result)
|
||||
failf(data, "Failed sending DICT request");
|
||||
else
|
||||
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
|
||||
-1, NULL);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
30
curl/lib/dict.h
Normal file
30
curl/lib/dict.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef __DICT_H
|
||||
#define __DICT_H
|
||||
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: dict.h,v 1.11 2004/01/07 09:19:35 bagder Exp $
|
||||
***************************************************************************/
|
||||
#ifndef CURL_DISABLE_DICT
|
||||
CURLcode Curl_dict(struct connectdata *conn);
|
||||
CURLcode Curl_dict_done(struct connectdata *conn);
|
||||
#endif
|
||||
#endif
|
376
curl/lib/easy.c
Normal file
376
curl/lib/easy.c
Normal file
|
@ -0,0 +1,376 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: easy.c,v 1.49 2004/03/15 16:28:36 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
/* -- WIN32 approved -- */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "strequal.h"
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||
#include <time.h>
|
||||
#include <io.h>
|
||||
#else
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <netdb.h>
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include <curl/curl.h>
|
||||
#include "transfer.h"
|
||||
#include "ssluse.h"
|
||||
#include "url.h"
|
||||
#include "getinfo.h"
|
||||
#include "hostip.h"
|
||||
#include "share.h"
|
||||
|
||||
#define _MPRINTF_REPLACE /* use our functions only */
|
||||
#include <curl/mprintf.h>
|
||||
|
||||
/* The last #include file should be: */
|
||||
#ifdef CURLDEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
/* Silly win32 socket initialization functions */
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||
static void win32_cleanup(void)
|
||||
{
|
||||
WSACleanup();
|
||||
}
|
||||
|
||||
static CURLcode win32_init(void)
|
||||
{
|
||||
WORD wVersionRequested;
|
||||
WSADATA wsaData;
|
||||
int err;
|
||||
|
||||
#ifdef ENABLE_IPV6
|
||||
wVersionRequested = MAKEWORD(2, 0);
|
||||
#else
|
||||
wVersionRequested = MAKEWORD(1, 1);
|
||||
#endif
|
||||
|
||||
err = WSAStartup(wVersionRequested, &wsaData);
|
||||
|
||||
if (err != 0)
|
||||
/* Tell the user that we couldn't find a useable */
|
||||
/* winsock.dll. */
|
||||
return CURLE_FAILED_INIT;
|
||||
|
||||
/* Confirm that the Windows Sockets DLL supports what we need.*/
|
||||
/* Note that if the DLL supports versions greater */
|
||||
/* than wVersionRequested, it will still return */
|
||||
/* wVersionRequested in wVersion. wHighVersion contains the */
|
||||
/* highest supported version. */
|
||||
|
||||
if ( LOBYTE( wsaData.wVersion ) != LOBYTE(wVersionRequested) ||
|
||||
HIBYTE( wsaData.wVersion ) != HIBYTE(wVersionRequested) ) {
|
||||
/* Tell the user that we couldn't find a useable */
|
||||
|
||||
/* winsock.dll. */
|
||||
WSACleanup();
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
return CURLE_OK;
|
||||
}
|
||||
/* The Windows Sockets DLL is acceptable. Proceed. */
|
||||
#else
|
||||
/* These functions exist merely to prevent compiler warnings */
|
||||
static CURLcode win32_init(void) { return CURLE_OK; }
|
||||
static void win32_cleanup(void) { }
|
||||
#endif
|
||||
|
||||
|
||||
/* true globals -- for curl_global_init() and curl_global_cleanup() */
|
||||
static unsigned int initialized = 0;
|
||||
static long init_flags = 0;
|
||||
|
||||
/**
|
||||
* Globally initializes cURL given a bitwise set of
|
||||
* the different features to initialize.
|
||||
*/
|
||||
CURLcode curl_global_init(long flags)
|
||||
{
|
||||
if (initialized)
|
||||
return CURLE_OK;
|
||||
|
||||
if (flags & CURL_GLOBAL_SSL)
|
||||
Curl_SSL_init();
|
||||
|
||||
if (flags & CURL_GLOBAL_WIN32)
|
||||
if (win32_init() != CURLE_OK)
|
||||
return CURLE_FAILED_INIT;
|
||||
|
||||
#ifdef _AMIGASF
|
||||
if(!amiga_init())
|
||||
return CURLE_FAILED_INIT;
|
||||
#endif
|
||||
|
||||
initialized = 1;
|
||||
init_flags = flags;
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Globally cleanup cURL, uses the value of "init_flags" to determine
|
||||
* what needs to be cleaned up and what doesn't
|
||||
*/
|
||||
void curl_global_cleanup(void)
|
||||
{
|
||||
if (!initialized)
|
||||
return;
|
||||
|
||||
Curl_global_host_cache_dtor();
|
||||
|
||||
if (init_flags & CURL_GLOBAL_SSL)
|
||||
Curl_SSL_cleanup();
|
||||
|
||||
if (init_flags & CURL_GLOBAL_WIN32)
|
||||
win32_cleanup();
|
||||
|
||||
#ifdef _AMIGASF
|
||||
amiga_cleanup();
|
||||
#endif
|
||||
|
||||
initialized = 0;
|
||||
init_flags = 0;
|
||||
}
|
||||
|
||||
CURL *curl_easy_init(void)
|
||||
{
|
||||
CURLcode res;
|
||||
struct SessionHandle *data;
|
||||
|
||||
/* Make sure we inited the global SSL stuff */
|
||||
if (!initialized) {
|
||||
res = curl_global_init(CURL_GLOBAL_DEFAULT);
|
||||
if(res)
|
||||
/* something in the global init failed, return nothing */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* We use curl_open() with undefined URL so far */
|
||||
res = Curl_open(&data);
|
||||
if(res != CURLE_OK)
|
||||
return NULL;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
typedef int (*func_T)(void);
|
||||
CURLcode curl_easy_setopt(CURL *curl, CURLoption tag, ...)
|
||||
{
|
||||
va_list arg;
|
||||
func_T param_func = (func_T)0;
|
||||
long param_long = 0;
|
||||
void *param_obj = NULL;
|
||||
curl_off_t param_offset = 0;
|
||||
struct SessionHandle *data = curl;
|
||||
CURLcode ret=CURLE_FAILED_INIT;
|
||||
|
||||
va_start(arg, tag);
|
||||
|
||||
/* PORTING NOTE:
|
||||
Object pointers can't necessarily be casted to function pointers and
|
||||
therefore we need to know what type it is and read the correct type
|
||||
at once. This should also correct problems with different sizes of
|
||||
the types.
|
||||
*/
|
||||
|
||||
if(tag < CURLOPTTYPE_OBJECTPOINT) {
|
||||
/* This is a LONG type */
|
||||
param_long = va_arg(arg, long);
|
||||
ret = Curl_setopt(data, tag, param_long);
|
||||
}
|
||||
else if(tag < CURLOPTTYPE_FUNCTIONPOINT) {
|
||||
/* This is a object pointer type */
|
||||
param_obj = va_arg(arg, void *);
|
||||
ret = Curl_setopt(data, tag, param_obj);
|
||||
}
|
||||
else if(tag < CURLOPTTYPE_OFF_T) {
|
||||
/* This is a function pointer type */
|
||||
param_func = va_arg(arg, func_T );
|
||||
ret = Curl_setopt(data, tag, param_func);
|
||||
} else {
|
||||
/* This is a curl_off_t type */
|
||||
param_offset = va_arg(arg, curl_off_t);
|
||||
ret = Curl_setopt(data, tag, param_offset);
|
||||
}
|
||||
|
||||
va_end(arg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
CURLcode curl_easy_perform(CURL *curl)
|
||||
{
|
||||
struct SessionHandle *data = (struct SessionHandle *)curl;
|
||||
|
||||
if ( ! (data->share && data->share->hostcache) ) {
|
||||
|
||||
if (Curl_global_host_cache_use(data) &&
|
||||
data->hostcache != Curl_global_host_cache_get()) {
|
||||
if (data->hostcache)
|
||||
Curl_hash_destroy(data->hostcache);
|
||||
data->hostcache = Curl_global_host_cache_get();
|
||||
}
|
||||
|
||||
if (!data->hostcache) {
|
||||
data->hostcache = Curl_hash_alloc(7, Curl_freednsinfo);
|
||||
|
||||
if(!data->hostcache)
|
||||
/* While we possibly could survive and do good without a host cache,
|
||||
the fact that creating it failed indicates that things are truly
|
||||
screwed up and we should bail out! */
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Curl_perform(data);
|
||||
}
|
||||
|
||||
void curl_easy_cleanup(CURL *curl)
|
||||
{
|
||||
struct SessionHandle *data = (struct SessionHandle *)curl;
|
||||
if ( ! (data->share && data->share->hostcache) ) {
|
||||
if ( !Curl_global_host_cache_use(data)) {
|
||||
Curl_hash_destroy(data->hostcache);
|
||||
}
|
||||
}
|
||||
Curl_close(data);
|
||||
}
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...)
|
||||
{
|
||||
va_list arg;
|
||||
void *paramp;
|
||||
struct SessionHandle *data = (struct SessionHandle *)curl;
|
||||
|
||||
va_start(arg, info);
|
||||
paramp = va_arg(arg, void *);
|
||||
|
||||
return Curl_getinfo(data, info, paramp);
|
||||
}
|
||||
|
||||
CURL *curl_easy_duphandle(CURL *incurl)
|
||||
{
|
||||
struct SessionHandle *data=(struct SessionHandle *)incurl;
|
||||
|
||||
struct SessionHandle *outcurl = (struct SessionHandle *)
|
||||
malloc(sizeof(struct SessionHandle));
|
||||
|
||||
if(NULL == outcurl)
|
||||
return NULL; /* failure */
|
||||
|
||||
/* start with clearing the entire new struct */
|
||||
memset(outcurl, 0, sizeof(struct SessionHandle));
|
||||
|
||||
/*
|
||||
* We setup a few buffers we need. We should probably make them
|
||||
* get setup on-demand in the code, as that would probably decrease
|
||||
* the likeliness of us forgetting to init a buffer here in the future.
|
||||
*/
|
||||
outcurl->state.headerbuff=(char*)malloc(HEADERSIZE);
|
||||
if(!outcurl->state.headerbuff) {
|
||||
free(outcurl); /* free the memory again */
|
||||
return NULL;
|
||||
}
|
||||
outcurl->state.headersize=HEADERSIZE;
|
||||
|
||||
/* copy all userdefined values */
|
||||
outcurl->set = data->set;
|
||||
outcurl->state.numconnects = data->state.numconnects;
|
||||
outcurl->state.connects = (struct connectdata **)
|
||||
malloc(sizeof(struct connectdata *) * outcurl->state.numconnects);
|
||||
|
||||
if(!outcurl->state.connects) {
|
||||
free(outcurl->state.headerbuff);
|
||||
free(outcurl);
|
||||
return NULL;
|
||||
}
|
||||
memset(outcurl->state.connects, 0,
|
||||
sizeof(struct connectdata *)*outcurl->state.numconnects);
|
||||
|
||||
outcurl->progress.flags = data->progress.flags;
|
||||
outcurl->progress.callback = data->progress.callback;
|
||||
|
||||
if(data->cookies)
|
||||
/* If cookies are enabled in the parent handle, we enable them
|
||||
in the clone as well! */
|
||||
outcurl->cookies = Curl_cookie_init(data,
|
||||
data->cookies->filename,
|
||||
outcurl->cookies,
|
||||
data->set.cookiesession);
|
||||
|
||||
/* duplicate all values in 'change' */
|
||||
if(data->change.url) {
|
||||
outcurl->change.url = strdup(data->change.url);
|
||||
outcurl->change.url_alloc = TRUE;
|
||||
}
|
||||
if(data->change.proxy) {
|
||||
outcurl->change.proxy = strdup(data->change.proxy);
|
||||
outcurl->change.proxy_alloc = TRUE;
|
||||
}
|
||||
if(data->change.referer) {
|
||||
outcurl->change.referer = strdup(data->change.referer);
|
||||
outcurl->change.referer_alloc = TRUE;
|
||||
}
|
||||
|
||||
return outcurl;
|
||||
}
|
128
curl/lib/escape.c
Normal file
128
curl/lib/escape.c
Normal file
|
@ -0,0 +1,128 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: escape.c,v 1.30 2004/03/08 08:38:29 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
/* Escape and unescape URL encoding in strings. The functions return a new
|
||||
* allocated string or NULL if an error occurred. */
|
||||
|
||||
#include "setup.h"
|
||||
#include <ctype.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* The last #include file should be: */
|
||||
#ifdef CURLDEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
char *curl_escape(const char *string, int length)
|
||||
{
|
||||
size_t alloc = (length?(size_t)length:strlen(string))+1;
|
||||
char *ns = malloc(alloc);
|
||||
char *testing_ptr = NULL;
|
||||
unsigned char in;
|
||||
size_t newlen = alloc;
|
||||
int strindex=0;
|
||||
|
||||
length = alloc-1;
|
||||
while(length--) {
|
||||
in = *string;
|
||||
if(!(in >= 'a' && in <= 'z') &&
|
||||
!(in >= 'A' && in <= 'Z') &&
|
||||
!(in >= '0' && in <= '9')) {
|
||||
/* encode it */
|
||||
newlen += 2; /* the size grows with two, since this'll become a %XX */
|
||||
if(newlen > alloc) {
|
||||
alloc *= 2;
|
||||
testing_ptr = realloc(ns, alloc);
|
||||
if(!testing_ptr) {
|
||||
free( ns );
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
ns = testing_ptr;
|
||||
}
|
||||
}
|
||||
sprintf(&ns[strindex], "%%%02X", in);
|
||||
|
||||
strindex+=3;
|
||||
}
|
||||
else {
|
||||
/* just copy this */
|
||||
ns[strindex++]=in;
|
||||
}
|
||||
string++;
|
||||
}
|
||||
ns[strindex]=0; /* terminate it */
|
||||
return ns;
|
||||
}
|
||||
|
||||
#define ishex(in) ((in >= 'a' && in <= 'f') || \
|
||||
(in >= 'A' && in <= 'F') || \
|
||||
(in >= '0' && in <= '9'))
|
||||
|
||||
char *curl_unescape(const char *string, int length)
|
||||
{
|
||||
int alloc = (length?length:(int)strlen(string))+1;
|
||||
char *ns = malloc(alloc);
|
||||
unsigned char in;
|
||||
int strindex=0;
|
||||
long hex;
|
||||
|
||||
if( !ns ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while(--alloc > 0) {
|
||||
in = *string;
|
||||
if(('%' == in) && ishex(string[1]) && ishex(string[2])) {
|
||||
/* this is two hexadecimal digits following a '%' */
|
||||
char hexstr[3];
|
||||
char *ptr;
|
||||
hexstr[0] = string[1];
|
||||
hexstr[1] = string[2];
|
||||
hexstr[2] = 0;
|
||||
|
||||
hex = strtol(hexstr, &ptr, 16);
|
||||
|
||||
in = (unsigned char)hex; /* this long is never bigger than 255 anyway */
|
||||
string+=2;
|
||||
alloc-=2;
|
||||
}
|
||||
|
||||
ns[strindex++] = in;
|
||||
string++;
|
||||
}
|
||||
ns[strindex]=0; /* terminate it */
|
||||
return ns;
|
||||
}
|
||||
|
||||
/* For operating systems/environments that use different malloc/free
|
||||
ssystems for the app and for this library, we provide a free that uses
|
||||
the library's memory system */
|
||||
void curl_free(void *p)
|
||||
{
|
||||
free(p);
|
||||
}
|
32
curl/lib/escape.h
Normal file
32
curl/lib/escape.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
#ifndef __ESCAPE_H
|
||||
#define __ESCAPE_H
|
||||
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: escape.h,v 1.11 2004/01/07 09:19:35 bagder Exp $
|
||||
***************************************************************************/
|
||||
/* Escape and unescape URL encoding in strings. The functions return a new
|
||||
* allocated string or NULL if an error occurred. */
|
||||
|
||||
char *curl_escape(const char *string, int length);
|
||||
char *curl_unescape(const char *string, int length);
|
||||
|
||||
#endif
|
285
curl/lib/file.c
Normal file
285
curl/lib/file.c
Normal file
|
@ -0,0 +1,285 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: file.c,v 1.52 2004/03/10 16:20:33 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#ifndef CURL_DISABLE_FILE
|
||||
/* -- WIN32 approved -- */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||
#include <time.h>
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#else
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
#include <sys/time.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETDB_H
|
||||
#include <netdb.h>
|
||||
#endif
|
||||
#ifdef HAVE_ARPA_INET_H
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#ifdef HAVE_NET_IF_H
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
#include <sys/ioctl.h>
|
||||
#include <signal.h>
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#include "urldata.h"
|
||||
#include <curl/curl.h>
|
||||
#include "progress.h"
|
||||
#include "sendf.h"
|
||||
#include "escape.h"
|
||||
#include "file.h"
|
||||
#include "speedcheck.h"
|
||||
#include "getinfo.h"
|
||||
#include "transfer.h" /* for Curl_readwrite_init() */
|
||||
|
||||
#define _MPRINTF_REPLACE /* use our functions only */
|
||||
#include <curl/mprintf.h>
|
||||
|
||||
/* The last #include file should be: */
|
||||
#ifdef CURLDEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
/* Emulate a connect-then-transfer protocol. We connect to the file here */
|
||||
CURLcode Curl_file_connect(struct connectdata *conn)
|
||||
{
|
||||
char *real_path = curl_unescape(conn->path, 0);
|
||||
struct FILEPROTO *file;
|
||||
int fd;
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
int i;
|
||||
char *actual_path;
|
||||
#endif
|
||||
|
||||
file = (struct FILEPROTO *)calloc(sizeof(struct FILEPROTO), 1);
|
||||
if(!file)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
conn->proto.file = file;
|
||||
|
||||
#if defined(WIN32) || defined(__EMX__)
|
||||
/* If the first character is a slash, and there's
|
||||
something that looks like a drive at the beginning of
|
||||
the path, skip the slash. If we remove the initial
|
||||
slash in all cases, paths without drive letters end up
|
||||
relative to the current directory which isn't how
|
||||
browsers work.
|
||||
|
||||
Some browsers accept | instead of : as the drive letter
|
||||
separator, so we do too.
|
||||
|
||||
On other platforms, we need the slash to indicate an
|
||||
absolute pathname. On Windows, absolute paths start
|
||||
with a drive letter.
|
||||
*/
|
||||
actual_path = real_path;
|
||||
if ((actual_path[0] == '/') &&
|
||||
actual_path[1] &&
|
||||
(actual_path[2] == ':' || actual_path[2] == '|'))
|
||||
{
|
||||
actual_path[2] = ':';
|
||||
actual_path++;
|
||||
}
|
||||
|
||||
/* change path separators from '/' to '\\' for Windows and OS/2 */
|
||||
for (i=0; actual_path[i] != '\0'; ++i)
|
||||
if (actual_path[i] == '/')
|
||||
actual_path[i] = '\\';
|
||||
|
||||
fd = open(actual_path, O_RDONLY | O_BINARY); /* no CR/LF translation! */
|
||||
#else
|
||||
fd = open(real_path, O_RDONLY);
|
||||
#endif
|
||||
free(real_path);
|
||||
|
||||
if(fd == -1) {
|
||||
failf(conn->data, "Couldn't open file %s", conn->path);
|
||||
return CURLE_FILE_COULDNT_READ_FILE;
|
||||
}
|
||||
file->fd = fd;
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
#if defined(WIN32) && (SIZEOF_CURL_OFF_T > 4)
|
||||
#define lseek(x,y,z) _lseeki64(x, y, z)
|
||||
#endif
|
||||
|
||||
/* This is the do-phase, separated from the connect-phase above */
|
||||
|
||||
CURLcode Curl_file(struct connectdata *conn)
|
||||
{
|
||||
/* This implementation ignores the host name in conformance with
|
||||
RFC 1738. Only local files (reachable via the standard file system)
|
||||
are supported. This means that files on remotely mounted directories
|
||||
(via NFS, Samba, NT sharing) can be accessed through a file:// URL
|
||||
*/
|
||||
CURLcode res = CURLE_OK;
|
||||
struct stat statbuf;
|
||||
curl_off_t expected_size=0;
|
||||
bool fstated=FALSE;
|
||||
ssize_t nread;
|
||||
struct SessionHandle *data = conn->data;
|
||||
char *buf = data->state.buffer;
|
||||
curl_off_t bytecount = 0;
|
||||
int fd;
|
||||
struct timeval now = Curl_tvnow();
|
||||
|
||||
Curl_readwrite_init(conn);
|
||||
Curl_initinfo(data);
|
||||
Curl_pgrsStartNow(data);
|
||||
|
||||
/* get the fd from the connection phase */
|
||||
fd = conn->proto.file->fd;
|
||||
|
||||
/* VMS: This only works reliable for STREAMLF files */
|
||||
if( -1 != fstat(fd, &statbuf)) {
|
||||
/* we could stat it, then read out the size */
|
||||
expected_size = statbuf.st_size;
|
||||
fstated = TRUE;
|
||||
}
|
||||
|
||||
/* If we have selected NOBODY and HEADER, it means that we only want file
|
||||
information. Which for FILE can't be much more than the file size and
|
||||
date. */
|
||||
if(data->set.no_body && data->set.include_header && fstated) {
|
||||
CURLcode result;
|
||||
sprintf(buf, "Content-Length: %" FORMAT_OFF_T "\r\n", expected_size);
|
||||
result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
sprintf(buf, "Accept-ranges: bytes\r\n");
|
||||
result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
|
||||
if(result)
|
||||
return result;
|
||||
|
||||
#ifdef HAVE_STRFTIME
|
||||
if(fstated) {
|
||||
struct tm *tm;
|
||||
time_t clock = (time_t)statbuf.st_mtime;
|
||||
#ifdef HAVE_GMTIME_R
|
||||
struct tm buffer;
|
||||
tm = (struct tm *)gmtime_r(&clock, &buffer);
|
||||
#else
|
||||
tm = gmtime(&clock);
|
||||
#endif
|
||||
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
|
||||
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
|
||||
tm);
|
||||
result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
|
||||
}
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Added by Dolbneff A.V & Spiridonoff A.V */
|
||||
if (conn->resume_from <= expected_size)
|
||||
expected_size -= conn->resume_from;
|
||||
else
|
||||
/* Is this error code suitable in such situation? */
|
||||
return CURLE_FTP_BAD_DOWNLOAD_RESUME;
|
||||
|
||||
if (fstated && (expected_size == 0))
|
||||
return CURLE_OK;
|
||||
|
||||
/* The following is a shortcut implementation of file reading
|
||||
this is both more efficient than the former call to download() and
|
||||
it avoids problems with select() and recv() on file descriptors
|
||||
in Winsock */
|
||||
if(fstated)
|
||||
Curl_pgrsSetDownloadSize(data, expected_size);
|
||||
|
||||
if(conn->resume_from)
|
||||
lseek(fd, conn->resume_from, SEEK_SET);
|
||||
|
||||
Curl_pgrsTime(data, TIMER_STARTTRANSFER);
|
||||
|
||||
while (res == CURLE_OK) {
|
||||
nread = read(fd, buf, BUFSIZE-1);
|
||||
|
||||
if ( nread > 0)
|
||||
buf[nread] = 0;
|
||||
|
||||
if (nread <= 0)
|
||||
break;
|
||||
|
||||
bytecount += nread;
|
||||
/* NOTE: The following call to fwrite does CR/LF translation on
|
||||
Windows systems if the target is stdout. Use -O or -o parameters
|
||||
to prevent CR/LF translation (this then goes to a binary mode
|
||||
file descriptor). */
|
||||
|
||||
res = Curl_client_write(data, CLIENTWRITE_BODY, buf, nread);
|
||||
if(res)
|
||||
return res;
|
||||
|
||||
Curl_pgrsSetDownloadCounter(data, bytecount);
|
||||
|
||||
if(Curl_pgrsUpdate(conn))
|
||||
res = CURLE_ABORTED_BY_CALLBACK;
|
||||
else
|
||||
res = Curl_speedcheck (data, now);
|
||||
}
|
||||
if(Curl_pgrsUpdate(conn))
|
||||
res = CURLE_ABORTED_BY_CALLBACK;
|
||||
|
||||
close(fd);
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif
|
30
curl/lib/file.h
Normal file
30
curl/lib/file.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef __FILE_H
|
||||
#define __FILE_H
|
||||
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: file.h,v 1.11 2004/01/07 09:19:35 bagder Exp $
|
||||
***************************************************************************/
|
||||
#ifndef CURL_DISABLE_FILE
|
||||
CURLcode Curl_file(struct connectdata *conn);
|
||||
CURLcode Curl_file_connect(struct connectdata *conn);
|
||||
#endif
|
||||
#endif
|
1583
curl/lib/formdata.c
Normal file
1583
curl/lib/formdata.c
Normal file
File diff suppressed because it is too large
Load diff
79
curl/lib/formdata.h
Normal file
79
curl/lib/formdata.h
Normal file
|
@ -0,0 +1,79 @@
|
|||
#ifndef __FORMDATA_H
|
||||
#define __FORMDATA_H
|
||||
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: formdata.h,v 1.19 2004/03/12 14:22:16 bagder Exp $
|
||||
***************************************************************************/
|
||||
/* plain and simple linked list with lines to send */
|
||||
struct FormData {
|
||||
struct FormData *next;
|
||||
char *line;
|
||||
size_t length;
|
||||
};
|
||||
|
||||
struct Form {
|
||||
struct FormData *data; /* current form line to send */
|
||||
unsigned int sent; /* number of bytes of the current line that has already
|
||||
been sent in a previous invoke */
|
||||
};
|
||||
|
||||
/* used by FormAdd for temporary storage */
|
||||
typedef struct FormInfo {
|
||||
char *name;
|
||||
size_t namelength;
|
||||
char *value;
|
||||
size_t contentslength;
|
||||
char *contenttype;
|
||||
long flags;
|
||||
char *buffer; /* pointer to existing buffer used for file upload */
|
||||
size_t bufferlength;
|
||||
char *showfilename; /* The file name to show. If not set, the actual
|
||||
file name will be used */
|
||||
struct curl_slist* contentheader;
|
||||
struct FormInfo *more;
|
||||
} FormInfo;
|
||||
|
||||
int Curl_FormInit(struct Form *form, struct FormData *formdata );
|
||||
|
||||
CURLcode
|
||||
Curl_getFormData(struct FormData **,
|
||||
struct curl_httppost *post,
|
||||
curl_off_t *size);
|
||||
|
||||
/* fread() emulation */
|
||||
size_t Curl_FormReader(char *buffer,
|
||||
size_t size,
|
||||
size_t nitems,
|
||||
FILE *mydata);
|
||||
|
||||
/* possible (old) fread() emulation that copies at most one line */
|
||||
size_t Curl_FormReadOneLine(char *buffer,
|
||||
size_t size,
|
||||
size_t nitems,
|
||||
FILE *mydata);
|
||||
|
||||
char *Curl_FormBoundary(void);
|
||||
|
||||
void Curl_formclean(struct FormData *);
|
||||
|
||||
#endif
|
||||
|
2614
curl/lib/ftp.c
Normal file
2614
curl/lib/ftp.c
Normal file
File diff suppressed because it is too large
Load diff
38
curl/lib/ftp.h
Normal file
38
curl/lib/ftp.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
#ifndef __FTP_H
|
||||
#define __FTP_H
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: ftp.h,v 1.19 2004/01/22 11:53:43 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef CURL_DISABLE_FTP
|
||||
CURLcode Curl_ftp(struct connectdata *conn);
|
||||
CURLcode Curl_ftp_done(struct connectdata *conn);
|
||||
CURLcode Curl_ftp_connect(struct connectdata *conn);
|
||||
CURLcode Curl_ftp_disconnect(struct connectdata *conn);
|
||||
CURLcode Curl_ftpsendf(struct connectdata *, const char *fmt, ...);
|
||||
CURLcode Curl_GetFTPResponse(ssize_t *nread, struct connectdata *conn,
|
||||
int *ftpcode);
|
||||
CURLcode Curl_ftp_nextconnect(struct connectdata *conn);
|
||||
CURLcode Curl_ftp_quit(struct connectdata *conn);
|
||||
#endif
|
||||
|
||||
#endif
|
2151
curl/lib/getdate.c
Normal file
2151
curl/lib/getdate.c
Normal file
File diff suppressed because it is too large
Load diff
37
curl/lib/getdate.h
Normal file
37
curl/lib/getdate.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
** Originally written by Steven M. Bellovin <smb@research.att.com> while
|
||||
** at the University of North Carolina at Chapel Hill. Later tweaked by
|
||||
** a couple of people on Usenet. Completely overhauled by Rich $alz
|
||||
** <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990.
|
||||
**
|
||||
** This code is in the public domain and has no copyright.
|
||||
*/
|
||||
|
||||
# include "setup.h"
|
||||
|
||||
#ifndef PARAMS
|
||||
# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef vms
|
||||
# include <types.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
# if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
# else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
# endif
|
||||
#endif /* defined (vms) */
|
||||
|
||||
time_t curl_getdate PARAMS ((const char *p, const time_t *now));
|
1104
curl/lib/getdate.y
Normal file
1104
curl/lib/getdate.y
Normal file
File diff suppressed because it is too large
Load diff
71
curl/lib/getenv.c
Normal file
71
curl/lib/getenv.c
Normal file
|
@ -0,0 +1,71 @@
|
|||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING file.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
* $Id: getenv.c,v 1.23 2004/01/29 13:56:45 bagder Exp $
|
||||
***************************************************************************/
|
||||
|
||||
#include "setup.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
#include <unixlib.h>
|
||||
#endif
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifdef CURLDEBUG
|
||||
#include "memdebug.h"
|
||||
#endif
|
||||
|
||||
static
|
||||
char *GetEnv(const char *variable)
|
||||
{
|
||||
#ifdef WIN32
|
||||
/* This shit requires windows.h (HUGE) to be included */
|
||||
char env[MAX_PATH]; /* MAX_PATH is from windef.h */
|
||||
char *temp = getenv(variable);
|
||||
env[0] = '\0';
|
||||
if (temp != NULL)
|
||||
ExpandEnvironmentStrings(temp, env, sizeof(env));
|
||||
#else
|
||||
#ifdef VMS
|
||||
char *env = getenv(variable);
|
||||
if (env && strcmp("HOME",variable) == 0) {
|
||||
env = decc$translate_vms(env);
|
||||
}
|
||||
#else
|
||||
/* no length control */
|
||||
char *env = getenv(variable);
|
||||
#endif
|
||||
#endif
|
||||
return (env && env[0])?strdup(env):NULL;
|
||||
}
|
||||
|
||||
char *curl_getenv(const char *v)
|
||||
{
|
||||
return GetEnv(v);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue