V 3.5 RC 1

This commit is contained in:
Romain Neutron
2011-12-05 00:23:28 +01:00
parent 6f1ee368aa
commit 4c5b7eb658
5563 changed files with 466984 additions and 985416 deletions

51
.gitmodules vendored Normal file
View File

@@ -0,0 +1,51 @@
[submodule "lib/vendor/dailymotion-sdk-php"]
path = lib/vendor/dailymotion-sdk-php
url = https://github.com/dailymotion/dailymotion-sdk-php
[submodule "lib/vendor/exiftool"]
path = lib/vendor/exiftool
url = git://github.com/alchemy-fr/exiftool.git
[submodule "lib/vendor/fpdf"]
path = lib/vendor/fpdf
url = git://github.com/alchemy-fr/fpdf.git
[submodule "lib/vendor/gdata"]
path = lib/vendor/gdata
url = git://github.com/alchemy-fr/gdata.git
[submodule "lib/vendor/moov"]
path = lib/vendor/moov
url = git://github.com/alchemy-fr/MoovRelocator.git
[submodule "lib/vendor/oauth2"]
path = lib/vendor/oauth2
url = git://github.com/alchemy-fr/oauth2-php.git
[submodule "lib/vendor/Phlickr"]
path = lib/vendor/Phlickr
url = git://github.com/alchemy-fr/Phlickr.git
[submodule "lib/vendor/PHPMailer_v5.1"]
path = lib/vendor/PHPMailer_v5.1
url = git://github.com/alchemy-fr/PHPMailer_v5.1.git
[submodule "lib/vendor/PHPShortener"]
path = lib/vendor/PHPShortener
url = git://github.com/alchemy-fr/PHPShortener.git
[submodule "lib/vendor/recaptcha"]
path = lib/vendor/recaptcha
url = git://github.com/alchemy-fr/recaptcha.git
[submodule "lib/vendor/Silex"]
path = lib/vendor/Silex
url = git://github.com/fabpot/Silex.git
[submodule "lib/vendor/sphinx"]
path = lib/vendor/sphinx
url = git://github.com/alchemy-fr/SphinxSearch-PHP-SDK.git
[submodule "lib/vendor/swiftmailer"]
path = lib/vendor/swiftmailer
url = git://github.com/swiftmailer/swiftmailer.git
[submodule "lib/vendor/symfony"]
path = lib/vendor/symfony
url = git://github.com/symfony/symfony.git
[submodule "lib/vendor/tcpdf"]
path = lib/vendor/tcpdf
url = git://github.com/alchemy-fr/tcpdf.git
[submodule "lib/vendor/Twig"]
path = lib/vendor/Twig
url = git://github.com/fabpot/Twig.git
[submodule "lib/vendor/Twig-extensions"]
path = lib/vendor/Twig-extensions
url = git://github.com/fabpot/Twig-extensions.git

20
AUTHORS Normal file
View File

@@ -0,0 +1,20 @@
** Phraseanet is written and maintained by the Phraseanet Developer Team **
Jean-Yves Gaulier
Nicolas Legoff
Romain Neutron
** Proudly Powered by Alchemy **
Aurélie Bachelet
Moctar Diouf
Jennifer Guérin
Nicolas Maillat
Guillaume Maubert
Jonathan Schneider
Phraseanet c/o Alchemy
30 Place Saint Georges
75009 Paris - France
+33 1 53 20 43 80
info@alchemy.fr

689
LICENSE Normal file
View File

@@ -0,0 +1,689 @@
Phraseanet v3
http://phraseanet.com/
Copyright (c) 2004 Alchemy see AUTHORS for more details
Licensed under GPL license.
http://phraseanet.com/license
All third-party included in this
-------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,8 +1,75 @@
Hello ! Phraseanet - Digital Asset Management application
==========================================
Welcome to Phraseanet IV. #Installation
For Installation and documentation, please read online documentation **Nginx**
at http://phraseanet.com
<pre>
server {
listen 80;
server_name subdeomain.domain.tld;
root /path/to/Phraseanet/www;
index index.php;
location /web {
alias /home/grosroro/workspace/Phraseanet-Trunk/datas/web;
}
location /download {
internal;
alias /home/grosroro/workspace/Phraseanet-Trunk/tmp/download;
}
location /lazaret {
internal;
alias /home/grosroro/workspace/Phraseanet-Trunk/tmp/lazaret;
}
}
</pre>
#Pimp my install
**xsendfile**
<pre>
location /protected {
internal;
alias /home/grosroro/workspace/Phraseanet-Trunk/datas/noweb/;
}
</pre>
**MP4 pseudo stream**
<pre>
location /mp4_video {
internal;
mp4;
alias /home/grosroro/workspace/Phraseanet-Trunk/datas/noweb/;
}
location /mp4_videos {
secure_download on;
secure_download_secret S3cre3t;
secure_download_path_mode file;
if ($secure_download = "-1") {
return 403;
}
if ($secure_download = "-2") {
return 403;
}
if ($secure_download = "-3") {
return 500;
}
rewrite ^/mp4_videos(.*)/[0-9a-zA-Z]*/[0-9a-zA-Z]*$ /mp4_video$1 last;
}
</pre>
#RESTFULL APIs
See the [online developer reference] [1]
#License
Phraseanet is licensed under GPL-v3 license.
[1]: http://developer.phraseanet.com/

View File

@@ -1,245 +1,240 @@
<?php <?php
require_once dirname( __FILE__ ) . "/../lib/bootstrap.php";
require(GV_RootPath."lib/getargs.php"); // le parser d'arguments de la ligne de commande /*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
require_once dirname(__FILE__) . "/../lib/bootstrap.php";
$registry = registry::get_instance();
require($registry->get('GV_RootPath') . "lib/classes/deprecated/getargs.php"); // le parser d'arguments de la ligne de commande
function printHelp(&$argt, &$conn) function printHelp(&$argt, &$conn)
{ {
print_usage($argt); print_usage($argt);
} }
$argt = array( $argt = array(
"--help" => array("set"=>false, "values"=>array(), "usage"=>" : this help") "--help" => array("set" => false, "values" => array(), "usage" => " : this help")
, "--sbas-id" => array("set"=>false, "values"=>array(), "usage"=>"=sbas_id : sbas_id to check") , "--sbas-id" => array("set" => false, "values" => array(), "usage" => "=sbas_id : sbas_id to check")
, "--field" => array("set"=>false, "values"=>array(), "usage"=>"(=field | : delete this field from records") , "--field" => array("set" => false, "values" => array(), "usage" => "(=field | : delete this field from records")
, "--showstruct" => array("set"=>false, "values"=>array(), "usage"=>"") , "--showstruct" => array("set" => false, "values" => array(), "usage" => "")
); );
function help() function help()
{ {
global $argv; global $argv;
printf("usage: %s [options]\n", $argv[0]); printf("usage: %s [options]\n", $argv[0]);
print("options:\n"); print("options:\n");
print("\t--help : this help\n"); print("\t--help : this help\n");
print("\t--sbas=sbas_id : sbas to change (if --help, list fields)\n"); print("\t--sbas=sbas_id : sbas to change (if --help, list fields)\n");
print("\t--showstruct : show structure changes and quit\n"); print("\t--showstruct : show structure changes and quit\n");
print("\t--field=fieldname : delete fieldname from records\n"); print("\t--field=fieldname : delete fieldname from records\n");
print("\t--field=\"oldname:newname\" : rename field oldname to newname into records\n"); print("\t--field=\"oldname:newname\" : rename field oldname to newname into records\n");
print("\t[--field=...] : --field=... can be repeated\n"); print("\t[--field=...] : --field=... can be repeated\n");
} }
// on commence par se conncter e application box // on commence par se conncter e application box
$allbas = array(); $allbas = array();
$conn = connection::getInstance();
$conn = connection::getPDOConnection();
$sql = "SELECT * FROM sbas"; $sql = "SELECT * FROM sbas";
if($rs = $conn->query($sql)) $stmt = $conn->prepare($sql);
$stmt->execute();
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
foreach ($rs as $tmprow)
{ {
while($tmprow = $conn->fetch_assoc($rs)) $allbas["B" . $tmprow["sbas_id"]] = $tmprow;
$allbas["B".$tmprow["sbas_id"]] = $tmprow;
$conn->free_result($rs);
} }
$error = false; $error = false;
if( !parse_cmdargs($argt, $err)) if (!parse_cmdargs($argt, $err))
{ {
help(); help();
print($err); print($err);
die(); die();
} }
if($argt["--help"]["set"]) if ($argt["--help"]["set"])
{ {
help(); help();
$error = true; $error = true;
} }
if(!$argt['--sbas-id']['set']) if (!$argt['--sbas-id']['set'])
{ {
print("missing option 'sbas-id'.\n"); print("missing option 'sbas-id'.\n");
$error = true; $error = true;
} }
$fields = null; $fields = null;
if($argt['--field']['set']) if ($argt['--field']['set'])
{ {
foreach($argt["--field"]["values"] as $f) foreach ($argt["--field"]["values"] as $f)
{ {
$f = explode(':', $f); $f = explode(':', $f);
$f[] = null; $f[] = null;
$fields[] = array('from'=>$f[0], 'to'=>$f[1]); $fields[] = array('from' => $f[0], 'to' => $f[1]);
} }
} }
$domstruct = null; $domstruct = null;
$connbas = null; if ($argt["--sbas-id"]["set"])
if($argt["--sbas-id"]["set"])
{ {
$sbas_id = $argt["--sbas-id"]["values"][0]; $sbas_id = $argt["--sbas-id"]["values"][0];
// sauf erreur, on a l'adresse du serveur distant // sauf erreur, on a l'adresse du serveur distant
$row = null; $row = null;
if(array_key_exists("B".$sbas_id, $allbas)) if (array_key_exists("B" . $sbas_id, $allbas))
$row = $allbas["B".$sbas_id]; $row = $allbas["B" . $sbas_id];
if($row) if ($row)
{ {
$connbas = connection::getInstance($sbas_id); try
if($connbas && $connbas->isok()) {
{ $databox = databox::get_instance($sbas_id);
$tfields = array(); $tfields = array();
if($argt["--help"]["set"]) if ($argt["--help"]["set"])
echo("fields of sbas=".$sbas_id." :\n"); echo("fields of sbas=" . $sbas_id . " :\n");
$sql = 'SELECT value FROM pref WHERE prop=\'structure\''; $domstruct = $databox->get_dom_structure();
if($rs = $connbas->query($sql)) $xp = $databox->get_xpath_structure();
{
if($row = $connbas->fetch_assoc($rs))
{
$domstruct = new DOMDocument();
$domstruct->formatOutput = true;
$domstruct->preserveWhiteSpace = false;
if( ($domstruct->loadXML($row['value'])) ) if ($domstruct)
{ {
$xp = new DOMXPath($domstruct); $xp = new DOMXPath($domstruct);
$xf = @$xp->query('/record/description/*'); $xf = @$xp->query('/record/description/*');
foreach($xf as $f) foreach ($xf as $f)
{ {
$tfields[] = $f->nodeName; $tfields[] = $f->nodeName;
if($argt["--help"]["set"]) if ($argt["--help"]["set"])
printf("\t%s \n", $f->nodeName); printf("\t%s \n", $f->nodeName);
} }
if($argt["--showstruct"]["set"]) if ($argt["--showstruct"]["set"])
printf("structure, before:\n...\n%s\n...\n", $domstruct->saveXML($xp->query('/record/description')->item(0))); printf("structure, before:\n...\n%s\n...\n", $domstruct->saveXML($xp->query('/record/description')->item(0)));
if(is_array($fields)) if (is_array($fields))
{ {
foreach($fields as $f) foreach ($fields as $f)
{ {
$fok = true; $fok = true;
$ff = $tf = null; $ff = $tf = null;
if( !($ff = @$xp->query('/record/description/'.$f['from'])) ) if (!($ff = @$xp->query('/record/description/' . $f['from'])))
{ {
echo("ERROR : bad xml fieldname '".$f['from']."'\n"); echo("ERROR : bad xml fieldname '" . $f['from'] . "'\n");
$error = true; $error = true;
$fok = false; $fok = false;
} }
if($f['to'] && !($tf = @$xp->query('/record/description/'.$f['to']))) if ($f['to'] && !($tf = @$xp->query('/record/description/' . $f['to'])))
{ {
echo("ERROR : bad xml fieldname '".$f['to']."'\n"); echo("ERROR : bad xml fieldname '" . $f['to'] . "'\n");
$error = true; $error = true;
$fok = false; $fok = false;
} }
if($fok) if ($fok)
{ {
if(in_array($f['from'], $tfields)) if (in_array($f['from'], $tfields))
{ {
if($f['to']) if ($f['to'])
{ {
if($tf->length == 0) if ($tf->length == 0)
{ {
$oldf = $ff->item(0); $oldf = $ff->item(0);
$newf = $domstruct->createElement($f['to']); $newf = $domstruct->createElement($f['to']);
foreach($oldf->attributes as $atn=>$atv) foreach ($oldf->attributes as $atn => $atv)
{ {
// var_dump($atn, $atv->value); $newf->setAttribute($atn, $atv->value);
$newf->setAttribute($atn, $atv->value); }
} $oldf->parentNode->replaceChild($newf, $oldf);
$oldf->parentNode->replaceChild($newf, $oldf); }
} else
else {
{ echo("WARNING : field '" . $f['to'] . "' exists into structure, will be replace by '" . $f['from'] . "\n");
echo("WARNING : field '".$f['to']."' exists into structure, will be replace by '".$f['from']."\n"); foreach ($tf as $n)
foreach($tf as $n) $n->parentNode->removeChild($n);
$n->parentNode->removeChild($n); }
} }
} else
else {
{ foreach ($ff as $n)
foreach($ff as $n) $n->parentNode->removeChild($n);
$n->parentNode->removeChild($n); }
} }
} else
else {
{ echo("WARNING : unknown field '" . $f['from'] . "' in structure\n");
echo("WARNING : unknown field '".$f['from']."' in structure\n"); }
} }
} }
} }
} if ($argt["--showstruct"]["set"])
if($argt["--showstruct"]["set"]) printf("structure, after:\n...\n%s\n...\n", $domstruct->saveXML($xp->query('/record/description')->item(0)));
printf("structure, after:\n...\n%s\n...\n", $domstruct->saveXML($xp->query('/record/description')->item(0))); }
} else
else {
{ echo("ERROR : sql reading structure\n");
echo("ERROR : structure xml error\n"); $error = true;
$error = true; }
} }
} catch (Excpetion $e)
else {
{ echo("ERROR accessing database\n");
echo("ERROR : sql reading structure\n"); $error = true;
$error = true; }
} }
$connbas->free_result($rs); else
} {
else echo("ERROR : unknown sbas_id " . $sbas_id . "\n");
{ $error = true;
echo("ERROR : sql reading structure\n"); }
$error = true;
}
}
else
{
echo("ERROR accessing database\n");
$error = true;
}
}
else
{
echo("ERROR : unknown sbas_id ".$sbas_id."\n");
$error = true;
}
} }
else else
{ {
if($argt["--help"]["set"]) if ($argt["--help"]["set"])
{ {
print("BASES :\n"); print("BASES :\n");
foreach($allbas as $bas) foreach ($allbas as $bas)
printf("%5d : %s @ %s:%s\n", $bas["sbas_id"], $bas["dbname"], $bas["host"], $bas["port"]); printf("%5d : %s @ %s:%s\n", $bas["sbas_id"], $bas["dbname"], $bas["host"], $bas["port"]);
} }
} }
if($error || $argt["--showstruct"]["set"]) if ($error || $argt["--showstruct"]["set"])
{ {
if($connbas && $connbas->isok()) flush();
$connbas->close(); die();
flush();
die();
} }
if(!$argt['--field']['set']) if (!$argt['--field']['set'])
{ {
print("ERROR : missing option 'field'\n"); print("ERROR : missing option 'field'\n");
$error = true; $error = true;
} }
if($domstruct) if ($domstruct instanceof DOMDocument)
{ {
$domstruct->documentElement->setAttribute('modification_date', date('YmdHis')); $databox->saveStructure($domstruct);
$sql = 'UPDATE pref SET value=\''.$connbas->escape_string($domstruct->saveXML()).'\', updated_on=NOW() WHERE prop=\'structure\'';
$connbas->query($sql);
} }
$dom = new DOMDocument(); $dom = new DOMDocument();
@@ -249,65 +244,65 @@ $dom->preserveWhiteSpace = false;
$recChanged = 0; $recChanged = 0;
$sql = 'SELECT record_id, xml FROM record ORDER BY record_id DESC'; $sql = 'SELECT record_id, xml FROM record ORDER BY record_id DESC';
if($rs = $connbas->query($sql)) $connbas = $databox->get_connection();
$stmt = $connbas->prepare($sql);
$stmt->execute();
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
foreach ($rs as $row)
{ {
while($row = $connbas->fetch_assoc($rs)) printf("%d \r", $row['record_id']);
{
printf("%d \r", $row['record_id']);
if( $dom->loadXML($row['xml']) ) if ($dom->loadXML($row['xml']))
{ {
$oldxml = $dom->saveXML(); $oldxml = $dom->saveXML();
// printf("avant :\n%s\n", $dom->saveXML());
$xp = new DOMXPath($dom); $xp = new DOMXPath($dom);
foreach($fields as $f) foreach ($fields as $f)
{ {
if( ($tn = @$xp->query('/record/description/'.$f['from'])) ) if (($tn = @$xp->query('/record/description/' . $f['from'])))
{ {
foreach($tn as $oldn) foreach ($tn as $oldn)
{ {
if($f['to']) if ($f['to'])
{ {
$newn = $dom->createElement($f['to']); $newn = $dom->createElement($f['to']);
foreach($oldn->childNodes as $n) foreach ($oldn->childNodes as $n)
$newn->appendChild($n); $newn->appendChild($n);
$oldn->parentNode->replaceChild($newn, $oldn); $oldn->parentNode->replaceChild($newn, $oldn);
} }
else else
{ {
$oldn->parentNode->removeChild($oldn); $oldn->parentNode->removeChild($oldn);
} }
} }
} }
} }
$newxml = $dom->saveXML(); $newxml = $dom->saveXML();
if($newxml != $oldxml) if ($newxml != $oldxml)
{ {
// printf("apres :\n%s\n", $dom->saveXML()); // printf("apres :\n%s\n", $dom->saveXML());
$sql = 'UPDATE record SET xml=\''.$connbas->escape_string($newxml).'\', moddate=NOW() WHERE record_id='.$row['record_id']; $sql = 'UPDATE record SET xml=:xml, moddate=NOW()
$connbas->query($sql); WHERE record_id = :record_id';
$recChanged++; $stmt = $connbas->prepare($sql);
} $stmt->execute(array(':xml' => $newxml, ':record_id' => $row['record_id']));
} $stmt->closeCursor();
else $recChanged++;
{ }
printf("ERR (rid=%s) : bad xml \n", $row['record_id']); }
} else
} {
$connbas->free_result($rs); printf("ERR (rid=%s) : bad xml \n", $row['record_id']);
}
} }
$connbas->close(); if ($recChanged > 0)
printf("%s record(s) changed, please reindex database\n", $recChanged);
if($recChanged > 0)
printf("%s record(s) changed, please reindex database\n", $recChanged);
else else
printf("no record(s) changed\n"); printf("no record(s) changed\n");
?>

View File

@@ -1,25 +0,0 @@
<?php
require_once dirname( __FILE__ ) . '/../lib/conf.d/_GV_template.inc';
require_once dirname( __FILE__ ) . '/../lib/classes/phrasea.class.php';
require_once dirname( __FILE__ ) . '/../lib/classes/setup.class.php';
require_once dirname( __FILE__ ) . '/../lib/classes/session.class.php';
error_reporting(E_ALL);
ini_set('display_errors','on');
ini_set('display_startup_errors','on');
$error = false;
if(version_compare(PHP_VERSION,'5.2.4','<'))
{
echo "\nYour PHP version is too old. PHP 5.2.4 is required\n";
$error = true;
}
$error = setup::check_php_extension_console();
if($error)
exit( "\n\nPlese set up correct configuration before install\n\nPlease be sure to use the correct php.ini for this test\n\n");
else
echo "\n\nConfiguration is OK you can now update or install\n\n";

67
bin/console Normal file
View File

@@ -0,0 +1,67 @@
#!/usr/bin/php
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @package KonsoleKomander
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Application;
require_once dirname(__FILE__) . '/../lib/classes/bootstrap.class.php';
try
{
bootstrap::register_autoloads();
$app = new Application("
_____ _ _ _____ _____ ______ _ _ ______ _______
| __ \| | | | __ \ /\ / ____| ____| /\ | \ | | ____|__ __|
| |__) | |__| | |__) | / \ | (___ | |__ / \ | \| | |__ | |
| ___/| __ | _ / / /\ \ \___ \| __| / /\ \ | . ` | __| | |
| | | | | | | \ \ / ____ \ ____) | |____ / ____ \| |\ | |____ | |
|_| |_| |_|_| \_|_/ \_\_____/|______/_/ \_\_| \_|______| |_|
_ __ _ _ __ _
| |/ /___ _ _ ___ ___| |___ | |/ /___ _ __ _ __ __ _ _ _ __| |___ _ _
| ' </ _ \ ' \(_-</ _ \ / -_) | ' </ _ \ ' \| ' \/ _` | ' \/ _` / -_) '_|
|_|\_\___/_||_/__/\___/_\___| |_|\_\___/_|_|_|_|_|_\__,_|_||_\__,_\___|_|
Phraseanet Copyright (C) 2004 Alchemy
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `about:license' for details.\n\n"
. ' KONSOLE KOMMANDER', GV_version . ' ' . GV_version_name);
$app->add(new module_console_aboutAuthors('about:authors'));
$app->add(new module_console_aboutLicense('about:license'));
$app->add(new module_console_systemUpgrade('system:upgrade'));
$app->add(new module_console_systemConfigCheck('system:configCheck'));
$app->add(new module_console_systemBackupDB('system:backupDB'));
$app->add(new module_console_systemClearCache('system:clearCache'));
$app->add(new module_console_systemTemplateGenerator('system:templateGenerator'));
$app->add(new module_console_taskrun('task:run'));
$app->add(new module_console_tasklist('task:list'));
$app->add(new module_console_schedulerState('scheduler:state'));
$app->add(new module_console_schedulerStop('scheduler:stop'));
$app->add(new module_console_schedulerStart('scheduler:start'));
$app->run();
}
catch (Exception $e)
{
echo "an error occured";
}

View File

@@ -1,105 +1,124 @@
<?php <?php
require_once dirname( __FILE__ ) . "/../lib/bootstrap.php";
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
require_once dirname(__FILE__) . "/../lib/bootstrap.php";
define('DOCPERDIR', 100); define('DOCPERDIR', 100);
$tfields = array( $tfields = array(
'Titre' =>array('field_out'=>'Titre') 'Titre' => array('field_out' => 'Titre')
, 'Categories' =>array('field_out'=>'Categories') , 'Categories' => array('field_out' => 'Categories')
, 'MotsCles' =>array('field_out'=>'MotsCles') , 'MotsCles' => array('field_out' => 'MotsCles')
, 'Date' =>array('field_out'=>'Date') , 'Date' => array('field_out' => 'Date')
, 'Photographe' =>array('field_out'=>'Photographe') , 'Photographe' => array('field_out' => 'Photographe')
, 'Ville' =>array('field_out'=>'Ville') , 'Ville' => array('field_out' => 'Ville')
, 'Pays' =>array('field_out'=>'Pays') , 'Pays' => array('field_out' => 'Pays')
, 'Reference' =>array('field_out'=>'Reference') , 'Reference' => array('field_out' => 'Reference')
, 'Credit' =>array('field_out'=>'Credit') , 'Credit' => array('field_out' => 'Credit')
, 'Legende' =>array('field_out'=>'Legende') , 'Legende' => array('field_out' => 'Legende')
); );
$status = array( $status = array(
'4' => '4' '4' => '4'
,'5' => '5' , '5' => '5'
); );
require(GV_RootPath."lib/index_utils2.php"); $registry = registry::get_instance();
require(GV_RootPath."lib/getargs.php"); // le parser d'arguments de la ligne de commande require($registry->get('GV_RootPath') . "lib/classes/deprecated/getargs.php"); // le parser d'arguments de la ligne de commande
function printHelp(&$argt, &$conn) function printHelp(&$argt, &$conn)
{ {
print_usage($argt); print_usage($argt);
} }
$argt = array( $argt = array(
"--help" => array("set"=>false, "values"=>array(), "usage"=>" : cette aide") "--help" => array("set" => false, "values" => array(), "usage" => " : cette aide")
, "--sbas-id" => array("set"=>false, "values"=>array(), "usage"=>"=sbas_id : sbas_id de la base a ventiler") , "--sbas-id" => array("set" => false, "values" => array(), "usage" => "=sbas_id : sbas_id de la base a ventiler")
, "--coll-id" => array("set"=>false, "values"=>array(), "usage"=>"=coll_id : coll_id a ventiler") , "--coll-id" => array("set" => false, "values" => array(), "usage" => "=coll_id : coll_id a ventiler")
, "--out" => array("set"=>false, "values"=>array(), "usage"=>"=path : repertoire d'export") , "--out" => array("set" => false, "values" => array(), "usage" => "=path : repertoire d'export")
, "--limit" => array("set"=>false, "values"=>array(), "usage"=>"=n : nombre max de records a exporter (pour test)") , "--limit" => array("set" => false, "values" => array(), "usage" => "=n : nombre max de records a exporter (pour test)")
); );
// on commence par se conncter e application box
$allbas = array(); $allbas = array();
$conn = connection::getInstance();
$sql = "SELECT * FROM sbas"; $conn = connection::getPDOConnection();
if($rs = $conn->query($sql))
{ $sql = "SELECT * FROM sbas";
while($tmprow = $conn->fetch_assoc($rs)) $stmt = $conn->prepare($sql);
$allbas["B".$tmprow["sbas_id"]] = $tmprow; $stmt->execute();
$conn->free_result($rs); $rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
} $stmt->closeCursor();
foreach ($rs as $tmprow)
{
$allbas["B" . $tmprow["sbas_id"]] = $tmprow;
}
$error = false; $error = false;
if( !parse_cmdargs($argt, $err) || $argt["--help"]["set"]) if (!parse_cmdargs($argt, $err) || $argt["--help"]["set"])
{ {
print($err); print($err);
$error = true; $error = true;
} }
if(!$argt["--sbas-id"]["set"]) if (!$argt["--sbas-id"]["set"])
{ {
print("parametre 'sbas-id' obligatoire.\n"); print("parametre 'sbas-id' obligatoire.\n");
$error = true; $error = true;
} }
if(!$argt["--out"]["set"]) if (!$argt["--out"]["set"])
{ {
print("parametre 'out' obligatoire.\n"); print("parametre 'out' obligatoire.\n");
$error = true; $error = true;
} }
if($error) if ($error)
{ {
print_usage($argt); print_usage($argt);
print("BASES :\n"); print("BASES :\n");
foreach($allbas as $bas) foreach ($allbas as $bas)
printf("%5d : %s @ %s:%s\n", $bas["sbas_id"], $bas["dbname"], $bas["host"], $bas["port"]); printf("%5d : %s @ %s:%s\n", $bas["sbas_id"], $bas["dbname"], $bas["host"], $bas["port"]);
flush(); flush();
die(); die();
} }
$root = p4string::addEndSlash($argt["--out"]["values"][0]); $root = p4string::addEndSlash($argt["--out"]["values"][0]);
if(!is_dir($root)) if (!is_dir($root))
{ {
print("repertoire out '".$root."' absent.\nABANDON\n"); print("repertoire out '" . $root . "' absent.\nABANDON\n");
die(); die();
} }
if($argt["--limit"]["set"]) if ($argt["--limit"]["set"])
{ {
$limit = (int)($argt["--limit"]["values"][0]); $limit = (int) ($argt["--limit"]["values"][0]);
} }
else else
{ {
$limit = NULL; $limit = NULL;
} }
@@ -107,19 +126,21 @@ else
$sbas_id = $argt["--sbas-id"]["values"][0]; $sbas_id = $argt["--sbas-id"]["values"][0];
// sauf erreur, on a l'adresse du serveur distant // sauf erreur, on a l'adresse du serveur distant
$connbas = null;
$row = null; $row = null;
if(array_key_exists("B".$sbas_id, $allbas)) if (array_key_exists("B" . $sbas_id, $allbas))
$row = $allbas["B".$sbas_id]; $row = $allbas["B" . $sbas_id];
if($row) if ($row)
{ {
$connbas = connection::getInstance($sbas_id); try
if(!$connbas) {
{ $connbas = connection::getPDOConnection($sbas_id);
echo("\n\nerreur d'acces a la base\n\nABANDON ! :(\n\n"); }
flush(); catch (Exception $e)
die(); {
} echo("\n\nerreur d'acces a la base\n\nABANDON ! :(\n\n");
flush();
die();
}
} }
echo("Connexion a la base ok\n\n"); echo("Connexion a la base ok\n\n");
@@ -130,136 +151,140 @@ $root .= $row["dbname"];
$ndig = ceil(log10(DOCPERDIR-1)); $ndig = ceil(log10(DOCPERDIR - 1));
define('DIRFMT1', '%0'.(8-$ndig).'d'); define('DIRFMT1', '%0' . (8 - $ndig) . 'd');
define('DIRFMT2', '%0'.$ndig.'d'); define('DIRFMT2', '%0' . $ndig . 'd');
$sql = 'SELECT xml, path, file, record.record_id FROM record INNER JOIN subdef ON subdef.record_id=record.record_id AND subdef.name=\'document\''; $sql = 'SELECT xml, path, file, record.record_id
FROM record
INNER JOIN subdef
ON subdef.record_id=record.record_id AND subdef.name="document"';
$params = array();
if($argt["--coll-id"]["set"]) if ($argt["--coll-id"]["set"])
{ {
$sql .= ' WHERE coll_id="'.(int)($argt["--coll-id"]["values"][0]).'" '; $sql .= ' WHERE coll_id = :coll_id';
$params[':coll_id'] = (int) ($argt["--coll-id"]["values"][0]);
} }
$sql .= ' ORDER BY record.record_id ASC'; $sql .= ' ORDER BY record.record_id ASC';
if($limit !== NULL) if ($limit !== NULL)
$sql .= ' LIMIT ' . $limit; $sql .= ' LIMIT ' . (int) $limit;
if($rs = $connbas->query($sql)) $stmt = $connbas->prepare($sql);
$stmt->execute($params);
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
$stmt->closeCursor();
$idir = -1;
$idoc = DOCPERDIR - 1;
$nrec = count($rs);
foreach ($rs as $row)
{ {
$idir = -1; printf("%d \r", --$nrec);
$idoc = DOCPERDIR-1;
$nrec = $connbas->num_rows($rs); if (($sxml = simplexml_load_string($row['xml'])))
{
if (($orgdocname = (string) ($sxml->doc['originalname'])) != '')
{
if (file_exists($phfile = p4string::addEndSlash($row['path']) . $row['file']))
{
if (++$idoc == DOCPERDIR)
{
$idir++;
$dir1name = sprintf(DIRFMT1, $idir);
@mkdir($root . '/' . $dir1name);
$idoc = 0;
}
while($row = $connbas->fetch_assoc($rs)) // $dir2name = sprintf(DIRFMT2, $idoc);
{ $dir2name = sprintf('rid_%08d', $row['record_id']);
printf("%d \r", --$nrec); @mkdir($outdir = ($root . '/' . $dir1name . '/' . $dir2name));
if( ($sxml = simplexml_load_string($row['xml'])) ) // print($phfile . "\n");
{ if (copy($phfile, $outdir . '/' . $orgdocname))
if( ($orgdocname = (string)($sxml->doc['originalname'])) != '' ) {
{
if(file_exists($phfile = p4string::addEndSlash($row['path']) . $row['file']))
{
if(++$idoc == DOCPERDIR)
{
$idir++;
$dir1name = sprintf(DIRFMT1, $idir);
@mkdir($root . '/' . $dir1name);
$idoc = 0;
}
// $dir2name = sprintf(DIRFMT2, $idoc); // file_put_contents($outdir . '/' . $orgdocname . '-old.xml', $row['xml']);
$dir2name = sprintf('rid_%08d', $row['record_id']);
@mkdir( $outdir = ($root . '/' . $dir1name . '/' . $dir2name) );
// print($phfile . "\n"); foreach ($tfields as $fname => $field)
if(copy($phfile, $outdir . '/' . $orgdocname ) ) $tfields[$fname]['values'] = array();
{
// file_put_contents($outdir . '/' . $orgdocname . '-old.xml', $row['xml']); foreach ($sxml->description->children() as $fname => $fvalue)
{
// printf("%s : %s\n", $fname, $fvalue);
if (isset($tfields[$fname]))
$tfields[$fname]['values'][] = $fvalue;
}
foreach($tfields as $fname=>$field) $domout = new DOMDocument('1.0', 'UTF-8');
$tfields[$fname]['values'] = array(); $domout->standalone = true;
$domout->preserveWhiteSpace = false;
foreach($sxml->description->children() as $fname=>$fvalue) $element = $domout->createElement('record');
{
// printf("%s : %s\n", $fname, $fvalue);
if(isset($tfields[$fname]))
$tfields[$fname]['values'][] = $fvalue;
}
$domout = new DOMDocument('1.0', 'UTF-8'); $domrec = $domout->appendChild($element);
$domout->standalone = true; $domdesc = $domrec->appendChild($domout->createElement('description'));
$domout->preserveWhiteSpace = false; foreach ($tfields as $kfield => $field)
{
foreach ($field['values'] as $value)
{
$domfield = $domdesc->appendChild($domout->createElement($field['field_out']));
$domfield->appendChild($domout->createTextNode($value));
}
}
$element = $domout->createElement('record'); $sqlS = 'SELECT bin(status) as statin FROM record
WHERE record_id = :record_id"' . $row['record_id'] . '"';
$stmt = $connbas->prepare($sqlS);
$stmt->execute(array(':record_id' => $row['record_id']));
$statin = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
$domrec = $domout->appendChild($element); $statin = $statin ? strrev($statin['statin']) : false;
$domdesc = $domrec->appendChild($domout->createElement('description'));
foreach($tfields as $kfield=>$field)
{
foreach($field['values'] as $value)
{
$domfield = $domdesc->appendChild($domout->createElement($field['field_out']));
$domfield->appendChild($domout->createTextNode($value));
}
}
$sqlS = 'SELECT bin(status) as statin FROM record WHERE record_id="'.$row['record_id'].'"'; $statout = '0000000000000000000000000000000000000000000000000000000000001111';
$statin = false; if ($statin)
if($rsS = $connbas->query($sqlS)) {
{ foreach ($status as $sIn => $sOut)
if($statin = $connbas->fetch_assoc($rsS)) {
{ if (substr($statin, $sIn, 1) == '1')
$statin = strrev($statin['statin']); {
} $statout = substr_replace($statout, '1', (63 - (int) $sOut), 1);
} }
}
}
$statout = '0000000000000000000000000000000000000000000000000000000000001111'; $domstatus = $domrec->appendChild($domout->createElement('status'));
if($statin) $domstatus->appendChild($domout->createTextNode($statout));
foreach($status as $sIn => $sOut)
{
if(substr($statin,$sIn,1)=='1')
{
$statout = substr_replace($statout,'1',(63-(int)$sOut),1);
}
}
$domstatus = $domrec->appendChild($domout->createElement('status'));
$domstatus->appendChild($domout->createTextNode($statout));
$domout->save($outdir . '/' . $orgdocname . '.xml'); $domout->save($outdir . '/' . $orgdocname . '.xml');
unset($domout); unset($domout);
} }
else else
{ {
printf("\nERR (rid=%s) : erreur de copie du document '%s'\n", $row['record_id'], $phfile); printf("\nERR (rid=%s) : erreur de copie du document '%s'\n", $row['record_id'], $phfile);
} }
} }
else else
{ {
printf("\nERR (rid=%s) : document '%s' manquant\n", $row['record_id'], $phfile); printf("\nERR (rid=%s) : document '%s' manquant\n", $row['record_id'], $phfile);
} }
} }
else else
{ {
printf("\nERR (rid=%s) : orgdocname manquant\n", $row['record_id']); printf("\nERR (rid=%s) : orgdocname manquant\n", $row['record_id']);
} }
} }
else else
{ {
printf("\nERR (rid=%s) : xml illisible manquant\n", $row['record_id']); printf("\nERR (rid=%s) : xml illisible manquant\n", $row['record_id']);
} }
}
$connbas->free_result($rs);
} }
die();
?>

View File

@@ -1,333 +0,0 @@
<?php
require_once dirname( __FILE__ ) . "/../lib/bootstrap_task.php";
phrasea::start(); // because it's not done in bootstrap_task.php anymore to low the number of actives cnx
$session = session::getInstance(); // because it's not done in bootstrap_task.php anymore to low the number of actives cnx
$argt = array(
"--help" => array("set"=>false, "values"=>array(), "usage"=>"[={task_id|classname}] : this help | help of task {task_id} | help of {classname}"),
"--display_errors" => array("set"=>false, "values"=>array(), "usage"=>" : force php ini_set('display_errors', 1)"),
"--taskid" => array("set"=>false, "values"=>array(), "usage"=>"={id} : id of task to launch")
);
$system = p4utils::getSystem();
if($system != "DARWIN" && $system != "WINDOWS" && $system != "LINUX" )
{
printf(("runtask::sorry, this program does not run under '%s'\n"), $system);
flush();
exit(-1);
}
else
{
// printf("Bonjour, votre OS est '" . $system . "'.\n");
flush();
}
$RETURN = $system=="WINDOWS" ? "\r\n" : "\n";
// on commence par parser les arguments propres a 'runstask' : taskid, help
if(!parse_cmdargs($argt, $err, false))
{
print($err);
getUsage($argt, true);
flush();
exit(-1);
}
if($argt["--display_errors"]["set"])
{
ini_set('display_errors', 1);
}
if($argt["--help"]["set"])
{
if(isset($argt["--help"]["values"][0]))
{
$harg = $argt["--help"]["values"][0];
if((int)$harg > 0)
{
$conn = connection::getInstance();
$sql = "SELECT * FROM task2 WHERE task_id='".$conn->escape_string($harg)."'";
$rowtask = null;
if($rs = $conn->query($sql))
{
$rowtask = $conn->fetch_assoc($rs);
$conn->free_result($rs);
}
if($rowtask)
{
$classname = $rowtask['class'];
}
else
{
printf(("runtask::ERROR : task id %s not found\n"), $taskid);
exit(-1);
}
}
else
{
// on a fait '--help=azerty' : on demande l'aide de la classe 'azerty'
$classname = $harg;
}
$ztask = null;
$ztask = new $classname();
// on parse maintenant les arguments propres a cette classe de tache
// on rajoute les args de la classe aux args par defaut
$ztask->argt = array_merge($argt, $ztask->argt);
if(!parse_cmdargs($ztask->argt, $err, true) || $ztask->argt["--help"]["set"])
{
print($err);
getUsage($ztask->argt, false);
if(method_exists($ztask, 'help'))
{
$t = str_replace("\n", "\n\t", utf8_decode($ztask->help()));
printf(("runtask::about:\n\t%s\n"), $t);
}
flush();
exit(-1);
}
}
else
{
// on a fait '--help' tout court
getUsage($argt, true);
flush();
exit(-1);
}
exit(-1);
}
if(!$argt["--taskid"]["set"])
{
// si on n'a pas fait '--help' alors '--taskid=xx' est obligatoire
getUsage($argt, true);
flush();
printf(("runtask::ERROR : option 'taskid' not set\n"));
exit(-1);
}
$classname = null;
$taskid = $argt["--taskid"]["values"][0];
$taskSettings = null;
$conn = connection::getInstance();
$sql = "SELECT * FROM task2 WHERE task_id='".$conn->escape_string($taskid)."'";
$rowtask = null;
if($rs = $conn->query($sql))
{
$rowtask = $conn->fetch_assoc($rs);
$conn->free_result($rs);
}
if($rowtask)
{
$classname = $rowtask["class"];
$taskSettings = $rowtask["settings"];
}
else
{
printf(("runtask::ERROR : task id %s not found\n"), $taskid);
exit(-1);
}
// try to lock one instance of this task
p4::fullmkdir($lockdir = GV_RootPath.'tmp/locks/');
$tasklock = fopen(($lockfile = ($lockdir . 'task_'.$taskid.'.lock')), 'a+');
if(flock($tasklock, LOCK_EX|LOCK_NB ) != true)
{
printf(("runtask::ERROR : task already running.\n"), $taskid);
fclose($tasklock);
exit(-1);
}
else
{
ftruncate($tasklock, 0);
fwrite($tasklock, ''.getmypid());
fflush($tasklock);
}
$ztask = null;
$ztask = new $classname($taskid);
// on parse maintenant les arguments propres <20> cette classe de t<>che
// on rajoute les args de la classe aux args par d<>faut
$ztask->argt = array_merge($argt, $ztask->argt);
if(!parse_cmdargs($ztask->argt, $err, true) ) // || $argt["--help"]["set"])
{
print($err);
print(getUsage($ztask->argt, false));
flush();
return;
}
// ici normalement la tache va tourner
$sql = "UPDATE task2 SET status='manual', pid='".$conn->escape_string(getmypid())."' WHERE task_id='".$conn->escape_string($taskid)."'";
$conn->query($sql);
$ztask->taskid = $taskid;
$ztask->classname = $classname;
$ztask->taskSettings = $taskSettings;
printf(("runtask::%s : '%s' (taskid=%s) started.\n"), date("r"), $ztask->getName(), $ztask->taskid);
$ret_status = $ztask->run();
printf(("runtask::%s : '%s' (taskid=%s) ended.\n"), date("r"), $ztask->getName(), $ztask->taskid);
// la tache est finie
if($ret_status)
{
$sql = "UPDATE task2 SET status='".$conn->escape_string($ret_status)."', pid=0 WHERE task_id='".$conn->escape_string($taskid)."'";
$conn->query($sql);
}
//file_put_contents($tasklock, '');
flock($tasklock, LOCK_UN|LOCK_NB );
ftruncate($tasklock, 0);
fclose($tasklock);
@unlink($lockfile);
// --------------------------------------------------------------------------------------------------------
function getUsage(&$argt, $listtask)
{
global $argc, $argv;
$t = "";
$t .= sprintf(("runtask::usage: %s [options]\noptions:\n"), $argv[0]);
foreach($argt as $n=>$v)
if($v["usage"])
$t .= "\t". $n . $v["usage"] . "\n";
print($t);
if($listtask)
{
$conn = connection::getInstance();
if($conn)
{
$ttask = array();
$twidth = array();
$sql = "SELECT * FROM task2";
if($rs = $conn->query($sql))
{
while($row = $conn->fetch_assoc($rs))
{
$ttask[] = $row;
foreach($row as $f=>$v)
{
if(!isset($twidth[$f]) || strlen($v) > $twidth[$f])
$twidth[$f] = strlen($v);
}
}
$conn->free_result($rs);
foreach($twidth as $k=>$v)
{
if(strlen($k) > $v)
$twidth[$k] = strlen($k);
}
$sep = $fmt = "|\n";
foreach(array('task_id', 'name', 'status') as $f)
{
$sep = "|-".str_repeat('-', $twidth[$f])."-" . $sep;
$fmt = "| %".$twidth[$f]."s " . $fmt;
}
print($sep);
printf($fmt, 'task_id', 'name', 'status');
print($sep);
foreach($ttask as $task)
printf($fmt, $task['task_id'], $task['name'], $task['status']);
print($sep);
}
}
}
}
function parse_cmdargs(&$argt, &$err, $printerrors=true)
{
$err = "";
global $argc, $argv;
for($a=1; $a<$argc; $a++)
{
$arg = $argv[$a];
if($arg=="--" || $arg=="-")
continue;
if(($p = strpos($arg, "=")) === false)
{
parse_arg($arg, $argt, $err, $printerrors);
}
else
{
parse_arg(substr($arg, 0, $p), $argt, $err, $printerrors);
parse_arg("=", $argt, $err, $printerrors);
parse_arg(substr($arg, $p+1), $argt, $err, $printerrors);
}
}
foreach($argt as $n=>$v)
{
if(!isset($v["values"][0]) && isset($v["default"]))
{
$argt[$n]["set"] = true;
$argt[$n]["values"][] = $v["default"];
}
}
// printf("end parse_cmdargs(..) ! \n");
// var_dump($argt);
return($err == "");
}
function parse_arg($arg, &$argt, &$err, $printerrors)
{
static $last_arg="";
static $curopt = null;
if($arg != "=")
{
if($last_arg != "=")
{
if(isset($argt[$arg]))
$argt[$curopt = $arg]["set"] = true;
elseif($printerrors)
{
$err .= sprintf(("runtask::unknown option '%s'.\n"), $arg);
// if(isset($argt["--help"]))
// $argt["--help"]["set"] = true;
}
}
else
{
if($curopt)
$argt[$curopt]["values"][] = $arg;
elseif($printerrors)
{
$err .= ("runtask::'=' must follow an option's name.\n");
// if(isset($argt["--help"]))
// $argt["--help"]["set"] = true;
}
}
}
$last_arg = $arg;
}
?>

View File

@@ -1,246 +0,0 @@
<?php
require_once dirname( __FILE__ ) . "/../lib/bootstrap_task.php";
phrasea::start();
$session = session::getInstance();
require_once(GV_RootPath."lib/index_utils2.php");
$argt = array(
"--taskid" => array("set"=>false, "values"=>array(), "usage"=>"={id} : id of task to launch")
);
// on commence par parser l'argument propre <20> 'schedtask' : taskid
if(!parse_cmdargs($argt, $err, false) || !$argt["--taskid"]["set"])
{
// --taskid=xx' est obligatoire
printf("option 'taskid' not set\n");
exit(-1);
}
$classname = null;
$taskid = $argt["--taskid"]["values"][0];
$taskSettings = null;
$conn = connection::getInstance();
$sql = "SELECT * FROM task2 WHERE task_id='".$conn->escape_string($taskid)."'";
if($rs = $conn->query($sql))
{
if($row = $conn->fetch_assoc($rs))
{
$classname = $row["class"];
$taskSettings = $row["settings"];
}
else
{
printf("task id $taskid not found\n");
exit(-1);
}
$conn->free_result($rs);
}
// try to lock one instance of this task
p4::fullmkdir($lockdir = GV_RootPath.'tmp/locks/');
for($try=10; $try>=0; $try--)
{
if( ($tasklock = fopen(($lockfile = ($lockdir . 'task_'.$taskid.'.lock')), 'w')) )
{
if(flock($tasklock, LOCK_EX|LOCK_NB) != true)
{
printf("failed to lock '%s' (try=%s) \n", $lockfile, $try);
if($try == 0)
{
printf("task %s already running.\n", $taskid);
fclose($tasklock);
exit(-1);
}
else
{
sleep(2);
}
}
else
{
ftruncate($tasklock, 0);
fwrite($tasklock, ''.getmypid());
fflush($tasklock);
break;
}
}
else
{
printf("failed to fopen '%s' \n", $lockfile);
}
}
$ztask = null;
//if($classname && file_exists("./tasks/$classname.class.php"))
//{
// require("./tasks/$classname.class.php");
// if(class_exists($classname))
// {
$ztask = new $classname($taskid);
// }
// if(!$ztask)
// {
// printf("file '$classname.class.php' is not a proper task class\n");
// fclose($tasklock);
// @unlink($lockfile);
// exit(-1);
// }
//}
//else
//{
// printf("error loading file '$classname.class.php'\n");
// fclose($tasklock);
// @unlink($lockfile);
// exit(-1);
//}
// ici normalement la tache va tourner
$sql = "UPDATE task2 SET status='started', pid='".$conn->escape_string(getmypid())."' WHERE task_id='".$conn->escape_string($taskid)."'";
$conn->query($sql);
// on <20>x<EFBFBD>cute la tache
$ztask->taskid = $taskid;
$ztask->classname = $classname;
$ztask->taskSettings = $taskSettings;
$ztask->log(sprintf('%s (taskid=%s) started.', $ztask->getName(), $ztask->taskid));
$ret_status = $ztask->run();
unset($conn);
$conn = connection::getInstance();
$ztask->log(sprintf('%s (taskid=%s) ended returning(\'%s\').', $ztask->getName(), $ztask->taskid, $ret_status));
// la tache est finie
if($ret_status) // task asked to change her status
{
if($conn->ping())
{
if($ret_status == 'todelete')
{
$sql = "DELETE FROM task2 WHERE task_id='".$conn->escape_string($taskid)."'";
$conn->query($sql);
}
else
{
$sql = "UPDATE task2 SET status='".$conn->escape_string($ret_status)."', pid=0 WHERE status != 'tostop' AND task_id='".$conn->escape_string($taskid)."'";
$conn->query($sql);
$sql = "UPDATE task2 SET status='stopped', pid=0 WHERE status = 'tostop' AND task_id='".$conn->escape_string($taskid)."'";
$conn->query($sql);
}
}
else
{
// task must have died because a lost of cnx !
// since we can't change status also, we must grant the scheduler to restart us
// nb : when sheduler gains cnx again, it will restart task where status='running' since it thinks they just crashed
// BUT : in this case (cnx lost/gain), it will reset the crash counter since task did no realy 'crashed'
}
}
// file_put_contents($tasklock, '');
ftruncate($tasklock, 0);
fclose($tasklock);
//flock($tasklock, LOCK_UN|LOCK_NB );
/*
for($try=1; $try<10; $try++)
{
if($r = unlink($lockfile))
{
// printf("unlink %s (try=%s) returned %s \n", $lockfile, $try, $r+0);
break;
}
else
{
// printf("failed to unlink %s (try=%s) returned %s \n", $lockfile, $try, $r+0);
sleep(2);
}
}
// printf("file_exists(%s) = %s \n", $lockfile, 0+file_exists($lockfile));
*/
// --------------------------------------------------------------------------------------------------------
function parse_cmdargs(&$argt, &$err, $printerrors=true)
{
$err = "";
global $argc, $argv;
for($a=1; $a<$argc; $a++)
{
$arg = $argv[$a];
if($arg=="--" || $arg=="-")
continue;
if(($p = strpos($arg, "=")) === false)
{
parse_arg($arg, $argt, $err, $printerrors);
}
else
{
parse_arg(substr($arg, 0, $p), $argt, $err, $printerrors);
parse_arg("=", $argt, $err, $printerrors);
parse_arg(substr($arg, $p+1), $argt, $err, $printerrors);
}
}
foreach($argt as $n=>$v)
{
if(!isset($v["values"][0]) && isset($v["default"]))
{
$argt[$n]["set"] = true;
$argt[$n]["values"][] = $v["default"];
}
}
// printf("end parse_cmdargs(..) ! \n");
// var_dump($argt);
return($err == "");
}
function parse_arg($arg, &$argt, &$err, $printerrors)
{
static $last_arg="";
static $curopt = null;
if($arg != "=")
{
if($last_arg != "=")
{
if(isset($argt[$arg]))
$argt[$curopt = $arg]["set"] = true;
elseif($printerrors)
{
$err .= "option '" . $arg . "' inconnue.\n";
// if(isset($argt["--help"]))
// $argt["--help"]["set"] = true;
}
}
else
{
if($curopt)
$argt[$curopt]["values"][] = $arg;
elseif($printerrors)
{
$err .= "'=' doit suivre un nom d'option.\n";
// if(isset($argt["--help"]))
// $argt["--help"]["set"] = true;
}
}
}
$last_arg = $arg;
}
?>

View File

@@ -1,495 +0,0 @@
<?php
require_once dirname(__FILE__) . "/../lib/bootstrap_task.php";
define('TASKDELAYTOQUIT', 20); // allow 20 sec for never-ending tasks before sending SIGKILL
?>
#!/usr/bin/php
<?php
require(GV_RootPath . "lib/getargs.php"); // le parser d'arguments de la ligne de commande
$system = p4utils::getSystem();
if ($system != "DARWIN" && $system != "WINDOWS" && $system != "LINUX")
{
$msg = "Desole, ce programme ne fonctionne pas sous '" . $system;
my_syslog(LOG_ERR, $msg);
die();
}
p4::fullmkdir($lockdir = GV_RootPath . 'tmp/locks/');
// try to lock one instance of the scheduler
for ($try = 0; true; $try++)
{
$schedlock = fopen(($lockfile = ($lockdir . 'scheduler.lock')), 'a+');
if (flock($schedlock, LOCK_EX | LOCK_NB) != true)
{
$msg = sprintf("failed to lock '%s' (try=%s/4)", $lockfile, $try);
my_syslog(LOG_ERR, $msg);
if ($try == 4)
{
$msg = sprintf("scheduler already running.");
my_syslog(LOG_ERR, $msg);
fclose($schedlock);
exit(-1);
}
else
{
sleep(2);
}
}
else
{
ftruncate($schedlock, 0);
fwrite($schedlock, '' . getmypid());
fflush($schedlock);
break;
}
}
function my_syslog($level, $msg)
{
global $argt;
if (!$argt["--noecho"]["set"])
{
$msg = sprintf("%s : %s" . PHP_EOL, date("r"), $msg);
printf("%s", $msg);
}
}
$argt = array(
"--help" => array("set" => false, "values" => array(), "usage" => " : this help"),
"--noecho" => array("set" => false, "values" => array(), "usage" => " : no scheduler console output"),
"--nolog" => array("set" => false, "values" => array(), "usage" => " : no scheduler logfile"),
"--notasklog" => array("set" => false, "values" => array(), "usage" => " : no task logfiles")
);
$logdir = p4string::addEndSlash(GV_RootPath . 'logs');
if (is_dir($logdir))
{
$logdir = p4string::addEndSlash($logdir);
}
else
{
$logdir = null;
}
if (!parse_cmdargs($argt, $err) || $argt["--help"]["set"])
{
print($err);
print_usage($argt);
flush();
die();
}
$conn = new connection('appbox');
my_syslog(LOG_INFO, sprintf("Scheduler2 started on %s, cwd='%s'", $system, getcwd()));
$ttask = array();
$sleeptime = 3; // le sheduler tourne toutes les 3 secondes
$prompt = "PIV Scheduler-2: ";
$help = "Commands :\r\n 'help' : this help\r\n 'shutdown' : stop scheduler2\r\n";
set_time_limit(0);
session_write_close();
ignore_user_abort(true);
$sql = "UPDATE sitepreff SET schedstatus='started', schedpid='" . $conn->escape_string(getmypid()) . "'";
$conn->query($sql);
// flag tasks to start (actives with no lockfile)
$tlist = '';
$sql = "SELECT task_id FROM task2 WHERE active>0";
if ($rs = $conn->query($sql))
{
// on stocke dans un tableau car on va faire des updates et on ne va pas les faire pendant la lecture du rs
while ($row = $conn->fetch_assoc($rs))
{
$tid = $row['task_id'];
// si elle ne tourne pas, on va demander le lancement
if (($fp = fopen($lockdir . 'task_' . $tid . '.lock', 'w')))
{
if (flock($fp, LOCK_EX | LOCK_NB) == true)
{
$tlist .= ( $tlist ? ',' : '') . $tid;
}
fclose($fp);
}
}
$conn->free_result($rs);
}
if ($tlist)
{
$sql = "UPDATE task2 SET crashed=0, status='tostart' WHERE task_id IN(" . $tlist . ")";
$conn->query($sql);
}
$schedstatus = 'started';
$runningtask = 0;
$connwaslost = false;
$last_log_check = array();
while ($schedstatus == 'started' || $runningtask > 0)
{
while (!$conn || !$conn->isok() || !$conn->ping())
{
unset($conn);
if (!$connwaslost)
{
$msg = sprintf(("Warning : abox connection lost, restarting in 10 min."));
my_syslog(LOG_INFO, $msg);
}
sleep(60 * 10);
$conn = new connection('appbox');
$connwaslost = true;
}
if ($connwaslost)
{
$msg = sprintf(("abox connection restored"));
my_syslog(LOG_INFO, $msg);
$sql = 'UPDATE task SET crashed=0';
$conn->query($sql);
$connwaslost = false;
}
$schedstatus = '';
$sql = "SELECT schedstatus FROM sitepreff";
if ($rs = $conn->query($sql))
{
if ($row = $conn->fetch_assoc($rs))
$schedstatus = $row["schedstatus"];
$conn->free_result($rs);
}
if ($schedstatus == 'tostop')
{
$sql = 'UPDATE sitepreff SET schedstatus=\'stopping\'';
$conn->query($sql);
// if scheduler is stopped, stop the tasks
$sql = 'UPDATE task2 SET status=\'tostop\', last_change=NOW() WHERE status!="stopped" and status!="manual"';
$conn->query($sql);
$msg = sprintf("schedstatus == 'stopping', waiting tasks to end");
my_syslog(LOG_INFO, $msg);
}
logs::rotate($logdir . "scheduler.log");
logs::rotate($logdir . "scheduler.error.log");
foreach ($ttask as $tkey => $tv)
{
$ttask[$tkey]["todel"] = true;
}
$sql = "SELECT * FROM task2"; // WHERE active>0 AND crashed<5";
if ($rs = $conn->query($sql))
{
while ($row = $conn->fetch_assoc($rs))
{
$tkey = "t_" . $row["task_id"];
logs::rotate($logdir . "task_$tkey.log");
logs::rotate($logdir . "task_$tkey.error.log");
if (!isset($ttask[$tkey]))
{
$phpcli = GV_cli;
switch ($system)
{
case "DARWIN":
$cmd = $phpcli . ' -f ' . "schedtask.php -- --taskid=" . $row["task_id"];
break;
case "LINUX":
$cmd = $phpcli . ' -f ' . GV_RootPath . "bin/schedtask.php -- --taskid=" . $row["task_id"];
break;
case "WINDOWS":
$cmd = $phpcli . ' -f ' . "schedtask.php -- --taskid=" . $row["task_id"];
break;
}
$ttask[$tkey] = array(
"active" => (int) ($row['active']),
"crashed" => (int) ($row['crashed']),
"status" => $row['status'],
"process" => null,
"tid" => $row["task_id"],
"cmd" => $cmd,
"killat" => NULL,
// "todel"=>false,
// "descriptors"=>null,
"pipes" => null
);
$msg = sprintf("new Task %s, status=%s", $ttask[$tkey]["tid"], $row['status']);
my_syslog(LOG_INFO, $msg);
}
else
{
// $ttask[$tkey]["todel"] = false;
if ($ttask[$tkey]["status"] != $row['status'])
{
$msg = sprintf("Task %s, oldstatus=%s, newstatus=%s", $ttask[$tkey]["tid"], $ttask[$tkey]["status"], $row['status']);
my_syslog(LOG_INFO, $msg);
$ttask[$tkey]["status"] = $row['status'];
}
$ttask[$tkey]["crashed"] = (int) ($row['crashed']);
$ttask[$tkey]["active"] = $row['active'];
}
$ttask[$tkey]["todel"] = false;
}
$conn->free_result($rs);
}
foreach ($ttask as $tkey => $tv)
{
if ($tv["todel"])
{
$msg = sprintf("Task %s deleted", $ttask[$tkey]["tid"]);
my_syslog(LOG_INFO, $msg);
unset($ttask[$tkey]);
}
if ($ttask[$tkey]["crashed"] >= 5)
{
$ttask[$tkey]["active"] = 0;
}
}
// on lance les t<>ches qui n'ont pas encore de process (inserted ou activ<69>es)
// $taskcrashed = array();
$runningtask = 0;
foreach ($ttask as $tkey => $tv)
{
switch ($ttask[$tkey]['status'])
{
case 'torestart':
@fclose($ttask[$tkey]["pipes"][1]);
@fclose($ttask[$tkey]["pipes"][2]);
@proc_close($ttask[$tkey]["process"]);
$ttask[$tkey]["process"] = null;
if($schedstatus == 'started')
{
$sql = 'UPDATE task2 SET status=\'tostart\', last_change=NOW() WHERE task_id="' . $conn->escape_string($ttask[$tkey]["tid"]) . '"';
$conn->query($sql);
}
break;
case 'tostart':
$ttask[$tkey]["killat"] = NULL;
if ($schedstatus == 'started' && !$ttask[$tkey]["process"])
{
// on lui adjoint des descriptors stdio
$descriptors = array(1 => array("pipe", "w"), 2 => array("pipe", "w"));
if ((!$argt["--notasklog"]["set"]) && $logdir)
{
$descriptors[1] = array("file", $logdir . "task_$tkey.log", "a+");
$descriptors[2] = array("file", $logdir . "task_$tkey.error.log", "a+");
}
$cmd = $ttask[$tkey]["cmd"];
// $pipes = array();
$ttask[$tkey]["process"] = proc_open($cmd, $descriptors, $ttask[$tkey]["pipes"], GV_RootPath . "bin/", null, array('bypass_shell' => true));
// $ttask[$tkey]["pipes"] = $pipes;
$ttask[$tkey]['pid'] = NULL;
if (is_resource($ttask[$tkey]["process"]))
{
//$msg = sprintf("PROC2: '%s', %s", $cmd, print_r($ttask[$tkey]["process"], true));
//my_syslog(LOG_INFO, $msg);
$proc_status = proc_get_status($ttask[$tkey]["process"]);
if ($proc_status['running'])
$ttask[$tkey]['pid'] = $proc_status['pid'];
}
if ($ttask[$tkey]['pid'] !== NULL)
{
$sql = 'UPDATE task2 SET status=\'started\', last_change=NOW() WHERE task_id="' . $conn->escape_string($ttask[$tkey]['tid']) . '"';
$conn->query($sql);
$msg = sprintf("Task %s '%s' started (pid=%s)", $ttask[$tkey]["tid"], $cmd, $ttask[$tkey]['pid']);
my_syslog(LOG_INFO, $msg);
$runningtask++;
}
else
{
$ttask[$tkey]["crashed"]++;
@fclose($ttask[$tkey]["pipes"][1]);
@fclose($ttask[$tkey]["pipes"][2]);
@proc_close($ttask[$tkey]["process"]);
$ttask[$tkey]["process"] = null;
$msg = sprintf("Task %s '%s' failed to start %d times", $ttask[$tkey]["tid"], $cmd, $ttask[$tkey]["crashed"]);
my_syslog(LOG_INFO, $msg);
if ($ttask[$tkey]["crashed"] >= 5)
$sql = "UPDATE task2 SET status='stopped', last_change=NOW(), pid=0, crashed=crashed+1 WHERE task_id='" . $conn->escape_string($ttask[$tkey]['tid']) . "'";
else
$sql = "UPDATE task2 SET status='tostart', last_change=NOW(), pid=0, crashed=crashed+1 WHERE task_id='" . $conn->escape_string($ttask[$tkey]['tid']) . "'";
$conn->query($sql);
}
}
else
{
}
break;
case 'started':
$crashed = false;
if ($ttask[$tkey]["process"]) // if no process, probably ran by hand (runtask), so don't worry
{
$ttask[$tkey]["killat"] = NULL;
if (is_resource($ttask[$tkey]["process"]))
{
$proc_status = proc_get_status($ttask[$tkey]["process"]);
if ($proc_status['running'])
$runningtask++;
else
$crashed = true;
}
else
{
$crashed = true;
}
}
if($crashed)
{
//on verifie que c'est pas passé a restart en attendant
$sql = "SELECT status FROM task2 WHERE task_id='".$conn->escape_string($ttask[$tkey]['tid'])."'";
if($rs = $conn->query($sql))
{
if($row = $conn->fetch_assoc($rs))
{
if($row['status'] == 'torestart')
$crashed = false;
}
$conn->free_result($rs);
}
}
if ($crashed)
{
$ttask[$tkey]["crashed"]++;
@fclose($ttask[$tkey]["pipes"][1]);
@fclose($ttask[$tkey]["pipes"][2]);
@proc_close($ttask[$tkey]["process"]);
$ttask[$tkey]["process"] = null;
$msg = sprintf("Task %s crashed %d times", $ttask[$tkey]["tid"], $ttask[$tkey]["crashed"]);
my_syslog(LOG_INFO, $msg);
if ($ttask[$tkey]["crashed"] >= 5)
$sql = "UPDATE task2 SET status='stopped', last_change=NOW(), pid=0, crashed=crashed+1 WHERE task_id='" . $conn->escape_string($ttask[$tkey]['tid']) . "'";
else
$sql = "UPDATE task2 SET status='tostart', last_change=NOW(), pid=0, crashed=crashed+1 WHERE task_id='" . $conn->escape_string($ttask[$tkey]['tid']) . "'";
$conn->query($sql);
}
break;
case 'tostop':
if ($ttask[$tkey]["process"]) // if no process (ran by 'runtask' ?)... can't kill...
{
if ($ttask[$tkey]["killat"] === NULL)
$ttask[$tkey]["killat"] = time() + TASKDELAYTOQUIT;
if (($dt = $ttask[$tkey]["killat"] - time()) < 0)
{
// task is still alive after delay so kill it
$ppid = $ttask[$tkey]['pid'];
my_syslog(LOG_INFO, "killing children of pid=$ppid");
$pids = preg_split('/\s+/', `ps -o pid --no-heading --ppid $ppid`);
foreach ($pids as $pid)
{
if (is_numeric($pid))
{
$msg = "Killing pid=$pid";
posix_kill($pid, 9); //9 is the SIGKILL signal
my_syslog(LOG_INFO, $msg);
}
}
$msg = sprintf("SIGKILL sent to task %s (pid=%s)", $ttask[$tkey]["tid"], $ttask[$tkey]['pid']);
my_syslog(LOG_INFO, $msg);
proc_terminate($ttask[$tkey]["process"], 9);
@fclose($ttask[$tkey]["pipes"][1]);
@fclose($ttask[$tkey]["pipes"][2]);
proc_close($ttask[$tkey]["process"]);
unlink($lockdir . 'task_' . $ttask[$tkey]['tid'] . '.lock');
$sql = "UPDATE task2 SET status='stopped', pid=0, crashed=crashed+1 WHERE task_id='" . $conn->escape_string($ttask[$tkey]['tid']) . "'";
$conn->query($sql);
$ttask[$tkey]['pid'] = NULL;
}
else
{
$msg = sprintf("waiting task %s to quit (kill in %d seconds)", $ttask[$tkey]["tid"], $dt);
my_syslog(LOG_INFO, $msg);
$runningtask++;
}
}
break;
case 'stopped':
case 'todelete':
if ($ttask[$tkey]["process"])
{
@fclose($ttask[$tkey]["pipes"][1]);
@fclose($ttask[$tkey]["pipes"][2]);
@proc_close($ttask[$tkey]["process"]);
$ttask[$tkey]["process"] = null;
}
}
}
// $msg = sprintf("runningtask = %d", $runningtask);
// my_syslog(LOG_INFO, $msg);
$to_reopen = false;
if ($conn && $conn->isok() && $conn->ping())
{
$conn->close();
unset($conn);
$to_reopen = true;
}
sleep($sleeptime);
if ($to_reopen)
{
$conn = new connection('appbox');
}
}
$sql = "UPDATE sitepreff SET schedstatus='stopped', schedpid='0'";
$conn->query($sql);
// ============================================================================
// on quitte le scheduler
$msg = "Scheduler2 is quitting.";
my_syslog(LOG_INFO, $msg);
ftruncate($schedlock, 0);
fclose($schedlock);
/*
if($sock)
socket_close($sock);
$sock = NULL;
*/
$msg = "Scheduler2 has quit.\n";
my_syslog(LOG_INFO, $msg);
?>

View File

@@ -1,930 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.165250100">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.165250100" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="php_phrasea2" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.165250100" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.165250100." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.12699079" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.531380949" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
<builder buildPath="${workspace_loc:/php_phrasea2/Debug}" command="make" id="cdt.managedbuild.target.gnu.builder.exe.debug.1025439536" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1004887437" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1895903694" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.230449463" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.1040747629" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.4005438" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1804526417" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1562658356" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.debug.option.debugging.level.2101062724" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1986057191" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.757833240" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.537818181" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1440508094" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1075241667" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1345157132" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.240959347;cdt.managedbuild.config.gnu.exe.release.240959347.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1624780267;cdt.managedbuild.tool.gnu.cpp.compiler.input.1598634639">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.165250100;cdt.managedbuild.config.gnu.exe.debug.165250100.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1895903694;cdt.managedbuild.tool.gnu.cpp.compiler.input.4005438">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.165250100;cdt.managedbuild.config.gnu.exe.debug.165250100.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1804526417;cdt.managedbuild.tool.gnu.c.compiler.input.1986057191">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.240959347;cdt.managedbuild.config.gnu.exe.release.240959347.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.2126500899;cdt.managedbuild.tool.gnu.c.compiler.input.1196857699">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.240959347">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.240959347" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="php_phrasea2" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.240959347" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.240959347." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.70315111" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1247988923" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
<builder buildPath="${workspace_loc:/php_phrasea2/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.681445162" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1025573831" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1624780267" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1063891696" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.715354819" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1598634639" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.2126500899" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.971772884" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.181036420" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1196857699" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1776431" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.1506257190" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.496725209" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.1917506290" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.355537992" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.240959347;cdt.managedbuild.config.gnu.exe.release.240959347.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.1624780267;cdt.managedbuild.tool.gnu.cpp.compiler.input.1598634639">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.165250100;cdt.managedbuild.config.gnu.exe.debug.165250100.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.1895903694;cdt.managedbuild.tool.gnu.cpp.compiler.input.4005438">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.165250100;cdt.managedbuild.config.gnu.exe.debug.165250100.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.1804526417;cdt.managedbuild.tool.gnu.c.compiler.input.1986057191">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.240959347;cdt.managedbuild.config.gnu.exe.release.240959347.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.2126500899;cdt.managedbuild.tool.gnu.c.compiler.input.1196857699">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="php_phrasea2.cdt.managedbuild.target.gnu.exe.1502188957" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
</storageModule>
</cproject>

View File

@@ -1,82 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>php_phrasea2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/php_phrasea2/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>false</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@@ -1 +0,0 @@
phrasea2

View File

@@ -1,123 +0,0 @@
mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
INSTALL = $(top_srcdir)/build/shtool install -c
INSTALL_DATA = $(INSTALL) -m 644
DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
all: $(all_targets)
@echo
@echo "Build complete."
@echo "Don't forget to run 'make test'."
@echo
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
-@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1
libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so
install: $(all_targets) $(install_targets)
install-sapi: $(OVERALL_TARGET)
@echo "Installing PHP SAPI module: $(PHP_SAPI)"
-@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
-@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \
for i in 0.0.0 0.0 0; do \
if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \
$(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \
break; \
fi; \
done; \
fi
@$(INSTALL_IT)
install-modules: build-modules
@test -d modules && \
$(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR)
@echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/"
@rm -f modules/*.la >/dev/null 2>&1
@$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR)
install-headers:
-@if test "$(INSTALL_HEADERS)"; then \
for i in `echo $(INSTALL_HEADERS)`; do \
i=`$(top_srcdir)/build/shtool path -d $$i`; \
paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \
done; \
$(mkinstalldirs) $$paths && \
echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \
for i in `echo $(INSTALL_HEADERS)`; do \
if test "$(PHP_PECL_EXTENSION)"; then \
src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \
else \
src=$$i; \
fi; \
if test -f "$(top_srcdir)/$$src"; then \
$(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
elif test -f "$(top_builddir)/$$src"; then \
$(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \
else \
(cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \
cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \
fi \
done; \
fi
PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1'
PHP_TEST_SHARED_EXTENSIONS = ` \
if test "x$(PHP_MODULES)" != "x"; then \
for i in $(PHP_MODULES)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
done; \
fi; \
if test "x$(PHP_ZEND_EX)" != "x"; then \
for i in $(PHP_ZEND_EX)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
done; \
fi`
test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
INI_SCANNED_PATH=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
clean:
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
find . -name Makefile | xargs rm -f
.PHONY: all clean install distclean test
.NOEXPORT:

View File

@@ -1,4 +0,0 @@
/*
L'heure actuelle est<73>: 16:58:23,12
Entrez la nouvelle heure<72>:
*/

View File

@@ -1,25 +0,0 @@
//======================== _WIN32 (visual C++ 2008) : ===================
//
// le numero de version est defini dans l'onglet
// 'gestionnaire de proprietes' / 'custom props' / 'macros utilisateur'
//
// ATTENTION : en cas de changement de version, forcer la recompilation
// de phrasea2.rc avant de recompiler le projet
//
#define QUOTE(x) _QUOTE(x)
#define _QUOTE(a) #a
//
//=======================================================================
//============= _DEBIAN ; _GENTOO ; _OS-X_10.4_i386 : ==================
//
// le numero de version est defini ici :
//
#ifndef PHDOTVERSION
#define PHDOTVERSION 1.16.5.4
#endif
//
//=======================================================================

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="custom_props"
>
<UserMacro
Name="PHVERSION"
Value="&quot;1,16,5,3&quot;"
PerformEnvironmentSet="true"
/>
<UserMacro
Name="PHDOTVERSION"
Value="&quot;1.16.5.3&quot;"
PerformEnvironmentSet="true"
/>
</VisualStudioPropertySheet>

View File

@@ -1,74 +0,0 @@
// ====== compiler un .rc avec C++ 2008
clic-droit / propri<72>t<EFBFBD>s sur phrasea2.rc dans le projet
resources/g<>n<EFBFBD>ral/autre rep. include :
"C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include";./res
// ====== changer automatiquement le num de version dans le .rc
dans 'gestionnaire de propri<72>t<EFBFBD>s' / 'custom props' / 'macros utilisateur'
clic-droit sur le nom du projet / ajouter une feulle de propri<72>t<EFBFBD>s de projet : nom=customprops
ouvrir customprops, puis dans 'propri<72>t<EFBFBD>c communes' / 'macros utilisateurs', ajouter
PHVERSION = x,y,z,t
PDOTVERSION = x.y.z.t
dans 'propri<72>t<EFBFBD>s du projet' (alt+F7) / 'propri<72>t<EFBFBD>s de configuration'
dans 'c/c++' / 'd<>finitions du pr<70>processeur' : ajouter
PHVERSION=$(PHVERSION)
PHDOTVERSION=$(PHDOTVERSION)
dans 'ressources' / 'd<>finitions du pr<70>processeur' : ajouter
PHVERSION=$(PHVERSION)
PHDOTVERSION=$(PHDOTVERSION)
dans _version.h :
//======================== _WIN32 (visual C++ 2008) : ===================
//
// le num<75>ro de version est d<>fini dans l'onglet
// 'gestionnaire de propri<72>t<EFBFBD>s' / 'custom props' / 'macros utilisateur'
//
// ATTENTION : en cas de changement de version, forcer la recompilation
// de phrasea2.rc avant de recompiler le projet
//
#define QUOTE(x) _QUOTE(x)
#define _QUOTE(a) #a
//
//=======================================================================
//============= _DEBIAN ; _GENTOO ; _OS-X_10.4_i386 : ==================
//
// le num<75>ro de version est d<>fini ici :
//
#ifndef PHDOTVERSION
#define PHDOTVERSION x.y.z.t
#endif
//
//=======================================================================
dans le .rc (<28>diter comme text)
#include "..\..\src\_version.h"
....
FILEVERSION PHVERSION // PHVERSION : d<>fini dans macro utilisateurs
PRODUCTVERSION PHVERSION // PHVERSION : d<>fini dans macro utilisateurs
....
VALUE "FileVersion", QUOTE(PHDOTVERSION) // PHDOTVERSION : d<>fini dans macro utilisateurs
....
VALUE "ProductVersion", QUOTE(PHDOTVERSION) // PHDOTVERSION : d<>fini dans macro utilisateurs
....
// ======= changer le nom du fichier g<>n<EFBFBD>r<EFBFBD> en fonction de la version
dans 'propri<72>t<EFBFBD>s du projet' / '<27>diteur de liens' / 'g<>n<EFBFBD>ral' / 'fichier de sortie'
.\$(OutDir)/php_phrasea2_UTF-8_$(PHDOTVERSION).dll

View File

@@ -1,23 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "phrasea2", "phrasea2.vcproj", "{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release_TS_UTF-8|Win32 = Release_TS_UTF-8|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}.Debug|Win32.ActiveCfg = Release_TS_UTF-8|Win32
{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}.Debug|Win32.Build.0 = Release_TS_UTF-8|Win32
{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}.Release_TS_UTF-8|Win32.ActiveCfg = Release_TS_UTF-8|Win32
{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}.Release_TS_UTF-8|Win32.Build.0 = Release_TS_UTF-8|Win32
{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}.Release|Win32.ActiveCfg = Release_TS_UTF-8|Win32
{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}.Release|Win32.Build.0 = Release_TS_UTF-8|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,403 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="phrasea2"
ProjectGUID="{8EFB3641-2E3F-4E6E-A0BD-BD04537AC633}"
RootNamespace="phrasea2"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release_TS|Win32"
OutputDirectory=".\Release_TS"
IntermediateDirectory=".\Release_TS"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;.\custom_props.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release_TS/phrasea2.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="&quot;C:\php-5.2.13&quot;;&quot;C:\php-5.2.13\main&quot;;&quot;C:\php-5.2.13\Zend&quot;;&quot;C:\php-5.2.13\TSRM&quot;;C:\mysql\include"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;TRACE_ERAM=0;_USE_32BIT_TIME_T;ZEND_DEBUG=0;ZTS;PHRASEA2_EXPORTS;COMPILE_DL_PHRASEA2;HAVE_PHRSEA2=1;WIN32;_WINDOWS;_USRDLL;ZEND_WIN32;PHP_WIN32;PHVERSION=$(PHVERSION);PHDOTVERSION=$(PHDOTVERSION)"
IgnoreStandardIncludePath="false"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\$(OutDir)/phrasea2.pch"
AssemblerListingLocation=".\$(OutDir)/"
ObjectFile=".\$(OutDir)/"
ProgramDataBaseFileName=".\$(OutDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="0"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libmySQL.lib php5ts.lib"
ShowProgress="0"
OutputFile=".\$(OutDir)/php_phrasea2_$(PHDOTVERSION).dll"
Version="$(PHDOTVERSION)"
LinkIncremental="1"
AdditionalLibraryDirectories="c:\mysql\lib\opt,C:\php\dev"
ProgramDatabaseFile="$(OutDir)/php_mysql.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\$(OutDir)/php_phrasea2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\$(OutDir)/phrasea2.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="copy de la dll dans php"
CommandLine="copy $(OutDir)\$(TargetFileName) c:\php\ext\$(TargetFileName)&#x0D;&#x0A;copy $(OutDir)\$(TargetFileName) c:\php\ext\php_phrasea2.dll&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
Name="Release_TS_UTF-8|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;.\custom_props.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
ExcludedFromBuild="false"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release_TS/phrasea2.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="&quot;C:\php-5.2.13&quot;;&quot;C:\php-5.2.13\main&quot;;&quot;C:\php-5.2.13\Zend&quot;;&quot;C:\php-5.2.13\TSRM&quot;;C:\mysql\include"
PreprocessorDefinitions="_CRT_SECURE_NO_WARNINGS;TRACE_ERAM=0;_USE_32BIT_TIME_T;ZEND_DEBUG=0;ZTS;PHRASEA2_EXPORTS;COMPILE_DL_PHRASEA2;HAVE_PHRSEA2=1;WIN32;_WINDOWS;_USRDLL;ZEND_WIN32;PHP_WIN32;PHVERSION=$(PHVERSION);PHDOTVERSION=$(PHDOTVERSION);MYSQLENCODE=utf8;noPHP_COMPILER_ID=&quot;,VC6&quot;"
IgnoreStandardIncludePath="false"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\$(OutDir)/phrasea2.pch"
AssemblerListingLocation=".\$(OutDir)/"
ObjectFile=".\$(OutDir)/"
ProgramDataBaseFileName=".\$(OutDir)/"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="0"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libmySQL.lib php5ts.lib"
ShowProgress="0"
OutputFile=".\$(OutDir)/php_phrasea2_UTF-8_$(PHDOTVERSION).dll"
Version="$(PHDOTVERSION)"
LinkIncremental="1"
AdditionalLibraryDirectories="c:\mysql\lib\opt;&quot;C:\php-5.3.3-Win32-VC6-x86\dev&quot;"
IgnoreAllDefaultLibraries="false"
ProgramDatabaseFile="$(OutDir)/php_mysql.pdb"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
ImportLibrary=".\$(OutDir)/php_phrasea2.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\$(OutDir)/phrasea2.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
Description="copy de la dll dans php"
CommandLine="copy $(OutDir)\$(TargetFileName) c:\php\ext\$(TargetFileName)&#x0D;&#x0A;copy $(OutDir)\$(TargetFileName) c:\php\ext\php_phrasea2.dll&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\phrasea2.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\_TIME.h"
>
</File>
<File
RelativePath="..\_VERSION.h"
>
</File>
<File
RelativePath="..\php_phrasea2.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath=".\important pour resources (.rc).txt"
>
</File>
<File
RelativePath="..\php_phrasea2\phrasea2.rc"
>
<FileConfiguration
Name="Release_TS|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;PHVERSION=$(PHVERSION);PHDOTVERSION=$(PHDOTVERSION)"
Culture="0"
AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include&quot;;./res"
ShowProgress="true"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_TS_UTF-8|Win32"
>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG;PHVERSION=$(PHVERSION);PHDOTVERSION=$(PHDOTVERSION)"
Culture="0"
AdditionalIncludeDirectories="&quot;C:\Program Files\Microsoft Visual Studio\VC98\MFC\Include&quot;;./res"
ShowProgress="true"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\php_phrasea2\resource.h"
>
</File>
</Filter>
<Filter
Name="phrasea_engine"
>
<File
RelativePath="..\phrasea_engine\base_header.h"
>
</File>
<File
RelativePath="..\phrasea_engine\cache.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\cache.h"
>
</File>
<File
RelativePath="..\phrasea_engine\emptyw.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\fetchresults.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\grouping.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\phrasea_clock_t.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\phrasea_clock_t.h"
>
</File>
<File
RelativePath="..\phrasea_engine\phrasea_engine.h"
>
</File>
<File
RelativePath="..\phrasea_engine\phrasea_types.h"
>
</File>
<File
RelativePath="..\phrasea_engine\phrasea_utils_win.h"
>
</File>
<File
RelativePath="..\phrasea_engine\qtree.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\query.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\session.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\sql.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\sql.h"
>
</File>
<File
RelativePath="..\phrasea_engine\subdefs.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\trace_memory.cpp"
>
<FileConfiguration
Name="Release_TS_UTF-8|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\phrasea_engine\trace_memory.h"
>
<FileConfiguration
Name="Release_TS_UTF-8|Win32"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\phrasea_engine\utils.cpp"
>
</File>
<File
RelativePath="..\phrasea_engine\xmlcaption.cpp"
>
</File>
</Filter>
<Filter
Name="libs"
>
</Filter>
<File
RelativePath="..\changelog.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,65 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9,00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Release_TS|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="PCJY"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release_TS_UTF-8|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="PCJY"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@@ -1,65 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioUserFile
ProjectType="Visual C++"
Version="9,00"
ShowAllFiles="false"
>
<Configurations>
<Configuration
Name="Release_TS|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="VIRTUAL-PCJY"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
<Configuration
Name="Release_TS_UTF-8|Win32"
>
<DebugSettings
Command=""
WorkingDirectory=""
CommandArguments=""
Attach="false"
DebuggerType="3"
Remote="1"
RemoteMachine="VIRTUAL-PCJY"
RemoteCommand=""
HttpUrl=""
PDBPath=""
SQLDebugging=""
Environment=""
EnvironmentMerge="true"
DebuggerFlavor=""
MPIRunCommand=""
MPIRunArguments=""
MPIRunWorkingDirectory=""
ApplicationCommand=""
ApplicationArguments=""
ShimCommand=""
MPIAcceptMode=""
MPIAcceptFilter=""
/>
</Configuration>
</Configurations>
</VisualStudioUserFile>

View File

@@ -1,9 +0,0 @@
linux :
./configure
make
make test
sudo make install
nb :
DON'T do 'phpize' before configure !
make test MAY FAIL, even if the builded extension is ok after install

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,368 +0,0 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltoptions.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
# ------------------------------------------
m4_define([_LT_MANGLE_OPTION],
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
# ---------------------------------------
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
# saved as a flag.
m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
])
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
# ------------------------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
m4_define([_LT_IF_OPTION],
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
# -------------------------------------------------------
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
# are set.
m4_define([_LT_UNLESS_OPTIONS],
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
[m4_define([$0_found])])])[]dnl
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
])[]dnl
])
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
# ----------------------------------------
# OPTION-LIST is a space-separated list of Libtool options associated
# with MACRO-NAME. If any OPTION has a matching handler declared with
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
# the unknown option and exit.
m4_defun([_LT_SET_OPTIONS],
[# Set options
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
[_LT_SET_OPTION([$1], _LT_Option)])
m4_if([$1],[LT_INIT],[
dnl
dnl Simply set some default values (i.e off) if boolean options were not
dnl specified:
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
])
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
])
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
])
])# _LT_SET_OPTIONS
## --------------------------------- ##
## Macros to handle LT_INIT options. ##
## --------------------------------- ##
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
# -----------------------------------------
m4_define([_LT_MANGLE_DEFUN],
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
# -----------------------------------------------
m4_define([LT_OPTION_DEFINE],
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
])# LT_OPTION_DEFINE
# dlopen
# ------
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
])
AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
# win32-dll
# ---------
# Declare package support for building win32 dll's.
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
[enable_win32_dll=yes
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
AC_CHECK_TOOL(AS, as, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(OBJDUMP, objdump, false)
;;
esac
test -z "$AS" && AS=as
_LT_DECL([], [AS], [0], [Assembler program])dnl
test -z "$DLLTOOL" && DLLTOOL=dlltool
_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
test -z "$OBJDUMP" && OBJDUMP=objdump
_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
])# win32-dll
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
_LT_DECL([build_libtool_libs], [enable_shared], [0],
[Whether or not to build shared libraries])
])# _LT_ENABLE_SHARED
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
# Old names:
AC_DEFUN([AC_ENABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
])
AC_DEFUN([AC_DISABLE_SHARED],
[_LT_SET_OPTION([LT_INIT], [disable-shared])
])
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
_LT_DECL([build_old_libs], [enable_static], [0],
[Whether or not to build static libraries])
])# _LT_ENABLE_STATIC
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
# Old names:
AC_DEFUN([AC_ENABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
])
AC_DEFUN([AC_DISABLE_STATIC],
[_LT_SET_OPTION([LT_INIT], [disable-static])
])
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
_LT_DECL([fast_install], [enable_fast_install], [0],
[Whether or not to optimize for fast installation])dnl
])# _LT_ENABLE_FAST_INSTALL
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
# Old names:
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
])
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
# Old name:
AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
])
dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
## ----------------- ##
## LTDL_INIT Options ##
## ----------------- ##
m4_define([_LTDL_MODE], [])
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
[m4_define([_LTDL_MODE], [nonrecursive])])
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
[m4_define([_LTDL_MODE], [recursive])])
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
[m4_define([_LTDL_MODE], [subproject])])
m4_define([_LTDL_TYPE], [])
LT_OPTION_DEFINE([LTDL_INIT], [installable],
[m4_define([_LTDL_TYPE], [installable])])
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
[m4_define([_LTDL_TYPE], [convenience])])

View File

@@ -1,123 +0,0 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 6 ltsugar.m4
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
# lt_join(SEP, ARG1, [ARG2...])
# -----------------------------
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
# associated separator.
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
# versions in m4sugar had bugs.
m4_define([lt_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
m4_define([_lt_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
# lt_car(LIST)
# lt_cdr(LIST)
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
m4_define([lt_unquote], $1)
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
# than defined and empty).
#
# This macro is needed until we can rely on Autoconf 2.62, since earlier
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
m4_define([lt_append],
[m4_define([$1],
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
# ----------------------------------------------------------
# Produce a SEP delimited list of all paired combinations of elements of
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
# has the form PREFIXmINFIXSUFFIXn.
# Needed until we can rely on m4_combine added in Autoconf 2.62.
m4_define([lt_combine],
[m4_if(m4_eval([$# > 3]), [1],
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
[[m4_foreach([_Lt_prefix], [$2],
[m4_foreach([_Lt_suffix],
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
# -----------------------------------------------------------------------
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
m4_define([lt_if_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
[lt_append([$1], [$2], [$3])$4],
[$5])],
[lt_append([$1], [$2], [$3])$4])])
# lt_dict_add(DICT, KEY, VALUE)
# -----------------------------
m4_define([lt_dict_add],
[m4_define([$1($2)], [$3])])
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
# --------------------------------------------
m4_define([lt_dict_add_subkey],
[m4_define([$1($2:$3)], [$4])])
# lt_dict_fetch(DICT, KEY, [SUBKEY])
# ----------------------------------
m4_define([lt_dict_fetch],
[m4_ifval([$3],
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
# -----------------------------------------------------------------
m4_define([lt_if_dict_fetch],
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
[$5],
[$6])])
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
# --------------------------------------------------------------
m4_define([lt_dict_filter],
[m4_if([$5], [], [],
[lt_join(m4_quote(m4_default([$4], [[, ]])),
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
])

View File

@@ -1,23 +0,0 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# Generated from ltversion.in.
# serial 3012 ltversion.m4
# This file is part of GNU Libtool
m4_define([LT_PACKAGE_VERSION], [2.2.6])
m4_define([LT_PACKAGE_REVISION], [1.3012])
AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.2.6'
macro_revision='1.3012'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])

View File

@@ -1,92 +0,0 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# serial 4 lt~obsolete.m4
# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
# using a macro with the same name in our local m4/libtool.m4 it'll
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
# and doesn't know about Autoconf macros at all.)
#
# So we provide this file, which has a silly filename so it's always
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
# we give up compatibility with versions before 1.7, at which point
# we need to keep only those names which we still refer to.
# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])

View File

@@ -1,75 +0,0 @@
# +----------------------------------------------------------------------+
# | PHP Version 5 |
# +----------------------------------------------------------------------+
# | Copyright (c) 2000-2006 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.01 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
# | available through the world-wide-web at the following url: |
# | http://www.php.net/license/3_01.txt |
# | If you did not receive a copy of the PHP license and are unable to |
# | obtain it through the world-wide-web, please send a note to |
# | license@php.net so we can mail you a copy immediately. |
# +----------------------------------------------------------------------+
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
# $Id: mkdep.awk,v 1.8.2.1 2006/01/01 12:50:00 sniper Exp $
#
# Usage:
#
# echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \
# awk -f mkdep.awk > dependencies
{
top_srcdir=$1
top_builddir=$2
srcdir=$3
cmd=$4
for (i = 5; i <= NF; i++) {
if (match($i, "^-[A-Z]") == 0)
break;
cmd=cmd " " $i
}
dif=i-1
for (; i <= NF; i++)
filenames[i-dif]=$i
no_files=NF-dif
for(i = 1; i <= no_files; i++) {
if (system("test -r " filenames[i]) != 0)
continue
target=filenames[i]
sub(srcdir "/", "", target)
target2=target
sub("\.(c|cpp)$", ".lo", target);
sub("\.(c|cpp)$", ".slo", target2);
for (e in used)
delete used[e]
cmdx=cmd " " filenames[i]
done=0
while ((cmdx | getline) > 0) {
if (match($0, "^# [0-9]* \".*\.h\"") != 0) {
if (sub(top_srcdir, "$(top_srcdir)", $3) == 0)
sub(top_builddir, "$(top_builddir)", $3)
if (substr($3,2,1) != "/" && used[$3] != 1) {
if (done == 0)
printf(target " " target2 ":")
done=1
printf(" \\\n\t" substr($3,2,length($3)-2))
used[$3] = 1;
}
}
}
if (done == 1)
print "\n"
}
}

View File

@@ -1,32 +0,0 @@
BEGIN {
mode=0
sources=""
}
mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ {
if (match($0, "[^=]*$")) {
sources=substr($0, RSTART, RLENGTH-1)
}
mode=1
next
}
mode == 0 && /^LTLIBRARY_SOURCES.*/ {
if (match($0, "[^=]*$")) {
sources=substr($0, RSTART, RLENGTH)
}
}
mode == 1 && /.*\\$/ {
sources=sources substr($0, 0, length - 1)
next
}
mode == 1 {
sources=sources $0
mode=0
}
END {
print sources
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,153 +0,0 @@
1.16.5.4
Improvement : uuid functions
1.16.5.3
fix : crash on win32/multibases
cause : ftell returns 0 after fopen("x", "ab"), even if the file is not empty
1.16.5.2
fix : order of answers was sometimes 'random'
1.16.5.1
fix : searching of duplicates search only on selected collections, respecting status bits
(no duplicates found in another collection or on hidden doc)
change : duplicates are search ACROSS selected collections
1.16.5.0
fix memory error in 1.16.4.1
new function : phrasea_info()
1.16.4.1
fixed for win32 : system temp dir used for cache
1.16.4.0
added special query "sha256=sha256" to find duplicates
1.16.3.0
restore compile under windows
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1.16.2.1
fixed : queries (thumbnail=0, preview=1 etc...) were broken
1.16.2.0
added 'recordtype' pseudo-field (matched against the record.type field)
1.16.1.0
standard build process under linux (ubuntu ok):
./configure ; make ; make test ; make install
beware : relocation of files
BEWARE !!! :
no more build w32/mac from now
the filename is always 'phrasea2.so' (no more version number included)
TODO :
restore build under other os...
FROM HERE, WIN32 & OSX build is (temporaly) disabled
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1.16.0.1
multi-sites ok (cache filenames have host+port+dbname from l'appbox, + session_id)
TODO :
how to change the cache dir (/tmp is hardcoded)
1.16.0.0
writing cache in /tmp (not in sql anymore)
adding chronos
BEWARE :
changing return of phrasea_fetch_results(...) :
before : array of results
now : assoc array, results in $ret['results']
TODO :
how to change the cache dir (/tmp is hardcoded)
enable multi-sites (now conflicting filenames in cache dir)
1.15.0.3
adding chronos in sql requests
1.15.0.2
remove(again) "order by coll_id" : results are returned with no regards of collections
side effect : "last 12" returns last 12 documents in the base (not the last 12 of each collection on the base) : much faster
1.15.0.1
restore "order by coll_id" (else bug AND/OR...)
TODO : how to return results ordered by coll_id
1.15.0.0
changing structure of table pref (dbbox)
1.14.12.2
correcting bug "canary mismatch"
enhancement of the UBUNTU compile script :
removing "warning: deprecated conversion from string constant to 'char*'" (gcc option -Wno-write-strings)
1.14.12.1
save session(...) in prepared stmt
removing posgresql code
cleaning
1.14.12.0
can run as module.
phrasea_conn MUST receive those parms from appbox :
host, port, user, password, dbname
those parms are not anymore in php.ini, so phpinfo() DOES NO CHECK CONNECTION ANYMORE
1.14.11.0
remove thesaurus from session/bases
add the 'sha256' field into return of phrasea_subdefs(...)
1.14.10.0
change in parms of function 'phrasea_query2' : bas_id replaced by sbas_id
1.14.9.1
correcting crash in function "phrasea_grpforselection(...)"
1.14.9.0
results are returned folowing the order set in table collusr
the field 'ord' of table 'collusr' MUST be numbered from 1 to n
1.14.8.2
restore version number into resources of windows version (lost in previous commit)
1.14.8.1
display version number and sql encoding in phpinfo()
1.14.8.0
cleaning
1.14.7.0
add user_id in sessions
-> new php fct : 'php_create_session(...)'
1.14.6.3
mysql connection in compressed mode

View File

@@ -1,117 +0,0 @@
#!/bin/sh
# ---------------- VARIABLES A CONFIGURER --------------
PHP5="/usr"
mysql="/usr/include/mysql"
libMysql="/usr/lib/mysql"
apache_module="/usr/lib/apache2/modules"
extensiondir="/usr/lib/php5/20060613+lfs"
# ------------ FIN DES VARIABLES A CONFIGURER -----------
phpinclude="$PHP5/include/php5"
main="$phpinclude/main"
Zend="$phpinclude/Zend"
TSRM="$phpinclude/TSRM"
regex="$phpinclude/regex"
version=`cat ./_VERSION.h | egrep -e "#define[[:blank:]]*PHDOTVERSION" | tr -d '\r' | sed -e "s/#define[[:blank:]]*PHDOTVERSION[[:blank:]]*\(.*\)[[:space:]]*$/\1/"`
outfile=php_phrasea2-utf8_`echo $version`.so
echo
echo ================================================
echo version : $version
echo outfile : $outfile
echo ================================================
curdir=`pwd`
listofiles=""
rm -R out
mkdir out
echo
echo "=========== Compilation des sources dans ../phrasea_engine ..."
cd ./phrasea_engine
for file in *.cpp
do
basefile=`echo $file | cut -f1 -d "."`
listofiles=`echo $listofiles out/$basefile.o`
if [ -e ${basefile}.cpp ]; then
echo "Compilation du fichier [ $file ]"
cmd="g++ -Wno-write-strings -fPIC -DCOMPILE_DL_PHRASEA2=1 -DMYSQLENCODE=utf8 -c -o $curdir/out/$basefile.o -x c++ $basefile.cpp -I/usr/include/ -I${phpinclude} -I${main} -I${Zend} -I${TSRM} -I${regex} -I${mysql}"
#echo $cmd
`$cmd`
fi
done
#echo $listofile
#exit
echo
echo "=========== Compilation des sources dans ../php_phrasea2 ..."
cd ..
for file in *.cpp
do
basefile=`echo $file | cut -f1 -d "."`
listofiles=`echo $listofiles out/$basefile.o`
if [ -e ${basefile}.cpp ]; then
echo "Compilation du fichier [ $file ]"
cmd="g++ -Wno-write-strings -fPIC -DCOMPILE_DL_PHRASEA2=1 -DMYSQLENCODE=utf8 -c -o $curdir/out/$basefile.o -x c++ $basefile.cpp -I/usr/include/ -I${phpinclude} -I${main} -I${Zend} -I${TSRM} -I${regex} -I${mysql}"
#cmd="g++ -DCOMPILE_DL_PHRASEA2 -I. -I/home/gaulier/src/phrasea2 -DPHP_ATOM_INC -I/home/gaulier/src/phrasea2/include -I/home/gaulier/src/phrasea2/main -I/home/gaulier/src/phrasea2 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/mysql -Wno-write-strings -DHAVE_CONFIG_H -g -O2 -c /home/gaulier/src/phrasea2/phrasea2.cpp -fPIC -DPIC -o .libs/phrasea2.o"
#echo $cmd
`$cmd`
fi
done
cd $curdir
if [ -e out/phrasea2.o ]; then
echo
echo "=========== Edition des liens..."
cmd="g++ -shared -flat_namespace -o ./out/$outfile $listofiles -lmysqlclient -L${libMysql} -L${apache_module}"
cmd="g++ -shared $listofiles -Wl,-soname -Wl,phrasea2.so -o ./out/$outfile -lmysqlclient"
echo $cmd
`$cmd`
if [ -e ./out/$outfile ]; then
chmod 755 ./out/$outfile
echo extension generee dans : $curdir/out/$outfile
# cp $curdir/php.ini $curdir/out/php.ini
# sed s/_EXT_/$outfile/ $curdir/test.php > ./out/test.php
# echo
# echo =========== execution de 'test.php' ===============
# cd out
# $PHP5/bin/php -c ./php.ini -f ./test.php
# cd ..
# echo ===================================================
# echo
# cp ./out/$outfile $extensiondir/phrasea2.utf.so
# cp ./out/$outfile $extensiondir/$outfile
cp ./out/$outfile $extensiondir/phrasea2.so
/etc/init.d/apache2 restart
else
echo
echo "!!!!!!!!!!! Erreur de link"
fi
else
echo
echo "!!!!!!!!!!! Erreur de compilation"
fi

File diff suppressed because it is too large Load Diff

View File

@@ -1,62 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Whether to build phrasea2 as dynamic module */
#undef COMPILE_DL_PHRASEA2
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_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 <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 <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_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 <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* 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 home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

View File

@@ -1,155 +0,0 @@
dnl $Id$
dnl config.m4 for extension phrasea2
AC_DEFUN([MYSQL_LIB_CHK], [
str="$MYSQL_DIR/$1/lib$MYSQL_LIBNAME.*"
for j in `echo $str`; do
if test -r $j; then
MYSQL_LIB_DIR=$MYSQL_DIR/$1
break 2
fi
done
])
PHP_ARG_ENABLE(phrasea2, whether to enable phrasea2 support,
[ --enable-phrasea2 Enable phrasea2 support])
dnl PHP_ARG_WITH(phrasea2, for phrasea2 support,
dnl [ --with-phrasea2[=DIR] Include phrasea2 support. DIR is the phrasea2 base directory])
if test "$PHP_PHRASEA2" != "no"; then
dnl PHP_EXPAND_PATH($MYSQL_INCLUDE, MYSQL_INCLUDE)
PHRASEAVERSION=
MYSQL_DIR=
MYSQL_INC_DIR=
PHP_LIBDIR=
dnl *************** get version ****************
AC_MSG_CHECKING([================================================= phrasea extension version number])
if test -r ./_VERSION.h; then
PHRASEAVERSION=`cat ./_VERSION.h | egrep -e "#define[[:blank:]]*PHDOTVERSION" | tr -d '\r' | sed -e "s/#define[[:blank:]]*PHDOTVERSION[[:blank:]]*\(.*\)[[:space:]]*$/\1/"`
AC_MSG_RESULT([$PHRASEAVERSION])
else
AC_MSG_ERROR([Cannot find file _VERSION.h])
fi
dnl *************** search mysql includes dir ****************
AC_MSG_CHECKING([MySQL includes dir])
for i in $PHP_PHRASEA2 /usr/local /usr; do
if test -r $i/include/mysql/mysql.h; then
MYSQL_DIR=$i
MYSQL_INC_DIR=$i/include/mysql
break
elif test -r $i/include/mysql.h; then
MYSQL_DIR=$i
MYSQL_INC_DIR=$i/include
break
fi
done
if test -z "$MYSQL_DIR"; then
AC_MSG_ERROR([Cannot find MySQL header files under $PHP_PHRASEA2.])
else
AC_MSG_RESULT([$MYSQL_INC_DIR])
PHP_ADD_INCLUDE($MYSQL_INC_DIR)
fi
dnl *************** search mysql library ****************
AC_MSG_CHECKING([MySQL library])
if test "$enable_maintainer_zts" = "yes"; then
MYSQL_LIBNAME=mysqlclient_r
else
MYSQL_LIBNAME=mysqlclient
fi
case $host_alias in
*netware*[)]
MYSQL_LIBNAME=mysql
;;
esac
dnl for compat with PHP 4 build system
if test -z "$PHP_LIBDIR"; then
PHP_LIBDIR=lib
fi
for i in $PHP_LIBDIR $PHP_LIBDIR/mysql; do
MYSQL_LIB_CHK($i)
done
if test -z "$MYSQL_LIB_DIR"; then
AC_MSG_ERROR([Cannot find lib$MYSQL_LIBNAME under $MYSQL_DIR.])
else
AC_MSG_RESULT([$MYSQL_LIB_DIR / $MYSQL_LIBNAME])
fi
dnl # --with-phrasea2 -> check with-path
dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
dnl SEARCH_FOR="/include/phrasea2.h" # you most likely want to change this
dnl if test -r $PHP_PHRASEA2/$SEARCH_FOR; then # path given as parameter
dnl PHRASEA2_DIR=$PHP_PHRASEA2
dnl else # search default path list
dnl AC_MSG_CHECKING([for phrasea2 files in default path])
dnl for i in $SEARCH_PATH ; do
dnl if test -r $i/$SEARCH_FOR; then
dnl PHRASEA2_DIR=$i
dnl AC_MSG_RESULT(found in $i)
dnl fi
dnl done
dnl fi
dnl
dnl if test -z "$PHRASEA2_DIR"; then
dnl AC_MSG_RESULT([not found])
dnl AC_MSG_ERROR([Please reinstall the phrasea2 distribution])
dnl fi
dnl # --with-phrasea2 -> add include path
dnl PHP_ADD_INCLUDE($PHRASEA2_DIR/include)
dnl # --with-phrasea2 -> check for lib and symbol presence
dnl LIBNAME=phrasea2 # you may want to change this
dnl LIBSYMBOL=phrasea2 # you most likely want to change this
dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
dnl [
dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PHRASEA2_DIR/lib, PHRASEA2_SHARED_LIBADD)
dnl AC_DEFINE(HAVE_PHRASEA2LIB,1,[ ])
dnl ],[
dnl AC_MSG_ERROR([wrong phrasea2 lib version or lib not found])
dnl ],[
dnl -L$PHRASEA2_DIR/lib -lm -ldl
dnl ])
dnl
dnl PHP_SUBST(PHRASEA2_SHARED_LIBADD)
dnl ****************** tell we will compile .cpp files *****************
PHP_REQUIRE_CXX()
CPPFLAGS=-Wno-write-strings
dnl ****************** tell we will link with g++ *****************
CC=g++
PHP_ADD_LIBRARY_WITH_PATH($MYSQL_LIBNAME, $MYSQL_LIB_DIR, PHRASEA2_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH([uuid], [/usr/lib], PHRASEA2_SHARED_LIBADD)
PHP_SUBST(PHRASEA2_SHARED_LIBADD)
PHP_NEW_EXTENSION(phrasea2, phrasea2.cpp \
phrasea_engine/cache.cpp\
phrasea_engine/emptyw.cpp \
phrasea_engine/fetchresults.cpp \
phrasea_engine/grouping.cpp \
phrasea_engine/phrasea_clock_t.cpp \
phrasea_engine/qtree.cpp \
phrasea_engine/query.cpp \
phrasea_engine/session.cpp \
phrasea_engine/uuid.cpp \
phrasea_engine/sql.cpp \
phrasea_engine/subdefs.cpp \
phrasea_engine/xmlcaption.cpp \
, $ext_shared, [], -DCOMPILE_DL_PHRASEA2 -DMYSQLENCODE=utf8)
fi

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +0,0 @@
// $Id$
// vim:ft=javascript
// If your extension references something external, use ARG_WITH
// ARG_WITH("phrasea2", "for phrasea2 support", "no");
// Otherwise, use ARG_ENABLE
// ARG_ENABLE("phrasea2", "enable phrasea2 support", "no");
if (PHP_PHRASEA2 != "no") {
EXTENSION("phrasea2", "phrasea2.c");
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,211 +0,0 @@
dnl This file becomes configure.in for self-contained extensions.
divert(1)
AC_PREREQ(2.13)
AC_INIT(config.m4)
PHP_CONFIG_NICE(config.nice)
dnl
AC_DEFUN([PHP_EXT_BUILDDIR],[.])dnl
AC_DEFUN([PHP_EXT_DIR],[""])dnl
AC_DEFUN([PHP_EXT_SRCDIR],[$abs_srcdir])dnl
AC_DEFUN([PHP_ALWAYS_SHARED],[
ext_output="yes, shared"
ext_shared=yes
test "[$]$1" = "no" && $1=yes
])dnl
dnl
test -z "$CFLAGS" && auto_cflags=1
abs_srcdir=`(cd $srcdir && pwd)`
abs_builddir=`pwd`
AC_PROG_CC([cc gcc])
PHP_DETECT_ICC
PHP_DETECT_SUNCC
AC_PROG_CC_C_O
dnl Support systems with system libraries in e.g. /usr/lib64
PHP_ARG_WITH(libdir, for system library directory,
[ --with-libdir=NAME Look for libraries in .../NAME rather than .../lib], lib, no)
PHP_RUNPATH_SWITCH
PHP_SHLIB_SUFFIX_NAMES
dnl Find php-config script
PHP_ARG_WITH(php-config,,
[ --with-php-config=PATH Path to php-config [php-config]], php-config, no)
dnl For BC
PHP_CONFIG=$PHP_PHP_CONFIG
prefix=`$PHP_CONFIG --prefix 2>/dev/null`
phpincludedir=`$PHP_CONFIG --include-dir 2>/dev/null`
INCLUDES=`$PHP_CONFIG --includes 2>/dev/null`
EXTENSION_DIR=`$PHP_CONFIG --extension-dir 2>/dev/null`
PHP_EXECUTABLE=`$PHP_CONFIG --php-binary 2>/dev/null`
if test -z "$prefix"; then
AC_MSG_ERROR([Cannot find php-config. Please use --with-php-config=PATH])
fi
php_shtool=$srcdir/build/shtool
PHP_INIT_BUILD_SYSTEM
AC_MSG_CHECKING([for PHP prefix])
AC_MSG_RESULT([$prefix])
AC_MSG_CHECKING([for PHP includes])
AC_MSG_RESULT([$INCLUDES])
AC_MSG_CHECKING([for PHP extension directory])
AC_MSG_RESULT([$EXTENSION_DIR])
AC_MSG_CHECKING([for PHP installed headers prefix])
AC_MSG_RESULT([$phpincludedir])
dnl Checks for PHP_DEBUG / ZEND_DEBUG / ZTS
AC_MSG_CHECKING([if debug is enabled])
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$phpincludedir"
AC_EGREP_CPP(php_debug_is_enabled,[
#include <main/php_config.h>
#if ZEND_DEBUG
php_debug_is_enabled
#endif
],[
PHP_DEBUG=yes
],[
PHP_DEBUG=no
])
CPPFLAGS=$old_CPPFLAGS
AC_MSG_RESULT([$PHP_DEBUG])
AC_MSG_CHECKING([if zts is enabled])
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$phpincludedir"
AC_EGREP_CPP(php_zts_is_enabled,[
#include <main/php_config.h>
#if ZTS
php_zts_is_enabled
#endif
],[
PHP_THREAD_SAFETY=yes
],[
PHP_THREAD_SAFETY=no
])
CPPFLAGS=$old_CPPFLAGS
AC_MSG_RESULT([$PHP_DEBUG])
dnl Support for building and testing Zend extensions
if test "$PHP_DEBUG" = "yes" && test "$PHP_THREAD_SAFETY" = "yes; then
ZEND_EXT_TYPE="zend_extension_debug_ts"
elif test "$PHP_DEBUG" = "yes"; then
ZEND_EXT_TYPE="zend_extension_debug"
elif test "$PHP_THREAD_SAFETY" = "yes; then
ZEND_EXT_TYPE="zend_extension_ts"
else
ZEND_EXT_TYPE="zend_extension"
fi
PHP_SUBST(ZEND_EXT_TYPE)
dnl Discard optimization flags when debugging is enabled
if test "$PHP_DEBUG" = "yes"; then
PHP_DEBUG=1
ZEND_DEBUG=yes
changequote({,})
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
changequote([,])
dnl add -O0 only if GCC or ICC is used
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
CFLAGS="$CFLAGS -O0"
CXXFLAGS="$CXXFLAGS -O0"
fi
if test "$SUNCC" = "yes"; then
if test -n "$auto_cflags"; then
CFLAGS="-g"
CXXFLAGS="-g"
else
CFLAGS="$CFLAGS -g"
CXXFLAGS="$CFLAGS -g"
fi
fi
else
PHP_DEBUG=0
ZEND_DEBUG=no
fi
dnl Always shared
PHP_BUILD_SHARED
dnl Required programs
PHP_PROG_RE2C
PHP_PROG_AWK
sinclude(config.m4)
enable_static=no
enable_shared=yes
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
undefine([AC_PROG_CXX])
AC_DEFUN([AC_PROG_CXX], [])
undefine([AC_PROG_CXXCPP])
AC_DEFUN([AC_PROG_CXXCPP], [php_prog_cxxcpp=disabled])
])
AC_PROG_LIBTOOL
all_targets='$(PHP_MODULES) $(PHP_ZEND_EX)'
install_targets="install-modules install-headers"
phplibdir="`pwd`/modules"
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
CFLAGS_CLEAN='$(CFLAGS)'
CXXFLAGS_CLEAN='$(CXXFLAGS)'
test "$prefix" = "NONE" && prefix="/usr/local"
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
PHP_SUBST(PHP_MODULES)
PHP_SUBST(PHP_ZEND_EX)
PHP_SUBST(all_targets)
PHP_SUBST(install_targets)
PHP_SUBST(prefix)
PHP_SUBST(exec_prefix)
PHP_SUBST(libdir)
PHP_SUBST(prefix)
PHP_SUBST(phplibdir)
PHP_SUBST(phpincludedir)
PHP_SUBST(CC)
PHP_SUBST(CFLAGS)
PHP_SUBST(CFLAGS_CLEAN)
PHP_SUBST(CPP)
PHP_SUBST(CPPFLAGS)
PHP_SUBST(CXX)
PHP_SUBST(CXXFLAGS)
PHP_SUBST(CXXFLAGS_CLEAN)
PHP_SUBST(EXTENSION_DIR)
PHP_SUBST(PHP_EXECUTABLE)
PHP_SUBST(EXTRA_LDFLAGS)
PHP_SUBST(EXTRA_LIBS)
PHP_SUBST(INCLUDES)
PHP_SUBST(LFLAGS)
PHP_SUBST(LDFLAGS)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(LIBTOOL)
PHP_SUBST(SHELL)
PHP_SUBST(INSTALL_HEADERS)
PHP_GEN_BUILD_DIRS
PHP_GEN_GLOBAL_MAKEFILE
test -d modules || $php_shtool mkdir modules
touch .deps
AC_CONFIG_HEADER(config.h)
AC_OUTPUT()

File diff suppressed because it is too large Load Diff

View File

@@ -1,89 +0,0 @@
#ifndef PHP_PHRASEA2_H
#define PHP_PHRASEA2_H
#include "phrasea_engine/cache.h" // define CACHE_SESSION
#ifdef ZTS
#include "TSRM.h"
#endif
ZEND_BEGIN_MODULE_GLOBALS(phrasea2)
SQLCONN *global_epublisher;
CACHE_SESSION *global_session;
char tempPath[1024];
ZEND_END_MODULE_GLOBALS(phrasea2)
#ifdef ZTS
#define PHRASEA2_G(v) TSRMG(phrasea2_globals_id, zend_phrasea2_globals *, v)
#else
#define PHRASEA2_G(v) (phrasea2_globals.v)
#endif
PHP_MINIT_FUNCTION(phrasea2);
PHP_MSHUTDOWN_FUNCTION(phrasea2);
PHP_RINIT_FUNCTION(phrasea2);
PHP_RSHUTDOWN_FUNCTION(phrasea2);
PHP_MINFO_FUNCTION(phrasea2);
PHP_FUNCTION(phrasea2_verif_ultime);
PHP_FUNCTION(phrasea_getVersion);
PHP_FUNCTION(phrasea_create_session);
PHP_FUNCTION(phrasea_open_session);
PHP_FUNCTION(phrasea_save_session);
PHP_FUNCTION(phrasea_clear_cache);
PHP_FUNCTION(phrasea_register_base);
PHP_FUNCTION(phrasea_close_session);
PHP_FUNCTION(phrasea_query2);
// PHP_FUNCTION(phrasea_query);
PHP_FUNCTION(phrasea_fetch_results);
PHP_FUNCTION(phrasea_subdefs);
PHP_FUNCTION(phrasea_emptyw);
PHP_FUNCTION(phrasea_status);
PHP_FUNCTION(phrasea_xmlcaption);
ZEND_FUNCTION(phrasea_setxmlcaption);
PHP_FUNCTION(phrasea_isgrp);
PHP_FUNCTION(phrasea_grpparent);
PHP_FUNCTION(phrasea_grpforselection);
PHP_FUNCTION(phrasea_grpchild);
ZEND_FUNCTION(phrasea_setstatus);
// PHP_FUNCTION(phrasea_connect);
// PHP_FUNCTION(phrasea_return_php);
PHP_FUNCTION(phrasea_out_xml);
PHP_FUNCTION(phrasea_list_bases);
PHP_FUNCTION(phrasea_uuid_create);
PHP_FUNCTION(phrasea_uuid_is_valid);
PHP_FUNCTION(phrasea_uuid_compare);
PHP_FUNCTION(phrasea_uuid_is_null);
//PHP_FUNCTION(phrasea_uuid_variant);
//PHP_FUNCTION(phrasea_uuid_time);
//PHP_FUNCTION(phrasea_uuid_mac);
PHP_FUNCTION(phrasea_uuid_parse);
PHP_FUNCTION(phrasea_uuid_unparse);
// PHP_FUNCTION(phrasea_usebase);
PHP_FUNCTION(phrasea_conn);
PHP_FUNCTION(phrasea_info);
extern zend_module_entry phrasea2_module_entry;
#define phpext_phrasea2_ptr &phrasea2_module_entry
#include <uuid/uuid.h>
/* mirrored PHP Constants */
#define UUID_TYPE_DEFAULT 0
#define UUID_TYPE_TIME UUID_TYPE_DCE_TIME
#define UUID_TYPE_DCE UUID_TYPE_DCE_RANDOM
#define UUID_TYPE_NAME UUID_TYPE_DCE_TIME
#define UUID_TYPE_RANDOM UUID_TYPE_DCE_RANDOM
#define UUID_TYPE_NULL -1
#define UUID_TYPE_INVALID -42
// extern ZEND_DECLARE_MODULE_GLOBALS(phrasea2)
ZEND_EXTERN_MODULE_GLOBALS(phrasea2)
#endif /* PHP_PHRASEA2_H */

View File

@@ -1,147 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include "..\_VERSION.h"
// #include ".\_TIME.h"
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION PHVERSION // PHVERSION : d<>fini dans macro utilisateurs
PRODUCTVERSION PHVERSION // PHVERSION : d<>fini dans macro utilisateurs
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040c04b0"
BEGIN
// VALUE "Comments", "\0"
VALUE "CompanyName", "Alchemy\0"
// VALUE "FileDescription", "php_phrasea2\0"
VALUE "FileVersion", QUOTE(PHDOTVERSION) // PHDOTVERSION : d<>fini dans macro utilisateurs
// VALUE "InternalName", "php_phrasea2\0"
// VALUE "LegalCopyright", "Copyright <20> 2007\0"
// VALUE "LegalTrademarks", "\0"
// VALUE "OriginalFilename", "php_phrasea2.dll\0"
// VALUE "PrivateBuild", "\0"
// VALUE "ProductName", "extension php_phrasea2\0"
VALUE "ProductVersion", QUOTE(PHDOTVERSION) // PHDOTVERSION : d<>fini dans macro utilisateurs
// VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x40c, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -1,146 +0,0 @@
//Microsoft Developer Studio generated resource script.
//
#include ".\_VERSION.h"
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION RPHVERSION
PRODUCTVERSION RPHVERSION // VERSION : d<>fini dans _VERSION.h
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Alchemy\0"
VALUE "FileDescription", "php_phrasea2\0"
VALUE "FileVersion", ZQUOTE(RPHDOTVERSION) // STRVERSION : d<>fini dans _VERSION.h
VALUE "InternalName", "php_phrasea2\0"
VALUE "LegalCopyright", "Copyright <20> 2007\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "php_phrasea2.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "extension php_phrasea2\0"
VALUE "ProductVersion", ZQUOTE(RPHDOTVERSION) // STRVERSION : d<>fini dans _VERSION.h
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x40c, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 95
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,129,7,50,14
PUSHBUTTON "Cancel",IDCANCEL,129,24,50,14
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 179
TOPMARGIN, 7
BOTTOMMARGIN, 88
END
END
#endif // APSTUDIO_INVOKED
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -1,16 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by phrasea2.rc
//
#define IDD_DIALOG1 101
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -1,404 +0,0 @@
#include <sys/types.h>
#include <sys/timeb.h>
#include <math.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#pragma warning(push)
#pragma warning(disable:4005) // supprime le warning sur double def de _WIN32_WINNT
#include "php.h"
#include "php_ini.h"
#pragma warning(pop)
#include "ext/standard/info.h"
#ifdef PHP_WIN32
# include <winsock2.h>
# define signal(a, b) NULL
#elif defined(NETWARE)
# include <sys/socket.h>
# define signal(a, b) NULL
#else
# if HAVE_SIGNAL_H
# include <signal.h>
# endif
# if HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
# include <netdb.h>
# include <netinet/in.h>
#endif
// ******* tosee : mysql.h moved
#include <mysql.h>
#include "_VERSION.h"
#include "php_phrasea2.h"
#include "phrasea_engine/trace_memory.h"
ZEND_DECLARE_MODULE_GLOBALS(phrasea2)
// -----------------------------------------------------------------------------
// option -Wno-write-strings to gcc prevents warnings on this section
static function_entry phrasea2_functions[] = {
PHP_FE(phrasea_info, NULL)
PHP_FE(phrasea_conn, NULL)
PHP_FE(phrasea_create_session, NULL)
PHP_FE(phrasea_open_session, NULL)
PHP_FE(phrasea_save_session, NULL)
PHP_FE(phrasea_clear_cache, NULL)
PHP_FE(phrasea_register_base, NULL)
PHP_FE(phrasea_close_session, NULL)
// PHP_FE(phrasea_query, NULL)
PHP_FE(phrasea_query2, NULL)
PHP_FE(phrasea_fetch_results, NULL)
PHP_FE(phrasea_subdefs, NULL)
PHP_FE(phrasea_emptyw, NULL)
PHP_FE(phrasea_status, NULL)
PHP_FE(phrasea_xmlcaption, NULL)
PHP_FE(phrasea_setxmlcaption, NULL)
PHP_FE(phrasea_isgrp, NULL)
PHP_FE(phrasea_grpparent, NULL)
PHP_FE(phrasea_grpforselection, NULL)
PHP_FE(phrasea_grpchild, NULL)
PHP_FE(phrasea_setstatus, NULL)
PHP_FE(phrasea_uuid_create, NULL)
PHP_FE(phrasea_uuid_is_valid, NULL)
PHP_FE(phrasea_uuid_compare, NULL)
PHP_FE(phrasea_uuid_is_null, NULL)
// PHP_FE(phrasea_uuid_variant, NULL)
// PHP_FE(phrasea_uuid_time, NULL)
// PHP_FE(phrasea_uuid_mac, NULL)
PHP_FE(phrasea_uuid_parse, NULL)
PHP_FE(phrasea_uuid_unparse, NULL)
// PHP_FE(phrasea_return_php, NULL)
// PHP_FE(phrasea_out_xml, NULL)
PHP_FE(phrasea_list_bases, NULL)
{NULL, NULL, NULL} /* Must be the last line in phrasea2_functions[] */
};
// -----------------------------------------------------------------------------
zend_module_entry phrasea2_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
STANDARD_MODULE_HEADER,
#endif
(char *)"phrasea2",
phrasea2_functions,
PHP_MINIT(phrasea2),
PHP_MSHUTDOWN(phrasea2),
PHP_RINIT(phrasea2),
PHP_RSHUTDOWN(phrasea2),
PHP_MINFO(phrasea2),
#if ZEND_MODULE_API_NO >= 20010901
(char *)"0.1", /* Replace with version number for your extension */
#endif
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_PHRASEA2
ZEND_GET_MODULE(phrasea2)
#endif
PHP_INI_BEGIN()
PHP_INI_END()
static void php_phrasea2_init_globals(zend_phrasea2_globals *phrasea2_globals)
{
phrasea2_globals->global_epublisher = NULL;
phrasea2_globals->global_session = NULL;
phrasea2_globals->tempPath[0] = '\0';
}
/*
#ifdef PHP_WIN32
char tempPathBuffer[1024];
#else
char *tempPathBuffer = "/tmp/";
#endif
*/
// -----------------------------------------------------------------------------
// option -Wno-write-strings to gcc prevents warnings on this section
PHP_MINIT_FUNCTION(phrasea2)
{
// REGISTER_LONG_CONSTANT("PHRASEA_K", 987, CONST_CS);
// zend_printf("PHP_MINIT_FUNCTION\n");
// REGISTER_LONG_CONSTANT((char *)"PHRASEA_MULTIDOC_DOCONLY", 123, CONST_CS | CONST_PERSISTENT);
// zend_register_long_constant("PHRASEA_MULTIDOC_DOCONLY", 24, 666, CONST_CS | CONST_PERSISTENT, module_number, TSRMLS_DC);
// zend_printf("REGISTER_MAIN_LONG_CONSTANT done\n");
ZEND_INIT_MODULE_GLOBALS(phrasea2, php_phrasea2_init_globals, NULL);
REGISTER_INI_ENTRIES();
// Z_TYPE(phrasea2_module_entry) = type;
REGISTER_LONG_CONSTANT("PHRASEA_MYSQLENGINE", PHRASEA_MYSQLENGINE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_PGSQLENGINE", PHRASEA_PGSQLENGINE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_OR", PHRASEA_OP_OR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_AND", PHRASEA_OP_AND, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_KW_ALL", PHRASEA_KW_ALL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_KW_LAST", PHRASEA_KW_LAST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_KW_FIRST", PHRASEA_KW_FIRST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_EXCEPT", PHRASEA_OP_EXCEPT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_NEAR", PHRASEA_OP_NEAR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_BEFORE", PHRASEA_OP_BEFORE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_AFTER", PHRASEA_OP_AFTER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_IN", PHRASEA_OP_IN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_COLON", PHRASEA_OP_COLON, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_EQUAL", PHRASEA_OP_EQUAL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_NOTEQU", PHRASEA_OP_NOTEQU, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_GT", PHRASEA_OP_GT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_LT" , PHRASEA_OP_LT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_GEQT", PHRASEA_OP_GEQT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_OP_LEQT", PHRASEA_OP_LEQT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_KEYLIST", PHRASEA_KEYLIST, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_MULTIDOC_DOCONLY", PHRASEA_MULTIDOC_DOCONLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_MULTIDOC_REGONLY", PHRASEA_MULTIDOC_REGONLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_ORDER_DESC", PHRASEA_ORDER_DESC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_ORDER_ASC", PHRASEA_ORDER_ASC, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHRASEA_ORDER_ASK", PHRASEA_ORDER_ASK, CONST_CS | CONST_PERSISTENT);
#ifdef ZTS
# if MYSQL_VERSION_ID >= 40000
// mysql_thread_init();
# endif
#endif
#ifndef UUID_TYPE_DCE_TIME
#ifdef __APPLE__
/* UUID Type definitions */
#define UUID_TYPE_DCE_TIME 1
#define UUID_TYPE_DCE_RANDOM 4
#endif /* __MACOS__ */
#endif /* UUID_TYPE_DCE_TIME */
#if UUID_VARIANT_NCS
REGISTER_LONG_CONSTANT("UUID_VARIANT_NCS", UUID_VARIANT_NCS, CONST_PERSISTENT | CONST_CS);
#endif /* UUID_VARIANT_NCS */
#if UUID_VARIANT_DCE
REGISTER_LONG_CONSTANT("UUID_VARIANT_DCE", UUID_VARIANT_DCE, CONST_PERSISTENT | CONST_CS);
#endif /* UUID_VARIANT_DCE */
#if UUID_VARIANT_MICROSOFT
REGISTER_LONG_CONSTANT("UUID_VARIANT_MICROSOFT", UUID_VARIANT_MICROSOFT, CONST_PERSISTENT | CONST_CS);
#endif /* UUID_VARIANT_MICROSOFT */
#if UUID_VARIANT_OTHER
REGISTER_LONG_CONSTANT("UUID_VARIANT_OTHER", UUID_VARIANT_OTHER, CONST_PERSISTENT | CONST_CS);
#endif /* UUID_VARIANT_OTHER */
REGISTER_LONG_CONSTANT("UUID_TYPE_DEFAULT", 0, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("UUID_TYPE_TIME", UUID_TYPE_DCE_TIME, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("UUID_TYPE_DCE", UUID_TYPE_DCE_RANDOM, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("UUID_TYPE_NAME", UUID_TYPE_DCE_TIME, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("UUID_TYPE_RANDOM", UUID_TYPE_DCE_RANDOM, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("UUID_TYPE_NULL", -1, CONST_PERSISTENT | CONST_CS);
REGISTER_LONG_CONSTANT("UUID_TYPE_INVALID", -42, CONST_PERSISTENT | CONST_CS);
return SUCCESS;
}
// -----------------------------------------------------------------------------
PHP_RINIT_FUNCTION(phrasea2)
{
// zend_printf("PHP_RINIT_FUNCTION\n");
PHRASEA2_G(global_session) = NULL;
PHRASEA2_G(global_epublisher) = NULL;
#ifdef PHP_WIN32
DWORD tempPathLen;
tempPathLen = GetTempPath(1023, PHRASEA2_G(tempPath));
if(tempPathLen>0 || tempPathLen<1023)
{
// tempPathBuffer[tempPathLen] = '\0';
}
else
{
PHRASEA2_G(tempPath)[0] = '\\';
PHRASEA2_G(tempPath)[1] = '\0';
}
#else
strcpy(PHRASEA2_G(tempPath), "/tmp/");
#endif
TRACELOG("RINIT");
return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(phrasea2)
{
// zend_printf("PHP_RSHUTDOWN_FUNCTION\n");
if(PHRASEA2_G(global_session))
{
delete PHRASEA2_G(global_session);
PHRASEA2_G(global_session) = NULL;
}
if(PHRASEA2_G(global_epublisher))
{
delete PHRASEA2_G(global_epublisher);
PHRASEA2_G(global_epublisher) = NULL;
}
TRACELOG("RSHUTDOWN");
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(phrasea2)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
PHP_MINFO_FUNCTION(phrasea2)
{
char buf[1000];
php_info_print_table_start();
php_info_print_table_header(2, "phrasea2 support", "enabled" );
php_info_print_table_row(2, "Version", QUOTE(PHDOTVERSION) );
sprintf(buf, "OK ( client info : %s )", mysql_get_client_info());
php_info_print_table_row(2, "MYSQL support", buf);
#ifdef PGSUPPORT
sprintf(buf, "OK ( version %s )", "???"); // PG_VERSION);
php_info_print_table_row(2, "PostgreSQL support", buf);
#else
php_info_print_table_row(2, "NO PostgreSQL support", "");
#endif
#ifdef MYSQLENCODE
php_info_print_table_row(2, "SQL connection charset", QUOTE(MYSQLENCODE) );
#else
php_info_print_table_row(2, "SQL connection charset", "default" );
#endif
FILE *fp_test=NULL;
char *fname;
bool test = false;
int l = strlen(PHRASEA2_G(tempPath))
+ 9 // "_phrasea."
+ strlen("fakeukey")
+ 9 // ".answers."
+ 33 // zsession
+1; // '\0'
if( (fname = (char *)EMALLOC(l)) )
{
sprintf(fname, "%s_phrasea.%s.test.%d.bin", PHRASEA2_G(tempPath), "fakeukey", 666);
if( (fp_test = fopen(fname, "ab")) )
{
fclose(fp_test);
test = true;
}
php_info_print_table_row(3, "temp DIR", PHRASEA2_G(tempPath), (test?"OK":"BAD") );
EFREE(fname);
}
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
}
PHP_FUNCTION(phrasea_info)
{
if(ZEND_NUM_ARGS()!= 0)
{
WRONG_PARAM_COUNT;
}
else
{
char fname[1000];
FILE *fp_test;
array_init(return_value);
add_assoc_string(return_value, (char *)"version", QUOTE(PHDOTVERSION), TRUE);
add_assoc_string(return_value, (char *)"mysql_client", (char *)(mysql_get_client_info()), TRUE);
add_assoc_string(return_value, (char *)"temp_dir", PHRASEA2_G(tempPath), TRUE);
sprintf(fname, "%s_test.bin", PHRASEA2_G(tempPath));
if( (fp_test = fopen(fname, "ab")) )
{
fclose(fp_test);
remove(fname);
add_assoc_bool(return_value, (char *)"temp_writable", true);
}
else
{
add_assoc_bool(return_value, (char *)"temp_writable", false);
}
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
if(epublisher && epublisher->isok())
{
add_assoc_string(return_value, (char *)"cnx_ukey", epublisher->ukey, TRUE);
}
else
{
add_assoc_bool(return_value, (char *)"cnx_ukey", FALSE);
}
}
}
PHP_FUNCTION(phrasea_conn)
{
char *zhost, *zuser, *zpasswd, *zdbname;
int zhost_len, zuser_len, zpasswd_len, zdbname_len;
int zport;
if(ZEND_NUM_ARGS()!=5)
{
WRONG_PARAM_COUNT;
}
else
{
if(zend_parse_parameters(5 TSRMLS_CC, (char *)"slsss"
, &zhost, &zhost_len
, &zport
, &zuser, &zuser_len
, &zpasswd, &zpasswd_len
, &zdbname, &zdbname_len) == FAILURE)
{
RETURN_FALSE;
}
// zend_printf("phrasea_conn(host='%s' port=%i user='%s' passwd='%s' dbname='%s')<br>\n", zhost, zport, zuser, zpasswd, zdbname);
if(PHRASEA2_G(global_epublisher))
delete(PHRASEA2_G(global_epublisher));
PHRASEA2_G(global_epublisher) = new SQLCONN(zhost, zport, zuser, zpasswd, zdbname, (char *)"MYSQL");
if(PHRASEA2_G(global_epublisher->isok()))
{
RETURN_TRUE;
}
else
{
delete(PHRASEA2_G(global_epublisher));
PHRASEA2_G(global_epublisher) = NULL;
RETURN_FALSE;
}
}
}

View File

@@ -1,21 +0,0 @@
<?php
$br = (php_sapi_name() == "cli")? "":"<br>";
if(!extension_loaded('phrasea2')) {
dl('phrasea2.' . PHP_SHLIB_SUFFIX);
}
$module = 'phrasea2';
$functions = get_extension_funcs($module);
echo "Functions available in the test extension:$br\n";
foreach($functions as $func) {
echo $func."$br\n";
}
echo "$br\n";
$function = 'confirm_' . $module . '_compiled';
if (extension_loaded($module)) {
$str = $function($module);
} else {
$str = "Module $module is not compiled into PHP";
}
echo "$str\n";
?>

View File

@@ -1,81 +0,0 @@
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#include <sys/types.h>
#include <sys/timeb.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#pragma warning(push)
#pragma warning(disable:4005) // supprime le warning sur double def de _WIN32_WINNT
#include "php.h"
#pragma warning(pop)
//#include "php_globals.h"
#include "ext/standard/info.h"
#include "ext/standard/php_string.h"
#include "zend_exceptions.h"
#ifdef PHP_WIN32
# include <winsock.h>
# define signal(a, b) NULL
#elif defined(NETWARE)
# include <sys/socket.h>
# define signal(a, b) NULL
#else
# if HAVE_SIGNAL_H
# include <signal.h>
# endif
# if HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
# include <netdb.h>
# include <netinet/in.h>
#endif
// ******* tosee : mysql.h d<>plac<61>
#include <mysql.h>
// ******* tosee : fichiers headers de pgsql
#ifdef PHP_WIN32
#ifdef PGSUPPORT
# include <libpq-fe.h>
#endif
// ******* tosee : HAVE_MEMMOVE est d<>j<EFBFBD> d<>fini dans un include de php (via php.h)
# undef HAVE_MEMMOVE
#ifdef PGSUPPORT
# include <pg_config_os.h>
#endif
#else
# undef PACKAGE_VERSION
# undef PACKAGE_TARNAME
# undef PACKAGE_NAME
# undef PACKAGE_STRING
# undef PACKAGE_BUGREPORT
#ifdef PGSUPPORT
# include <postgres.h>
#endif
#endif
/*
#include "../php_phrasea2/phrasea_ext.h"
#include "../php_phrasea2/phrasea_types.h"
#include "sql.h"
*/
#include "trace_memory.h"
#define RAMLOG "/home/gaulier/ramlog.txt"

View File

@@ -1,861 +0,0 @@
#include "base_header.h"
#include "../php_phrasea2.h"
// ---------------------------------------------------------------------------------------------------------------
// CACHE_COLL
#define GETPREFS 1
#define PAD sizeof(char *)
#define LSTRPAD(l) (((l)+PAD) & ~(PAD-1))
CACHE_COLL::CACHE_COLL(long coll_id, long base_id, char *name, char *prefs, bool registered)
{
// zend_printf("NEW COLL\n");
int lstr, lram;
// zend_printf("coll_id='%li', base_id='%li', name='%s', prefs='%s'<br>\n", coll_id, base_id, name, (prefs?prefs:"null") );
this->coll_id = coll_id;
this->base_id = base_id;
// this->phserver_port = phserver_port;
this->name = NULL;
this->name_lenPAD = 0;
this->prefs = NULL;
this->prefs_lenPAD = 0;
// this->phserver_host = NULL;
// this->phserver_host_lenPAD = 0;
this->registered = registered;
this->binsize = sizeof(this->coll_id) // coll_id
+ sizeof(this->base_id) // base_id
// + sizeof(this->phserver_port) // phserver_port
+ sizeof(long) // registered
+ PAD // name (si null)
#if GETPREFS
+ PAD // prefs (si null)
#endif
;
// + PAD; // phserver_host (si null)
if(name)
{
lstr = strlen(name);
lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->name = (char *)EMALLOC(lram))
{
this->name_lenPAD = lram;
memcpy(this->name, name, lstr+1);
while(lstr<lram)
this->name[lstr++] = '\0'; // on compl<70>te avec des 0
this->binsize += lram-PAD; // on avait d<>j<EFBFBD> compt<70> PAD
}
}
#if GETPREFS
if(prefs)
{
lstr = strlen(prefs);
lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->prefs = (char *)EMALLOC(lram))
{
this->prefs_lenPAD = lram;
memcpy(this->prefs, prefs, lstr+1);
while(lstr<lram)
this->prefs[lstr++] = '\0'; // on compl<70>te avec des 0
this->binsize += lram-PAD; // on avait d<>j<EFBFBD> compt<70> PAD
}
}
#endif
// if(phserver_host)
// {
// lstr = strlen(phserver_host);
// lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
// if(this->phserver_host = (char *)EMALLOC(lram))
// {
// this->phserver_host_lenPAD = lram;
// memcpy(this->phserver_host, phserver_host, lstr+1);
// while(lstr<lram)
// this->phserver_host[lstr++] = '\0'; // on compl<70>te avec des 0
// this->binsize += lram-PAD; // on avait d<>j<EFBFBD> compt<70> PAD
// }
// }
this->nextcoll = NULL;
}
long CACHE_COLL::get_binsize()
{
return(this->binsize);
}
long *CACHE_COLL::serialize_bin(long *binbuff)
{
*binbuff++ = this->coll_id;
*binbuff++ = this->base_id;
// *binbuff++ = this->phserver_port;
*binbuff++ = (long)(this->registered);
if(this->name_lenPAD > 0)
{
memcpy(binbuff, this->name, this->name_lenPAD);
binbuff += (this->name_lenPAD)/sizeof(long);
}
else
{
*binbuff++ = 0;
}
#if GETPREFS
if(this->prefs_lenPAD > 0)
{
memcpy(binbuff, this->prefs, this->prefs_lenPAD);
binbuff += (this->prefs_lenPAD)/sizeof(long);
}
else
{
*binbuff++ = 0;
}
#endif
// if(this->phserver_host_lenPAD > 0)
// {
// memcpy(binbuff, this->phserver_host, this->phserver_host_lenPAD);
// binbuff += (this->phserver_host_lenPAD)/sizeof(long);
// }
// else
// {
// *binbuff++ = 0;
// }
return(binbuff);
}
void CACHE_COLL::serialize_php(zval *zcolllist)
{
zval *zcoll;
MAKE_STD_ZVAL(zcoll);
array_init(zcoll);
add_assoc_long(zcoll, (char *)"coll_id", this->coll_id);
add_assoc_long(zcoll, (char *)"base_id", this->base_id);
add_assoc_string(zcoll, (char *)"name", this->name, true);
#if GETPREFS
add_assoc_string(zcoll, (char *)"prefs", this->prefs, true);
#endif
// add_assoc_string(zcoll, "phserver_host", this->phserver_host, true);
// add_assoc_long(zcoll, (char *)"phserver_port", this->phserver_port);
add_assoc_bool(zcoll, (char *)"registered", this->registered);
add_next_index_zval(zcolllist, zcoll);
}
void CACHE_COLL::dump()
{
zend_printf("| | +--coll_id=%li\n", this->coll_id);
zend_printf("| | | base_id=%li\n", this->base_id);
zend_printf("| | | name='%s' (binsize=%li)\n", this->name ? this->name : "null", this->name_lenPAD);
#if GETPREFS
zend_printf("| | | prefs='%s' (binsize=%li)\n", this->prefs ? this->prefs : "null", this->prefs_lenPAD);
#endif
// zend_printf("| | | phserver_host='%s' (binsize=%li)\n", this->phserver_host ? this->phserver_host : "null", this->phserver_host_lenPAD);
// zend_printf("| | | phserver_port=%li\n", this->phserver_port);
zend_printf("| | | registered=%s\n", this->registered ? "TRUE":"FALSE");
zend_printf("| | +--(coll binsize=%li)\n", this->get_binsize());
zend_printf("| |\n");
}
CACHE_COLL::~CACHE_COLL()
{
// zend_printf("DELETE COLL\n");
if(this->name)
{
// zend_printf("lib<69>ration de name=%s\n", this->name);
EFREE(this->name);
this->name = NULL;
}
#if GETPREFS
if(this->prefs)
{
// zend_printf("lib<69>ration de name=%s\n", this->name);
EFREE(this->prefs);
this->prefs = NULL;
}
#endif
return;
}
// ---------------------------------------------------------------------------------------------------------------
// CACHE_BASE
CACHE_BASE::CACHE_BASE(long base_id, char *host, long port, char *user, char *passwd, char *dbname, char *xmlstruct, long sbas_id, char *viewname, bool online)
{
// zend_printf("NEW BASE\n");
this->online = online;
this->base_id = base_id;
this->sbas_id = sbas_id;
this->port = port;
this->engine = PHRASEA_MYSQLENGINE;
this->conn = NULL;
this->viewname = NULL;
this->viewname_lenPAD = PAD;
if(viewname)
{
long lstr = strlen(viewname);
long lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->viewname = (char *)EMALLOC(lram))
{
this->viewname_lenPAD = lram;
memcpy(this->viewname, viewname, lstr+1);
while(lstr<lram)
this->viewname[lstr++] = '\0'; // on compl<70>te avec des 0
}
}
this->host = NULL;
this->host_lenPAD = PAD;
if(host)
{
long lstr = strlen(host);
long lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->host = (char *)EMALLOC(lram))
{
this->host_lenPAD = lram;
memcpy(this->host, host, lstr+1);
while(lstr<lram)
this->host[lstr++] = '\0'; // on compl<70>te avec des 0
}
}
this->user = NULL;
this->user_lenPAD = PAD;
if(user)
{
long lstr = strlen(user);
long lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->user = (char *)EMALLOC(lram))
{
this->user_lenPAD = lram;
memcpy(this->user, user, lstr+1);
while(lstr<lram)
this->user[lstr++] = '\0'; // on compl<70>te avec des 0
}
}
this->passwd = NULL;
this->passwd_lenPAD = PAD;
if(passwd)
{
long lstr = strlen(passwd);
long lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->passwd = (char *)EMALLOC(lram))
{
this->passwd_lenPAD = lram;
memcpy(this->passwd, passwd, lstr+1);
while(lstr<lram)
this->passwd[lstr++] = '\0'; // on compl<70>te avec des 0
}
}
this->dbname = NULL;
this->dbname_lenPAD = PAD;
if(dbname)
{
long lstr = strlen(dbname);
long lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->dbname = (char *)EMALLOC(lram))
{
this->dbname_lenPAD = lram;
memcpy(this->dbname, dbname, lstr+1);
while(lstr<lram)
this->dbname[lstr++] = '\0'; // on compl<70>te avec des 0
}
}
this->xmlstruct = NULL;
this->xmlstruct_lenPAD = PAD;
if(xmlstruct)
{
long lstr = strlen(xmlstruct);
long lram = LSTRPAD(lstr); // place pour le '\0' final, arrondi au multiple de PAD sup<75>rieur
if(this->xmlstruct = (char *)EMALLOC(lram))
{
this->xmlstruct_lenPAD = lram;
memcpy(this->xmlstruct, xmlstruct, lstr+1);
while(lstr<lram)
this->xmlstruct[lstr++] = '\0'; // on compl<70>te avec des 0
}
}
this->binsize = sizeof(this->base_id) // base_id
+ sizeof(this->sbas_id) // sbas_id
+ sizeof(long) // online
+ this->viewname_lenPAD // viewname
+ this->host_lenPAD // host
+ sizeof(this->port) // port
+ this->user_lenPAD // user
+ this->passwd_lenPAD // pwd
+ sizeof(this->engine) // engine
+ this->dbname_lenPAD // dbname
+ this->xmlstruct_lenPAD // xmlstruct
+ sizeof(long); // nombre de coll
this->firstcoll = NULL;
this->nextbase = NULL;
}
long CACHE_BASE::get_local_base_id(long distant_coll_id)
{
CACHE_COLL *cc;
for(cc=this->firstcoll; cc && cc->coll_id != distant_coll_id; cc = cc->nextcoll)
;
if(cc)
return(cc->base_id);
return(-1);
}
/**
idem que la version au dessus, mais avec verif qu'on est bien register dessus
histoire de pb de droits
plus d'infos : AS
*/
long CACHE_BASE::get_local_base_id2(long distant_coll_id)
{
CACHE_COLL *cc;
for(cc=this->firstcoll; cc && cc->coll_id != distant_coll_id; cc = cc->nextcoll)
;
if(cc && cc->registered)
return(cc->base_id);
return(-1);
}
long CACHE_BASE::get_binsize()
{
long binsize = this->binsize;
CACHE_COLL *cc;
for(cc=this->firstcoll; cc ; cc = cc->nextcoll)
binsize += cc->get_binsize();
return(binsize);
}
CACHE_COLL *CACHE_BASE::addcoll(long coll_id, long base_id, char *name, char *prefs, bool registered)
{
CACHE_COLL *cc, *ncc = new CACHE_COLL(coll_id, base_id, name, prefs, registered);
for(cc=this->firstcoll; cc && cc->nextcoll; cc = cc->nextcoll)
;
if(cc)
return(cc->nextcoll = ncc);
else
return(this->firstcoll = ncc);
}
void CACHE_BASE::dump()
{
CACHE_COLL *cc;
zend_printf("| +--base_id=%li\n", this->base_id);
zend_printf("| | sbas_id=%li\n", this->sbas_id);
zend_printf("| | online=%s\n", this->online ? "TRUE":"FALSE");
zend_printf("| | viewname=%s (binsize=%li)\n", this->viewname, this->viewname_lenPAD);
zend_printf("| | host=%s (binsize=%li)\n", this->host, this->host_lenPAD);
zend_printf("| | port=%li\n", this->port);
zend_printf("| | user=%s (binsize=%li)\n", this->user, this->user_lenPAD);
zend_printf("| | passwd=%s (binsize=%li)\n", this->passwd, this->passwd_lenPAD);
// zend_printf("| | engine=%li\n", this->engine);
zend_printf("| | dbname=%s (binsize=%li)\n", this->dbname, this->dbname_lenPAD);
zend_printf("| | xmlstruct=%s (binsize=%li)\n", this->xmlstruct, this->xmlstruct_lenPAD);
zend_printf("| | conn=%p\n", this->conn);
for(cc = this->firstcoll; cc; cc = cc->nextcoll)
cc->dump();
zend_printf("| +--(base binsize=%li)\n", this->get_binsize());
zend_printf("|\n");
}
void CACHE_BASE::serialize_php(zval *zbaselist, bool everything)
{
CACHE_COLL *cc;
zval *zbase, *zcolllist;
MAKE_STD_ZVAL(zbase);
array_init(zbase);
add_assoc_long(zbase, (char *)"base_id", this->base_id);
add_assoc_long(zbase, (char *)"sbas_id", this->sbas_id);
add_assoc_bool(zbase, (char *)"online", this->online);
add_assoc_string(zbase, (char *)"viewname", this->viewname, true);
add_assoc_string(zbase, (char *)"host", this->host, true);
add_assoc_long(zbase, (char *)"port", this->port);
add_assoc_string(zbase, (char *)"user", this->user, true);
add_assoc_string(zbase, (char *)"passwd", this->passwd, true);
add_assoc_long(zbase, (char *)"engine", this->engine);
add_assoc_string(zbase, (char *)"dbname", this->dbname, true);
if(this->xmlstruct)
add_assoc_string(zbase, (char *)"xmlstruct", this->xmlstruct, true);
MAKE_STD_ZVAL(zcolllist);
array_init(zcolllist);
for(cc = this->firstcoll; cc; cc = cc->nextcoll)
{
if(everything || cc->registered) // on ne retourne pas les collections (bases) sur lesquelles on n'est pas registered
cc->serialize_php(zcolllist);
}
add_assoc_zval(zbase, (char *)"collections", zcolllist);
add_next_index_zval(zbaselist, zbase);
}
long *CACHE_BASE::serialize_bin(long *binbuff)
{
CACHE_COLL *cc;
long ncolls = 0;
long *p;
*binbuff++ = this->base_id;
*binbuff++ = this->sbas_id;
*binbuff++ = (long)(this->online);
if(this->viewname)
memcpy(binbuff, this->viewname, this->viewname_lenPAD);
else
*binbuff = 0x00000000;
binbuff += this->viewname_lenPAD / sizeof(long);
if(this->host)
memcpy(binbuff, this->host, this->host_lenPAD);
else
*binbuff = 0x00000000;
binbuff += this->host_lenPAD / sizeof(long);
*binbuff++ = this->port;
if(this->user)
memcpy(binbuff, this->user, this->user_lenPAD);
else
*binbuff = 0x00000000;
binbuff += this->user_lenPAD / sizeof(long);
if(this->passwd)
memcpy(binbuff, this->passwd, this->passwd_lenPAD);
else
*binbuff = 0x00000000;
binbuff += this->passwd_lenPAD / sizeof(long);
*binbuff++ = this->engine;
if(this->dbname)
memcpy(binbuff, this->dbname, this->dbname_lenPAD);
else
*binbuff = 0x00000000;
binbuff += this->dbname_lenPAD / sizeof(long);
// zend_printf("this->xmlstruct_lenPAD=%i\n", this->xmlstruct_lenPAD);
if(this->xmlstruct)
memcpy(binbuff, this->xmlstruct, this->xmlstruct_lenPAD);
else
*binbuff = 0x00000000;
binbuff += this->xmlstruct_lenPAD / sizeof(long);
binbuff[0] = 0;
p = binbuff+1;
for(cc = this->firstcoll; cc; cc = cc->nextcoll)
{
binbuff[0]++;
p = cc->serialize_bin(p);
}
return(p);
}
CACHE_BASE::~CACHE_BASE()
{
// zend_printf("DELETE BASE\n");
CACHE_COLL *cc;
if(this->viewname)
EFREE(this->viewname);
if(this->host)
EFREE(this->host);
if(this->dbname)
EFREE(this->dbname);
if(this->user)
EFREE(this->user);
if(this->passwd)
EFREE(this->passwd);
if(this->xmlstruct)
EFREE(this->xmlstruct);
if(this->conn)
delete(this->conn);
while(this->firstcoll)
{
cc = this->firstcoll->nextcoll;
delete this->firstcoll;
this->firstcoll = cc;
}
}
// ---------------------------------------------------------------------------------------------------------------
// CACHE_SESSION
CACHE_SESSION::CACHE_SESSION(long session_id, SQLCONN *epublisher)
{
// zend_printf("NEW SESSION(%li)\n", session_id);
this->session_id = session_id;
this->epublisher = epublisher;
this->firstbase = NULL;
}
bool CACHE_SESSION::restore(long session_id)
{
// TSRMLS_FETCH();
char sql[256];
bool ret = false;
sprintf(sql, "SELECT session FROM cache WHERE session_id=%li", session_id);
SQLRES res(this->epublisher);
if(res.query(sql))
{
SQLROW *row = res.fetch_row();
if(row && row->field(0))
{
unsigned long *lengths = res.fetch_lengths();
if(lengths[0] > 0)
{
this->unserialize_bin(row->field(0));
ret = true;
}
}
}
return(ret);
}
#if(0)
bool CACHE_SESSION::save()
{
bool ret = false;
unsigned int binlen, sqllen;
char *sqlbuff;
char *binbuff;
binlen = this->serialize_bin(NULL); // obtient la taille maximum n<>cessaire
if(binbuff = (char *)EMALLOC(binlen))
{
binlen = this->serialize_bin((long *)binbuff); // obtient la taille r<>elle et s<>rialise
sqllen = epublisher->escape_string(binbuff, binlen, NULL); // obtient la taille maximum n<>cessaire
if(sqlbuff = (char *)EMALLOC(sqllen))
{
char *sql;
int l;
sqllen = epublisher->escape_string(binbuff, binlen, sqlbuff); // escape et obtient la taille r<>elle
l = sizeof("UPDATE cache SET session='' WHERE session_id=???????????") + sqllen;
if(sql = (char *)EMALLOC(l))
{
sprintf(sql, "UPDATE cache SET session='%s' WHERE session_id=%li", sqlbuff, this->session_id);
if(epublisher->query(sql))
{
if(epublisher->affected_rows() == 1)
ret = true;
}
EFREE(sql);
}
EFREE(sqlbuff);
}
EFREE(binbuff);
}
return(ret);
}
#else
bool CACHE_SESSION::save()
{
bool ret = false;
MYSQL_STMT *stmt;
MYSQL_BIND bind[2];
char *query = (char *)("UPDATE cache SET session=? WHERE session_id=?");
char *binbuff;
unsigned long binlen;
int session_id = this->session_id;
MYSQL *mysql = (MYSQL *)epublisher->get_native_conn();
//zend_printf("LINE %i <br/>\n", __LINE__);
if( (stmt = mysql_stmt_init(mysql)) )
{
//zend_printf("LINE %i <br/>\n", __LINE__);
if( (mysql_stmt_prepare(stmt, query, strlen(query))) == 0 )
{
//zend_printf("LINE %i <br/>\n", __LINE__);
binlen = this->get_binsize(); // obtient la taille maximum n<>cessaire
if(binbuff = (char *)EMALLOC(binlen))
{
//zend_printf("LINE %i <br/>\n", __LINE__);
binlen = this->serialize_bin((long *)binbuff); // s<>rialise et obtient la taille r<>elle
//zend_printf("LINE %i binlen=%li <br/>\n", __LINE__, binlen);
bind[0].buffer_type = MYSQL_TYPE_VAR_STRING;
bind[0].buffer = binbuff;
bind[0].buffer_length = binlen;
bind[0].is_null= 0;
bind[0].length= &binlen;
bind[1].buffer_type= MYSQL_TYPE_LONG;
bind[1].buffer= (char *)&session_id;
bind[1].is_null= 0;
bind[1].length= 0;
if (mysql_stmt_bind_param(stmt, bind) == 0)
{
//zend_printf("LINE %i <br/>\n", __LINE__);
if (mysql_stmt_execute(stmt) == 0)
{
//zend_printf("LINE %i <br/>\n", __LINE__);
if(mysql_stmt_affected_rows(stmt) == 1)
{
//zend_printf("LINE %i <br/>\n", __LINE__);
ret = true;
}
}
}
EFREE(binbuff);
}
}
mysql_stmt_close(stmt);
}
return(ret);
}
#endif
long CACHE_SESSION::get_binsize()
{
long binsize = sizeof(this->session_id) + sizeof(long);
CACHE_BASE *cb;
for(cb=this->firstbase; cb; cb = cb->nextbase)
binsize += cb->get_binsize();
return(binsize);
}
/*
CACHE_BASE *CACHE_SESSION::getCacheBase()
{
return (this->firstbase);
}
*/
SQLCONN *CACHE_SESSION::connect(long base_id)
{
CACHE_BASE *cb;
CACHE_COLL *cc;
SQLCONN *conn = NULL;
// zend_printf("trying to connect %i<br>\n", base_id);
for(cb=this->firstbase; cb; cb = cb->nextbase)
{
for(cc=cb->firstcoll; cc && cc->base_id != base_id; cc=cc->nextcoll)
;
if(cc)
break;
}
if(cb)
{
// zend_printf("trying to connect %i-%i<br>\n", base_id, cb->base_id);
if(cb->conn)
return(cb->conn);
return(cb->conn = new SQLCONN(cb->host, cb->port, cb->user, cb->passwd, cb->dbname));
// this->dump();
}
return(NULL);
}
long CACHE_SESSION::get_session_id()
{
return(this->session_id);
}
long CACHE_SESSION::get_local_base_id(long local_base_id, long distant_coll_id)
{
CACHE_BASE *cb;
for(cb=this->firstbase; cb && cb->base_id != local_base_id; cb = cb->nextbase)
;
if(cb)
return(cb->get_local_base_id(distant_coll_id));
return(-1);
}
/*
idem que la version du dessus, a la difference que local_base_id peut etre une coll fille et non la coll mere
plus d'explication : AS
*/
long CACHE_SESSION::get_local_base_id2(long local_base_id, long distant_coll_id)
{
CACHE_BASE *cb;
CACHE_COLL *cc;
for(cb=this->firstbase; cb; cb = cb->nextbase)
{
for(cc=cb->firstcoll; cc && cc->base_id != local_base_id; cc=cc->nextcoll)
;
if(cc)
break;
}
if(cb)
return(cb->get_local_base_id2(distant_coll_id));
return(-1);
}
long CACHE_SESSION::get_distant_coll_id(long local_base_id)
{
CACHE_BASE *cb;
CACHE_COLL *cc;
for(cb=this->firstbase; cb; cb = cb->nextbase)
{
for(cc=cb->firstcoll; cc && cc->base_id != local_base_id; cc = cc->nextcoll)
;
if(cc)
return(cc->coll_id);
}
return(-1);
}
void CACHE_SESSION::set_registered(long local_base_id, bool registered)
{
CACHE_BASE *cb;
CACHE_COLL *cc;
for(cb=this->firstbase; cb; cb = cb->nextbase)
{
for(cc=cb->firstcoll; cc && cc->base_id != local_base_id; cc = cc->nextcoll)
;
if(cc)
cc->registered = registered;
}
}
CACHE_BASE *CACHE_SESSION::addbase(long base_id, char *host, long port, char *user, char *passwd, char *dbname, char *xmlstruct, long sbas_id, char *viewname, bool online)
{
CACHE_BASE *cb, *ncb = new CACHE_BASE(base_id, host, port, user, passwd, dbname, xmlstruct, sbas_id, viewname, online);
for(cb=this->firstbase; cb && cb->nextbase; cb = cb->nextbase)
;
if(cb)
return(cb->nextbase = ncb);
else
return(this->firstbase = ncb);
}
void CACHE_SESSION::dump()
{
CACHE_BASE *cb;
zend_printf("<pre>+--session_id=%li\n", this->session_id);
for(cb = this->firstbase; cb; cb = cb->nextbase)
cb->dump();
zend_printf("+-- (session binsize=%li)\n", this->get_binsize());
zend_printf("</pre>\n");
}
void CACHE_SESSION::serialize_php(zval *result, bool everything)
{
CACHE_BASE *cb;
CACHE_COLL *cc;
bool basereg;
zval *zbaselist;
array_init(result);
add_assoc_long(result, (char *)"session_id", this->session_id);
MAKE_STD_ZVAL(zbaselist);
array_init(zbaselist);
for(cb = this->firstbase; cb; cb = cb->nextbase)
{
basereg = everything;
for(cc=cb->firstcoll; !basereg && cc; cc=cc->nextcoll)
basereg = cc->registered;
if(everything || (cb->online && basereg)) // on ne retourne pas les bases offline
cb->serialize_php(zbaselist, everything);
}
add_assoc_zval(result, (char *)"bases", zbaselist);
}
int CACHE_SESSION::serialize_bin(long *binbuff = NULL)
{
CACHE_BASE *cb;
unsigned int l = this->get_binsize();
long nbases = 0;
// int written;
long *p;
if(binbuff == NULL)
return(l); // on demande juste la taille maximum n<>cessaire
// zend_printf("CACHE_SESSION::serialize_bin()\n");
binbuff[0] = this->session_id;
binbuff[1] = 0;
p = binbuff+2;
for(cb = this->firstbase; cb; cb = cb->nextbase)
{
binbuff[1]++;
p = cb->serialize_bin(p);
}
// written = ((char *)p) - ((char *)(binbuff));
// zend_printf("CACHE_SESSION::serialize_bin returning l=%i, written=%i\n", l, written);
return(l);
}
void CACHE_SESSION::unserialize_bin(char *bin)
{
// zend_printf("CACHE_SESSION::unserialize_bin()\n");
unsigned long *p = (unsigned long *)bin;
this->session_id = p[0];
unsigned long nbases = p[1];
p += 2;
CACHE_BASE *cb;
while(nbases--)
{
long base_id = *p++;
long sbas_id = *p++;
bool online = *p++ ? true : false;
char *viewname = (char *)p;
p += LSTRPAD(strlen(viewname)) / sizeof(long);
char *host = (char *)p;
p += LSTRPAD(strlen(host)) / sizeof(long);
long port = *p++;
char *user = (char *)p;
p += LSTRPAD(strlen(user)) / sizeof(long);
char *passwd = (char *)p;
p += LSTRPAD(strlen(passwd)) / sizeof(long);
long engine = *p++;
char *dbname = (char *)p;
p += LSTRPAD(strlen(dbname)) / sizeof(long);
char *xmlstruct = (char *)p;
p += LSTRPAD(strlen(xmlstruct)) / sizeof(long);
unsigned long ncoll = *p++;
cb = this->addbase(base_id, host, port, user, passwd, dbname, xmlstruct, sbas_id, viewname, online);
while(ncoll--)
{
int l;
long coll_id = *p++;
long base_id = *p++;
// long phserver_port = *p++;
long registered = *p++;
char *name = (char *)p;
l = LSTRPAD(strlen(name));
p += l/sizeof(long);
#if GETPREFS
char *prefs = (char *)p;
l = LSTRPAD(strlen(prefs));
p += l/sizeof(long);
#endif
// char *phserver_host = (char *)p;
// l = LSTRPAD(strlen(phserver_host));
// p += l/sizeof(long);
// cb->addcoll(coll_id, base_id, name, phserver_host, phserver_port, registered ? true : false);
cb->addcoll(coll_id, base_id, name, prefs, registered ? true : false);
}
}
}
CACHE_SESSION::~CACHE_SESSION()
{
CACHE_BASE *cb;
// zend_printf("DELETE SESSION(%li)\n", this->session_id);
while(this->firstbase)
{
cb = this->firstbase->nextbase;
delete this->firstbase;
this->firstbase = cb;
}
return;
}

View File

@@ -1,97 +0,0 @@
#ifndef CACHE_H
#define CACHE_H 1
#include "sql.h" // define SQLCONN
class CACHE_COLL
{
public:
CACHE_COLL(long coll_id, long base_id, char *name, char *prefs, bool registered);
~CACHE_COLL();
friend class CACHE_BASE;
friend class CACHE_SESSION;
private:
bool registered;
void dump();
void serialize_php(zval *colllist);
long *serialize_bin(long *p);
long coll_id;
long base_id;
char *name;
char *prefs;
// char *phserver_host;
// long phserver_port;
class CACHE_COLL *nextcoll;
long binsize;
long name_lenPAD;
long prefs_lenPAD;
// long phserver_host_lenPAD;
long get_binsize();
};
class CACHE_BASE
{
public:
CACHE_BASE(long base_id, char *host, long port, char *user, char *passwd, char *dbname, char *xmlstruct, long sbas_id, char *viewname, bool online);
~CACHE_BASE();
CACHE_COLL *addcoll(long coll_id, long base_id, char *name, char *prefs, bool registered);
friend class CACHE_SESSION;
private:
bool online;
SQLCONN *conn;
long base_id;
long sbas_id;
char *host;
long host_lenPAD;
char *viewname;
long viewname_lenPAD;
long port;
char *user;
long user_lenPAD;
char *passwd;
long passwd_lenPAD;
long engine;
char *dbname;
long dbname_lenPAD;
char *xmlstruct;
long xmlstruct_lenPAD;
long binsize;
void dump();
void serialize_php(zval *zbaselist, bool everything);
long *serialize_bin(long *p);
CACHE_COLL *firstcoll;
class CACHE_BASE *nextbase;
long get_binsize();
long get_local_base_id(long distant_coll_id);
long get_local_base_id2(long distant_coll_id);
};
class CACHE_SESSION
{
public:
CACHE_SESSION(long session_id, SQLCONN *epublisher);
bool save();
bool restore(long session_id);
~CACHE_SESSION();
CACHE_BASE *addbase(long base_id, char *host, long port, char *user, char *passwd, char *dbname, char *xmlstruct, long sbas_id, char *viewname, bool online);
void dump();
void serialize_php(zval *result, bool everything);
// char *serialize_bin(unsigned int *lbin);
int serialize_bin(long *binbuff);
void unserialize_bin(char *bin);
long get_session_id();
long get_local_base_id(long local_base_id, long distant_coll_id);
long get_local_base_id2(long local_base_id, long distant_coll_id);
long get_distant_coll_id(long local_base_id);
SQLCONN *connect(long base_id);
void set_registered(long local_base_id, bool registered);
private:
SQLCONN *epublisher;
long session_id;
// long usr_id;
CACHE_BASE *firstbase;
long get_binsize();
// long *binbuff;
};
#endif

View File

@@ -1,54 +0,0 @@
#include "base_header.h"
#include "../php_phrasea2.h"
PHP_FUNCTION(phrasea_emptyw)
{
long zsession = -1, zbaseid = -1;
if(ZEND_NUM_ARGS()==2)
{
if(zend_parse_parameters(2 TSRMLS_CC, (char *)"ll", &zsession, &zbaseid) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
/*
if(!global_session || global_session->get_session_id() != zsession)
{
// zend_printf("bad global session : restoring<br>\n");
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0))
{
if(tmp_session->restore(zsession))
{
if(global_session)
delete global_session;
global_session = tmp_session;
}
}
}
*/
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != zsession)
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
SQLCONN *conn = PHRASEA2_G(global_session)->connect(zbaseid);
if(conn)
{
SQLRES res(conn);
if(res.query((char *)"SELECT word FROM emptyw"))
{
SQLROW *row;
array_init(return_value);
while(row = res.fetch_row())
{
add_assoc_long(return_value, row->field(0), 1);
}
}
}
}

View File

@@ -1,288 +0,0 @@
#include "base_header.h"
#include "../php_phrasea2.h"
#include "phrasea_clock_t.h"
typedef struct hbal
{
unsigned long offset;
bool closing;
}
HBAL;
char THEX[] = "0123456789ABCDEF";
ZEND_FUNCTION(phrasea_fetch_results)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
long zsession, zfirstanswer, znanswers;
long getxml = false;
char *markin=NULL, *markout=NULL;
int markin_l=0, markout_l=0;
zval *zanswers, *zanswer;
char tmpstr[1024]; // buffer pour formater les messages 'courts' (messages d'erreur...)
CHRONO chrono;
if(ZEND_NUM_ARGS()==3)
{
if(zend_parse_parameters(3 TSRMLS_CC, (char *)"lll", &zsession, &zfirstanswer, &znanswers) == FAILURE)
{
RETURN_FALSE;
}
}
else
{
if(ZEND_NUM_ARGS()==4)
{
if(zend_parse_parameters(4 TSRMLS_CC, (char *)"lllb", &zsession, &zfirstanswer, &znanswers, &getxml) == FAILURE)
{
RETURN_FALSE;
}
}
else
{
if(ZEND_NUM_ARGS()==6)
{
if(zend_parse_parameters(6 TSRMLS_CC, (char *)"lllbss", &zsession, &zfirstanswer, &znanswers, &getxml, &markin, &markin_l, &markout, &markout_l) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
}
}
// on a besoin de l'objet session uniquement si on demande le xml
if(getxml)
{
/*
if(!global_session || global_session->get_session_id() != zsession)
{
// zend_printf("bad global session : restoring<br>\n");
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0))
{
if(tmp_session->restore(zsession))
{
if(global_session)
delete global_session;
global_session = tmp_session;
}
}
}
*/
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != zsession)
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
}
sprintf(tmpstr, "UPDATE cache SET nact=nact+1, lastaccess=NOW() WHERE session_id=%li", zsession);
// zend_printf("tmpstr=%s<br>\n", tmpstr);
if(epublisher->query(tmpstr) && (epublisher->affected_rows() == 1))
{
SQLRES res(epublisher);
if(zfirstanswer < 1)
zfirstanswer = 1;
CACHE_ANSWER *panswer = NULL;
FILE *fp_answers = NULL;
unsigned int nanswers_incache = 0;
char *fname;
int l = strlen(PHRASEA2_G(tempPath))
+ 9 // "_phrasea."
+ strlen(epublisher->ukey)
+ 9 // ".answers."
+ 33 // zsession
+1; // '\0'
if( (fname = (char *)EMALLOC(l)) )
{
sprintf(fname, "%s_phrasea.%s.answers.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, zsession);
startChrono(chrono);
if( (fp_answers = fopen(fname, "rb")) )
{
unsigned int answer_index0 = zfirstanswer-1;
if( (fseek(fp_answers, answer_index0 * sizeof(CACHE_ANSWER), SEEK_SET)) == 0)
{
unsigned int nanswers_toread = znanswers;
if(panswer = (CACHE_ANSWER *)EMALLOC(nanswers_toread * sizeof(CACHE_ANSWER)))
{
nanswers_incache = fread(panswer, sizeof(CACHE_ANSWER), nanswers_toread, fp_answers);
CACHE_SPOT *pspot = NULL;
FILE *fp_spots = NULL;
unsigned int nspots_incache = 0;
unsigned int spot_index0 = 0;
sprintf(fname, "%s_phrasea.%s.spots.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, zsession);
if( (fp_spots = fopen(fname, "rb")) )
{
spot_index0 = panswer[0].spots_index;
if( fseek(fp_spots, spot_index0 * sizeof(CACHE_SPOT), SEEK_SET) == 0 )
{
unsigned int nspots_toread = 0;
for(unsigned int a=0; a < nanswers_incache; a++)
nspots_toread += panswer[a].nspots;
if( pspot = (CACHE_SPOT *)EMALLOC(nspots_toread * sizeof(CACHE_SPOT)) )
{
nspots_incache = fread(pspot, sizeof(CACHE_SPOT), nspots_toread, fp_spots);
}
}
fclose(fp_spots);
}
array_init(return_value);
add_assoc_double(return_value, (char *)"time_readCache", stopChrono(chrono));
char hex_status[16+1];
unsigned long long llstatus;
MAKE_STD_ZVAL(zanswers);
array_init(zanswers);
for(unsigned int a=0; a < nanswers_incache; a++)
{
MAKE_STD_ZVAL(zanswer);
array_init(zanswer);
add_assoc_long(zanswer, (char *)"base_id", panswer[a].bid);
add_assoc_long(zanswer, (char *)"record_id", panswer[a].rid);
add_assoc_long(zanswer, (char *)"parent_record_id", panswer[a].prid);
llstatus = panswer[a].llstatus;
memset(hex_status, '0', 17);
register char *p;
for(p=(hex_status+15); llstatus; p--)
{
*p = THEX[llstatus & 0x000000000000000F];
llstatus >>= 4;
}
add_assoc_stringl(zanswer, (char *)"status", hex_status, 16, TRUE);
// to debug -----------
// add_assoc_long(zanswer, (char *)"_spots_index", panswer[a].spots_index);
// add_assoc_long(zanswer, (char *)"_nspots", panswer[a].nspots);
// --------------------
if(getxml)
{
// zend_printf("nspots = %d \n", nspots);
//RETURN_FALSE;
//nspots = 0;
startChrono(chrono);
SQLCONN *conn = PHRASEA2_G(global_session)->connect(panswer[a].bid);
add_assoc_double(zanswer, (char *)"time_dboxConnect", stopChrono(chrono));
if(conn)
{
SQLRES res(conn);
sprintf(tmpstr, "SELECT xml FROM record WHERE record_id=%i", panswer[a].rid);
startChrono(chrono);
if(res.query(tmpstr))
{
add_assoc_double(zanswer, (char *)"time_xmlQuery", stopChrono(chrono));
SQLROW *row;
char *xml;
startChrono(chrono);
if(row = res.fetch_row())
{
add_assoc_double(zanswer, (char *)"time_xmlFetch", stopChrono(chrono));
unsigned long *siz = res.fetch_lengths();
unsigned long xmlsize = siz[0]+1;
// zend_printf("xmlsize=%li<br>\n", xmlsize);
// on compte les spots
unsigned long s0 = (panswer[a].spots_index - spot_index0);
// on dimensionne le xml highlight<68>
unsigned int nspots = panswer[a].nspots;
if(xml = (char *)EMALLOC(xmlsize + (nspots * (markin_l+markout_l))))
{
memcpy(xml, row->field(0), xmlsize);
// zend_printf("bid=%li, rid=%li ; xmlsize=%ld<br>\n", panswer[a].bid, panswer[a].rid, xmlsize);
if(nspots>0 && markin && markout)
{
HBAL *h;
if(h = (HBAL *)EMALLOC(2 * nspots * sizeof(HBAL)))
{
// on trie les spots en d<>croissant
unsigned int s, ss;
unsigned long t;
bool b;
for(s=0; s < nspots; s++)
{
h[s*2].offset = pspot[s0+s].start;
h[s*2].closing = false;
h[(s*2) + 1].offset = pspot[s0+s].start + pspot[s0+s].len;
h[(s*2) + 1].closing = true;
}
for(s=0; s<(nspots*2)-1; s++)
{
for(ss=s+1; ss<(nspots*2); ss++)
{
if(h[s].offset < h[ss].offset)
{
t = h[s].offset;
h[s].offset = h[ss].offset;
h[ss].offset = t;
b = h[s].closing;
h[s].closing = h[ss].closing;
h[ss].closing = b;
}
}
}
// on ins<6E>re les balises
for(s=0; s<nspots*2; s++)
{
// zend_printf("bid=%li, rid=%li ; fetch : h[%li] = {%li , %i}<br>\n", panswer[a].bid, panswer[a].rid, s, h[s].offset, h[s].closing);
if(h[s].closing && markout_l>0)
{
memmove(xml+h[s].offset+markout_l, xml+h[s].offset, xmlsize-h[s].offset);
memcpy(xml+h[s].offset, markout, markout_l);
xmlsize += markout_l;
}
else
{
if(!h[s].closing && markin_l>0)
{
memmove(xml+h[s].offset+markin_l, xml+h[s].offset, xmlsize-h[s].offset);
memcpy(xml+h[s].offset, markin, markin_l);
xmlsize += markin_l;
}
}
}
EFREE(h);
}
}
add_assoc_string(zanswer, (char *)"xml", xml, true);
EFREE(xml);
}
}
}
}
}
add_next_index_zval(zanswers, zanswer);
}
add_assoc_zval(return_value, (char *)"results", zanswers);
if(pspot)
EFREE(pspot);
EFREE(panswer);
}
}
fclose(fp_answers);
}
EFREE(fname);
}
}
}

View File

@@ -1,337 +0,0 @@
#include "base_header.h"
#include "../php_phrasea2.h"
/*
* renvoie un array avec les fils du grp pass<73> en param
*/
ZEND_FUNCTION(phrasea_grpchild)
{
zval zsession, zbaseid, zrid ;
char *zsit;
int zsitlen;
char *zusr;
int zusrlen;
long ztotalchildren;
long totchild = 0;
zval *zchild;
MAKE_STD_ZVAL(zchild);
array_init(zchild);
ztotalchildren = 0;
if(ZEND_NUM_ARGS()==5)
{
if(zend_parse_parameters(5 TSRMLS_CC, (char *)"lllss", &zsession, &zbaseid, &zrid, &zsit, &zsitlen, &zusr , &zusrlen) == FAILURE)
{
RETURN_FALSE;
}
}
else
{
if(ZEND_NUM_ARGS()==6)
{
if(zend_parse_parameters(6 TSRMLS_CC, (char *)"lllssl", &zsession, &zbaseid, &zrid, &zsit, &zsitlen, &zusr , &zusrlen,&ztotalchildren) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
}
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char sql[512];
SQLRES res(conn);
if(ztotalchildren)
{
sprintf(sql, "SELECT SUM(1) AS totalchildren FROM regroup,record WHERE rid_parent=%li AND rid_child=record.record_id", Z_LVAL(zrid));
if(res.query(sql))
{
if( res.get_nrows()==1 )
{
SQLROW *row;
if(row = res.fetch_row())
{
if( row->field(0) )
{
totchild = atoi(row->field(0));
}
}
}
}
}
sprintf(sql, "SELECT record_id,record.coll_id FROM regroup INNER JOIN (record INNER JOIN collusr ON site='%s' AND usr_id=%s AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND record.parent_record_id=0) ON (regroup.rid_child=record.record_id and regroup.rid_parent=%li) ORDER BY regroup.ord ASC, dateadd ASC, record_id ASC" ,zsit,zusr, Z_LVAL(zrid));
if(res.query(sql))
{
if( res.get_nrows()<1 )
{
RETURN_NULL();
}
else
{
SQLROW *row;
int nb=0;
while(row = res.fetch_row())
{
long current_bid = PHRASEA2_G(global_session)->get_local_base_id2( Z_LVAL(zbaseid) , atoi(row->field(1)) );
if(current_bid!=-1)
{
zval *ztmprec;
MAKE_STD_ZVAL(ztmprec);
array_init(ztmprec);
add_next_index_long(ztmprec, current_bid);
add_next_index_long(ztmprec, atoi(row->field(0)));
add_next_index_zval(zchild, ztmprec );
nb++;
}
}
if(nb==0)
RETURN_NULL();
if(ztotalchildren)
add_assoc_long (zchild, (char *)"totalchildren" ,totchild );
}
}
}
RETURN_ZVAL ( zchild, true, true );
}
ZEND_FUNCTION(phrasea_grpforselection)
{
// long highlightlen;
char *highlight = NULL;
zval zsession, zbaseid;
char *zridlist;
int zridlistlen;
char *zsit;
int zsitlen;
zval zusr;
zval *zchild;
MAKE_STD_ZVAL(zchild);
array_init(zchild);
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==5)
{
if(zend_parse_parameters(5 TSRMLS_CC, (char *)"llssl", &zsession, &zbaseid, &zridlist, &zridlistlen, &zsit, &zsitlen, &zusr) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
// on cherche la base dans le cache
// global_session->dump();
RETVAL_FALSE;
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char sql[2048];
SQLRES res(conn);
// sprintf(sql, "SELECT record_id,parent_record_id FROM record WHERE record_id=%i", Z_LVAL(zrid));
sprintf(sql, "SELECT record_id,record.coll_id, xml FROM (record INNER JOIN collusr ON record_id IN (%s) AND site='%s' AND usr_id=%ld AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND parent_record_id=record_id )", zridlist, zsit, Z_LVAL(zusr) );
if(res.query(sql))
{
if( res.get_nrows()<1 )
{
RETURN_NULL();
}
else
{
SQLROW *row;
int nb=0;
while(row = res.fetch_row())
{
long current_bid = PHRASEA2_G(global_session)->get_local_base_id2( Z_LVAL(zbaseid) , atoi(row->field(1)) );
if(current_bid!=-1)
{
zval *ztmprec;
MAKE_STD_ZVAL(ztmprec);
array_init(ztmprec);
add_next_index_long(ztmprec, current_bid);
add_next_index_long(ztmprec, atoi(row->field(0)));
add_next_index_string(ztmprec, ((char*)((row->field(2)))) , 1 );
//add_next_index_string(ztmprec, (row->field(2)) );
add_next_index_zval(zchild, ztmprec );
nb++;
}
}
if(nb==0)
RETURN_NULL();
}
}
}
RETURN_ZVAL ( zchild, true, true );
}
/*
* Donne les records parent d'un record pass<73> en param
*/
ZEND_FUNCTION(phrasea_grpparent)
{
// long highlightlen;
char *highlight = NULL;
zval zsession, zbaseid, zrid;
char *zsit;
int zsitlen;
zval zusr;
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==5)
{
if(zend_parse_parameters(5 TSRMLS_CC, (char *)"lllsl", &zsession, &zbaseid, &zrid, &zsit, &zsitlen, &zusr) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
RETVAL_FALSE;
zval *zprid;
MAKE_STD_ZVAL(zprid);
array_init(zprid);
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char sql[512];
SQLRES res(conn);
sprintf(sql, "SELECT record.record_id, record.coll_id FROM regroup INNER JOIN (record INNER JOIN collusr ON site='%s' AND usr_id=%ld AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND record.parent_record_id=record.record_id) ON (regroup.rid_parent=record.record_id) WHERE rid_child=%ld", zsit , Z_LVAL(zusr) ,Z_LVAL(zrid));
//zend_printf("SQL : %s\n", sql );
// sprintf(sql, "select rid_parent from regroup where rid_child=%i", Z_LVAL(zrid));
if(res.query(sql))
{
if( res.get_nrows()<1 )
{
RETURN_NULL();
}
else
{
SQLROW *row;
int nb = 0 ;
while(row = res.fetch_row())
{
//add_next_index_long(zprid, atoi(row->field(0)));
long current_bid = PHRASEA2_G(global_session)->get_local_base_id2( Z_LVAL(zbaseid) , atoi(row->field(1)) );
if(current_bid!=-1)
{
zval *ztmprec;
MAKE_STD_ZVAL(ztmprec);
array_init(ztmprec);
add_next_index_long(ztmprec, current_bid);
add_next_index_long(ztmprec, atoi(row->field(0)));
add_next_index_zval(zprid, ztmprec );
nb++;
}
}
if(nb==0)
RETURN_NULL();
}
}
}
RETURN_ZVAL ( zprid, true, true );
}
/*
* pour un record pass<73> en param :
* TRUE : le record pass<73> en param est une fiche grp
* FALSE : le record est un doc simple, pas une fiche grp
*/
ZEND_FUNCTION(phrasea_isgrp)
{
// long highlightlen;
char *highlight = NULL;
zval zsession, zbaseid, zrid;
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==3)
{
if(zend_parse_parameters(3 TSRMLS_CC, (char *)"lll", &zsession, &zbaseid, &zrid) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
// on cherche la base dans le cache
// global_session->dump();
RETVAL_FALSE;
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char sql[256];
SQLRES res(conn);
sprintf(sql, "SELECT record_id,parent_record_id FROM record WHERE record_id=%li", Z_LVAL(zrid));
if(res.query(sql))
{
SQLROW *row;
if(row = res.fetch_row())
{
if( atoi(row->field(1))==atoi(row->field(0)) )
{
RETVAL_TRUE;
}
}
}
}
}

View File

@@ -1,42 +0,0 @@
#include "base_header.h"
#include "phrasea_clock_t.h"
#ifndef COMPILE_DL_PHRASEA2
#error COMPILE_DL_PHRASEA2 is false
#endif
# ifdef PHP_WIN32
void startChrono(CHRONO &chrono)
{
chrono = GetTickCount();
}
double stopChrono(CHRONO &chrono)
{
return((double)(GetTickCount()-chrono) / 1000.0);
}
# else
void startChrono(CHRONO &chrono)
{
gettimeofday(&chrono, NULL);
return;
}
double stopChrono(CHRONO &chrono)
{
struct timeval t;
gettimeofday(&t, NULL);
t.tv_sec -= chrono.tv_sec;
t.tv_usec -= chrono.tv_usec;
if(t.tv_usec < 0)
{
t.tv_sec--;
t.tv_usec += 1000000;
}
return((double)(t.tv_sec) + ((double)(t.tv_usec))/1000000);
}
#endif

View File

@@ -1,20 +0,0 @@
/*
* phrasea_clock_t.h
*
* Created on: 4 mars 2010
* Author: gaulier
*/
#ifndef PHRASEA_CLOCK_T_H_
#define PHRASEA_CLOCK_T_H_
#ifdef PHP_WIN32
typedef DWORD CHRONO;
#else
typedef struct timeval CHRONO;
#endif
void startChrono(CHRONO &chrono);
double stopChrono(CHRONO &chrono);
#endif /* PHRASEA_CLOCK_T_H_ */

View File

@@ -1,23 +0,0 @@
// fichier phrasea_engine.h
#include "_VERSION.h"
#include "phrasea_types.h"
#include "cache.h"
#include "sql.h"
//#include "../phrasea_engine/cache.h"
/*
//extern "C" {
#include "trace_memory.h"
#ifdef PGSUPPORT
#include "libpq-fe.h"
#endif
#include "mysql.h"
#include "phrasea_types.h"
#include "sql.h"
#include "cache.h"
// }
*/

View File

@@ -1,247 +0,0 @@
#ifdef __ppc__ // os x
# define PH_INT32 int
# define PH_INT64 long long
# define PH_ATOI64(s) atoll(s)
#else
# ifdef WIN32 // windows
# define PH_INT32 int
# define PH_INT64 __int64
# define PH_ATOI64(s) _atoi64(s)
# else // linux ?
# define PH_INT32 int
# define PH_INT64 __int64
# define PH_ATOI64(s) _atoi64(s)
# endif
#endif
// #define int PH_INT32
/* definition portable des structures systeme a denomination variable */
#ifndef PHRASEA_TIMEB
# ifdef noPHP_WIN32
# define PHRASEA_TIMEB struct _timeb
# define PHRASEA_FTIME _ftime
# define PHRASEA_GET_MS millisec_diff
# else
# define PHRASEA_TIMEB clock_t
# define PHRASEA_FTIME phrasea_get_ticks
# define PHRASEA_GET_MS phrasea_getclockinterval
// ******* tosee : ligne mise en remarque pour warning win32
# endif
#endif
#ifndef true
#define true TRUE
#endif
#ifndef false
#define false FALSE
#endif
#ifndef NONULLSTRING
#define NONULLSTRING(x) ((x)?(x):"")
#endif
#define PHRASEA_MYSQLENGINE 0
#define PHRASEA_PGSQLENGINE 1
#define PHRASEA_OP_NULL -1
#define PHRASEA_OP_OR 1
#define PHRASEA_OP_AND 2
#define PHRASEA_KW_ALL 3
#define PHRASEA_KW_LAST 4
#define PHRASEA_OP_EXCEPT 5
#define PHRASEA_OP_NEAR 6
#define PHRASEA_OP_BEFORE 7
#define PHRASEA_OP_AFTER 8
#define PHRASEA_OP_IN 9
#define PHRASEA_OP_EQUAL 10
#define PHRASEA_OP_NOTEQU 11
#define PHRASEA_OP_GT 12
#define PHRASEA_OP_LT 13
#define PHRASEA_OP_GEQT 14
#define PHRASEA_OP_LEQT 15
#define PHRASEA_OP_COLON 16
#define PHRASEA_KEYLIST 17
#define PHRASEA_KW_FIRST 18
#define MAXHITLENGTH 14
#define DEFAULTLAST 12
enum { PHRASEA_MULTIDOC_DOCONLY=0, PHRASEA_MULTIDOC_REGONLY };
enum { PHRASEA_ORDER_DESC=0, PHRASEA_ORDER_ASC=1, PHRASEA_ORDER_ASK=2 };
typedef struct collid_pair
{
long local_base_id; // id de base locale (champ 'base_id' dans la table 'bas' de la base 'phrasea' locale)
long distant_coll_id; // id de collection distante (champ 'coll_id' dans la table 'coll' de la base distante)
}
COLLID_PAIR;
typedef struct spot
{
int start;
int len;
struct spot *nextspot;
}
SPOT;
typedef struct hit
{
int iws;
int iwe;
// char hit[MAXHITLENGTH+1];
struct hit *nexthit;
}
HIT;
class CSHA256
{
private:
unsigned char _v[65];
public:
CSHA256()
{
memset(this->_v, 0, sizeof(this->_v));
}
~CSHA256()
{
}
CSHA256 &operator=(const unsigned char *v)
{
memset(this->_v, 0, sizeof(this->_v));
if(v)
{
unsigned char *p=this->_v;
for(register int i=0 ; i<64 && *v; i++)
*p++ = *v++;
}
return *this;
}
CSHA256 &operator=(const CSHA256 &rhs)
{
memcpy(this->_v, rhs._v, sizeof(this->_v));
return *this;
}
bool operator==(const CSHA256 &rhs)
{
return(strcmp((const char *)(this->_v), (const char *)(rhs._v))==0);
}
bool operator!=(const CSHA256 &rhs)
{
return(!(*this==rhs));
}
operator const char *()
{
return((const char *)(this->_v));
}
};
typedef struct answer
{
int rid;
int prid;
int cid;
unsigned long long llstatus; // 64 bits
CSHA256 osha256;
HIT *firsthit, *lasthit;
SPOT *firstspot, *lastspot;
int nspots;
// SPOT *spots;
// int *sqloffsets;
struct answer *nextanswer;
}
ANSWER;
typedef struct keyword
{
char *kword;
struct keyword *nextkeyword;
}
KEYWORD;
typedef struct s_node
{
int type;
bool isempty;
ANSWER *firstanswer, *lastanswer;
int nbranswers;
int nleaf;
double time_C;
double time_sqlQuery, time_sqlStore, time_sqlFetch;
union
{
struct
{
int v;
} numparm;
struct
{
char *kword;
} leaf;
struct
{
KEYWORD *firstkeyword, *lastkeyword;
} multileaf;
struct
{
struct s_node *l;
struct s_node *r;
int numparm;
} boperator;
struct
{
char *fieldname;
char *strvalue;
double dblvalue;
} voperator;
}
content;
}
NODE;
// les structures 'calqu?es' des donn?es en cache
typedef struct cache_spot
{
unsigned int start;
unsigned int len;
}
CACHE_SPOT;
typedef struct cache_answer
{
int rid;
int prid;
int bid;
unsigned long long llstatus; // 64 bits
unsigned int spots_index;
unsigned int nspots;
}
CACHE_ANSWER;
// impl?mentation d'une resource "phrasea_connection" : en fait une connexion ? pg ou mysql
// http://groups.google.fr/groups?q=zend_register_list_destructors_ex+persistent&hl=fr&lr=&ie=UTF-8&selm=cvshelly1039456453%40cvsserver&rnum=8
typedef struct _php_phrasea_conn
{
int sqlengine;
union
{
#ifdef PGSUPPORT
PGconn *pgsql_conn;
#endif
MYSQL mysql_conn;
}
sqlconn;
int mysql_active_result_id;
}
PHP_PHRASEA_CONN;

View File

@@ -1,29 +0,0 @@
/* inclusion de l'ent<6E>te de base phrasea */
#include "base_header.h"
// trier un tableau d'entiers
void sort_int(int nint, int *tint)
{
register int i,j,tmp;
for(i=0; i<nint-1; i++)
{
for(j=i+1; j<nint; j++)
{
if(tint[j] < tint[i])
{
tmp = tint[i];
tint[i] = tint[j];
tint[j] = tmp;
}
}
}
}
# ifdef PHP_WIN32
int millisec_diff(struct _timeb *timestart, struct _timeb *timeend)
{
return((1000 * (timeend->time - timestart->time)) + (timeend->millitm - timestart->millitm));
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,426 +0,0 @@
#include "base_header.h"
#include "phrasea_clock_t.h"
#include "../php_phrasea2.h"
NODE *arr2tree(zval **root, int depth);
NODE *qtree2tree(zval **root, int depth);
void arrdump(zval **root, int depth);
void dumptree(NODE *n);
void freetree(NODE *n);
NODE *poptree(NODE *n);
// int poptree(NODE *n);
void freehits(ANSWER *a);
void freeanswer(ANSWER *a);
void querytree2(NODE *n, int depth, SQLCONN *sqlconn, zval *result, long multidocMode);
void setError(int errtype, char *errstr, int errnum);
void sort_int(int nint, int *tint);
//int PHRASEA_GET_MS(struct _timeb *timestart, struct _timeb *timeend);
ZEND_FUNCTION(phrasea_query2)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
zval zsession, zsbasid, *zqarray, *zcolllist;
zval zuserid;
TRACELOG("hello world I'm phrasea_query2");
char tmpstr[10240]; // buffer pour formater les messages 'courts' (messages d'erreur...)
char *zsite;
int zsitelen;
// char *zuserid;
// long zuseridlen;
int id = -1;
int i, ncoll, len;
NODE *query;
// ANSWER *answer;
// HIT *hit;
// SPOT *spot;
bool conn_ok = TRUE;
// zval *zanswers, *zanswer, *zspots, *zspot;
zval **tmp1;
char *sqlcoll; // un petit bout de sql qui filtre les collection
long znoCache = 0;
long zmultidocMode = PHRASEA_MULTIDOC_DOCONLY;
char *prec; // "
COLLID_PAIR *t_collid_pair = NULL;
switch(ZEND_NUM_ARGS())
{
case 8: // session, baseid, collist, quarray, site, userid, noCache, multidocMode
if(zend_parse_parameters(8 TSRMLS_CC, (char *)"llaaslbl", &zsession, &zsbasid, &zcolllist, &zqarray, &zsite, &zsitelen, &zuserid, &znoCache, &zmultidocMode) == FAILURE)
{
RETURN_FALSE;
}
if(zsitelen > 32)
zsite[32] = '\0';
// if(zuseridlen > 64)
// zuserid[64] = '\0';
// on construit le bout de sql qui joint record et collusr
switch(zmultidocMode)
{
/* ===== ANCIEN MULTIDOC ===============
case PHRASEA_MULTIDOC_REPONLY:
sprintf(sqltrec, "(record INNER JOIN collusr ON site='%s' AND usr_id='%s' AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND parent_record_id=0)", zsite, zuserid);
break;
case PHRASEA_MULTIDOC_DOCONLY:
sprintf(sqltrec, "(record INNER JOIN collusr ON site='%s' AND usr_id='%s' AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND parent_record_id<>0)", zsite, zuserid);
break;
case PHRASEA_MULTIDOC_OLDSTYLE:
sprintf(sqltrec, "(record INNER JOIN collusr ON site='%s' AND usr_id='%s' AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND (parent_record_id=0 OR parent_record_id=record_id))", zsite, zuserid);
break;
default:
case PHRASEA_MULTIDOC_ALL:
sprintf(sqltrec, "(record INNER JOIN collusr ON site='%s' AND usr_id='%s' AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0)", zsite, zuserid);
break;
========================================= */
/* ======== REGROUPEMENT MAI 2006 ==========*/
case PHRASEA_MULTIDOC_REGONLY:
// sprintf(sqltrec, "(record INNER JOIN collusr ON site='%s' AND usr_id='%ld' AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND record.parent_record_id=record.record_id)", zsite, Z_LVAL(zuserid));
// sprintf(sqltrec, "(record INNER JOIN _tmpmask ON _tmpmask.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND record.parent_record_id=record.record_id)");
prec = "record.record_id";
break;
default:
case PHRASEA_MULTIDOC_DOCONLY:
// sprintf(sqltrec, "(record INNER JOIN collusr ON site='%s' AND usr_id='%ld' AND collusr.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND record.parent_record_id=0)", zsite, Z_LVAL(zuserid));
//sprintf(sqltrec, "(record INNER JOIN _tmpmask ON _tmpmask.coll_id=record.coll_id AND ((status ^ mask_xor) & mask_and)=0 AND record.parent_record_id=0)");
prec = "0";
break;
}
// zend_printf("<!-- sqltrec=%s -->\n", sqltrec);
break;
default:
WRONG_PARAM_COUNT;
break;
}
//sprintf(sqltrec, "(record)");
/*
if(!global_session || global_session->get_session_id() != Z_LVAL(zsession))
{
// zend_printf("bad global session : restoring<br>\n");
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0))
{
if(tmp_session->restore(Z_LVAL(zsession)))
{
if(global_session)
delete global_session;
global_session = tmp_session;
}
}
}
*/
//zend_printf("173\n");
// RETURN_FALSE;
//zend_printf("173 , %ld , %ld \n", PHRASEA2_G(global_session)->get_session_id(), Z_LVAL(zsession));
// RETURN_FALSE;
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
// zend_printf("179 \n");
SQLRES res(epublisher);
// on remplace la liste de collections 'locales' (ids de bases) en liste de collections distantes (ids de colls)
sqlcoll = NULL;
if(Z_TYPE_PP(&zcolllist) == IS_ARRAY)
{
// on calcule la taille pour <20>crire tous les num<75>ros de coll distants
for(ncoll=i=0; TRUE; i++)
{
if(zend_hash_index_find(HASH_OF(zcolllist), i, (void **) &tmp1)==SUCCESS && Z_TYPE_PP(tmp1)==IS_LONG)
{
long distant_coll_id = PHRASEA2_G(global_session)->get_distant_coll_id(Z_LVAL_P(*tmp1));
if(distant_coll_id != -1)
ncoll++;
}
else
break;
}
// on alloue et on relit
len = 0;
if(t_collid_pair = (COLLID_PAIR *)EMALLOC(ncoll * sizeof(COLLID_PAIR)))
{
for(ncoll=i=0; TRUE; i++)
{
if(zend_hash_index_find(HASH_OF(zcolllist), i, (void **) &tmp1)==SUCCESS && Z_TYPE_PP(tmp1)==IS_LONG)
{
long distant_coll_id = PHRASEA2_G(global_session)->get_distant_coll_id(Z_LVAL_P(*tmp1));
if(distant_coll_id != -1)
{
t_collid_pair[ncoll].local_base_id = Z_LVAL_P(*tmp1);
t_collid_pair[ncoll].distant_coll_id = distant_coll_id;
len += sprintf(tmpstr, "%li", distant_coll_id);
ncoll++;
}
// zend_printf("t_collid_pair[%li]={%i, %li}\n", i, t_collid_pair[i].local_base_id, t_collid_pair[i].distant_coll_id);
}
else
break;
}
}
else
{
// ALLOC ERROR
ncoll = 0;
}
if(ncoll > 0)
{
// on construit le bout de sql qui filtre sur les collections
/*
if(ncoll == 1)
len += (sizeof(" record.coll_id=")-1) + 1;
else
len += (sizeof(" record.coll_id IN (")-1) + (ncoll-1) + (sizeof(")")-1) + 1;
if(sqlcoll = (char *)(EMALLOC(len)))
{
if(ncoll == 1)
sprintf(sqlcoll, " record.coll_id=%li", t_collid_pair[0].distant_coll_id);
else
{
len = sprintf(sqlcoll, " record.coll_id IN (");
for(i=0; i<ncoll; i++)
{
if(i>0)
sqlcoll[len++] = ',';
len += sprintf(sqlcoll+len, "%li", t_collid_pair[i].distant_coll_id);
}
sprintf(sqlcoll+len, ")");
}
*/
if(ncoll == 1)
len += (sizeof(" coll_id=")-1) + 1;
else
len += (sizeof(" coll_id IN (")-1) + (ncoll-1) + (sizeof(")")-1) + 1;
if(sqlcoll = (char *)(EMALLOC(len)))
{
if(ncoll == 1)
sprintf(sqlcoll, " coll_id=%li", t_collid_pair[0].distant_coll_id);
else
{
len = sprintf(sqlcoll, " coll_id IN (");
for(i=0; i<ncoll; i++)
{
if(i>0)
sqlcoll[len++] = ',';
len += sprintf(sqlcoll+len, "%li", t_collid_pair[i].distant_coll_id);
}
sprintf(sqlcoll+len, ")");
}
TRACELOG(sqlcoll);
// zend_printf("SQL=%s<br>\n", sqlcoll);
// on r<>cup l'adresse de la base distante
// sprintf(tmpstr, "SELECT base_id, server_host, server_port, server_sqlengine, server_dbname, server_user, server_pwd, server_coll_id FROM bas WHERE base_id=%li", Z_LVAL(zbaseid));
sprintf(tmpstr, "SELECT sbas_id, host, port, sqlengine, dbname, user, pwd FROM sbas WHERE sbas_id=%li", Z_LVAL(zsbasid));
// zend_printf("%s \n", tmpstr);
if(res.query(tmpstr))
{
// zend_printf("SQL=%s<br>\n", tmpstr);
SQLROW *row = res.fetch_row();
if(row)
{
// on se connecte sur la base distante
SQLCONN *conn = new SQLCONN(row->field(1), atoi(row->field(2)), row->field(5), row->field(6), row->field(4));
if(conn && conn->isok())
{
sprintf(tmpstr, "CREATE TEMPORARY TABLE _tmpmask SELECT coll_id, mask_xor, mask_and FROM collusr WHERE site='%s' AND usr_id='%ld' AND %s", zsite, Z_LVAL(zuserid), sqlcoll);
conn->query(tmpstr);
sprintf(tmpstr, "CREATE INDEX coll_id ON _tmpmask(coll_id)");
conn->query(tmpstr);
// on transforme la query en php en arbre de nodes
query = qtree2tree(&zqarray, 0);
// ici on interroge phrasea !
querytree2(query, 0, conn, return_value, zmultidocMode);
conn->query("DROP TABLE _tmpmask");
if(!znoCache)
{
// on s<>rialise les r<>sultats en binaire
ANSWER *answer;
SPOT *spot;
int n_answers=0, n_spots=0;
for(answer=query->firstanswer; answer; answer=answer->nextanswer)
{
if(answer->nextanswer && answer->nextanswer->osha256 != answer->osha256)
{
ANSWER *a, *pa;
for(a=(pa=answer->nextanswer)->nextanswer; a; pa=a,a=a->nextanswer)
{
if(a->osha256 == answer->osha256)
{
pa->nextanswer = a->nextanswer;
a->nextanswer = answer->nextanswer;
answer->nextanswer = a;
a = pa;
}
}
}
}
//for(answer=query->firstanswer; answer; answer=answer->nextanswer)
// zend_printf("(%d) : rid=%d, sha='%s'<br/>\n", __LINE__, answer->rid, (const char *)(answer->osha256) ) ;
for(answer=query->firstanswer; answer; answer=answer->nextanswer)
{
n_answers++;
answer->nspots = 0;
for(spot=answer->firstspot; spot; spot = spot->nextspot)
{
n_spots++;
answer->nspots++;
}
}
CHRONO chrono;
startChrono(chrono);
if(n_answers > 0)
{
int answer_binsize, spot_binsize;
CACHE_ANSWER *answer_binbuff=NULL;
CACHE_SPOT *spot_binbuff=NULL;
answer_binsize = n_answers * sizeof(CACHE_ANSWER);
spot_binsize = n_spots * sizeof(CACHE_SPOT);
// pour calculer les offsets de spots, il faut savoir combien de spots sont d<>j<EFBFBD> dans la table
unsigned int spot_index = 0;
FILE *fp_spots=NULL, *fp_answers=NULL;
char *fname;
int l = strlen(PHRASEA2_G(tempPath))
+ 9 // "_phrasea."
+ strlen(epublisher->ukey)
+ 9 // ".answers."
+ 33 // zsession
+1; // '\0'
if( (fname = (char *)EMALLOC(l)) )
{
if(n_spots > 0)
{
sprintf(fname, "%s_phrasea.%s.spots.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, Z_LVAL(zsession));
if( (fp_spots = fopen(fname, "ab")) )
{
// to set the offset of spots, we must know how much are already in file
fseek(fp_spots, 0, SEEK_END);
spot_index = ftell(fp_spots) / sizeof(CACHE_SPOT);
// zend_printf("%s : ftell=%li ; index=%li <br/>\n", fname, ftell(fp_spots), spot_index);
}
}
sprintf(fname, "%s_phrasea.%s.answers.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, Z_LVAL(zsession));
if( (fp_answers = fopen(fname, "ab")) )
{
;
}
EFREE(fname);
}
if((answer_binbuff = (CACHE_ANSWER *)EMALLOC(answer_binsize)) && (n_spots==0 || (spot_binbuff = (CACHE_SPOT *)EMALLOC(spot_binsize))))
{
CACHE_ANSWER *panswer = answer_binbuff;
CACHE_SPOT *pspot = spot_binbuff;
long current_cid = -1;
long current_bid = -1;
for(answer=query->firstanswer; answer; answer=answer->nextanswer)
{
if(answer->cid != current_cid)
{
// on change de collection, on cherche l'id de la base locale correspondante
current_bid = -1;
for(int i=0; i<ncoll; i++)
{
if(t_collid_pair[i].distant_coll_id == answer->cid)
{
current_bid = t_collid_pair[i].local_base_id;
break;
}
}
}
//zend_printf("rid=%d ; spot_index = %d (nspots=%d) ", answer->rid, spot_index, answer->nspots);
panswer->rid = answer->rid;
panswer->prid = answer->prid;
panswer->llstatus = answer->llstatus;
panswer->bid = current_bid;
panswer->spots_index = spot_index;
panswer->nspots = answer->nspots;
// spot_offset += answer->nspots * sizeof(CACHE_SPOT);
spot_index += answer->nspots;
//zend_printf(" -:: spot_index=%d <br/>\n", spot_index);
for(spot=answer->firstspot; spot; spot = spot->nextspot)
{
//zend_printf("start=%d, len=%d <br/>\n", spot->start, spot->len);
pspot->start = spot->start;
pspot->len = spot->len;
//zend_printf("start=%d, len=%d <br/>\n", pspot->start, pspot->len);
pspot++;
}
// zend_printf("p_rid=%d ; p_spots_index = %d <br/>\n", panswer->rid, panswer->spots_index);
panswer++;
}
TRACELOG("hello world I'm phrasea_query2");
if(fp_answers)
{
fwrite((const void *)answer_binbuff, 1, answer_binsize, fp_answers);
fclose(fp_answers);
}
if(fp_spots)
{
fwrite((const void *)spot_binbuff, 1, spot_binsize, fp_spots);
fclose(fp_spots);
}
EFREE(answer_binbuff);
}
else
{
// pb d'allocation !
if(answer_binbuff)
EFREE(answer_binbuff);
if(spot_binbuff)
EFREE(spot_binbuff);
}
} // if(n_answers > 0)
add_assoc_double(return_value, (char *)"time_writeCache", stopChrono(chrono));
} // if(!noCache)
TRACELOG("hello world I'm phrasea_query2");
// on lib<69>re l'arbre
freetree(query);
TRACELOG("hello world I'm phrasea_query2");
}
if(conn)
delete conn;
}
}
TRACELOG("hello world I'm phrasea_query2");
EFREE(sqlcoll);
}
}
if(t_collid_pair)
EFREE(t_collid_pair);
}
TRACELOG("hello world I'm phrasea_query2");
}

View File

@@ -1,578 +0,0 @@
#include "base_header.h"
#include "../php_phrasea2.h"
ZEND_FUNCTION(phrasea_list_bases)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
char sql[1024];
ZVAL_BOOL(return_value, FALSE);
if(ZEND_NUM_ARGS() != 0)
{
WRONG_PARAM_COUNT;
}
// zend_printf("-------\n");
if(!epublisher)
RETURN_FALSE;
// on cherche la liste des bases publi<6C>es
SQLRES res(epublisher);
// if(res.query("SELECT base_id, server_host, server_port, server_sqlengine, server_dbname, server_user, server_pwd, server_coll_id FROM bas WHERE active>0 ORDER BY server_host, server_port, server_dbname"))
if(res.query((char *)"SELECT base_id, host, port, dbname, user, pwd, server_coll_id, sbas.sbas_id, viewname FROM (sbas INNER JOIN bas ON bas.sbas_id=sbas.sbas_id) WHERE active>0 ORDER BY sbas.ord, sbas.sbas_id, bas.ord"))
{
long last_sbas_id=0, sbas_id;
char *viewname;
SQLROW *row;
SQLCONN *conn = NULL;
long basid;
// zend_printf("0\n");
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0, epublisher))
{
// zend_printf("1\n");
CACHE_BASE *cache_base = NULL;
while(row = res.fetch_row())
{
// zend_printf("2\n");
basid = atol(row->field(0));
sbas_id = atol(row->field(7));
viewname = (row->field(8) && strlen(row->field(8))>0) ? row->field(8) : row->field(3);
if(sbas_id != last_sbas_id)
{
// zend_printf("3\n");
last_sbas_id = sbas_id;
// on a chang<6E> de base phrasea
if(conn)
delete conn;
int engine = PHRASEA_MYSQLENGINE;
conn = new SQLCONN(row->field(1), atoi(row->field(2)), row->field(4), row->field(5), row->field(3));
if(conn && conn->isok())
{
// zend_printf("4\n");
SQLRES res2(conn);
if(res2.query((char *)"SELECT value AS struct FROM pref WHERE prop='structure' LIMIT 1;"))
{
SQLROW *row2 = res2.fetch_row();
if(row2)
cache_base = tmp_session->addbase(basid, row->field(1), atol(row->field(2)), row->field(4), row->field(5), row->field(3), row2->field(0), sbas_id, viewname, true);
else
cache_base = tmp_session->addbase(basid, row->field(1), atol(row->field(2)), row->field(4), row->field(5), row->field(3), NULL, sbas_id, viewname, true);
}
else
cache_base = tmp_session->addbase(basid, row->field(1), atol(row->field(2)), row->field(4), row->field(5), row->field(3), NULL, sbas_id, viewname, true);
}
else
{
cache_base = tmp_session->addbase(basid, row->field(1), atol(row->field(2)), row->field(4), row->field(5), row->field(3), NULL, sbas_id, viewname, false);
}
}
// ici pour chaque base / collections
if(conn && conn->isok())
{
// zend_printf("5\n");
SQLRES res(conn);
long collid = atol(row->field(6));
// sprintf(sql, "SELECT asciiname, phserver_host, phserver_port, prefs FROM coll WHERE coll_id=%s", row->field(6));
sprintf(sql, "SELECT asciiname, prefs FROM coll WHERE coll_id=%s", row->field(6));
if(res.query(sql))
{
SQLROW *row = res.fetch_row();
// zend_printf("asciiname='%s'<br>\n" , row->field(0) );
if(cache_base)
cache_base->addcoll(collid, basid, row->field(0), (char *)(row->field(1)?row->field(1):""), false);
}
}
}
// tmp_session->dump();
// zend_printf("6\n");
if(conn)
delete conn;
// on s<>rialize la session tmp en php
tmp_session->serialize_php(return_value, true); // on liste TOUT (y compris les offline et les non registered)
delete tmp_session;
}
else
RETURN_FALSE;
}
else
RETURN_FALSE;
}
ZEND_FUNCTION(phrasea_clear_cache)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
zval zsesid;
char sql[1024];
int sesid = -1;
ZVAL_BOOL(return_value, FALSE);
if(ZEND_NUM_ARGS()==1)
{
if(zend_parse_parameters(1 TSRMLS_CC, (char *)"l", &zsesid) == FAILURE)
RETURN_FALSE;
}
else
WRONG_PARAM_COUNT;
if(epublisher)
{
if(Z_LVAL(zsesid) != 0)
{
// on a pass<73> une session, on v<>rifie si elle existe
// sprintf(sql, "UPDATE cache SET nact=nact+1, lastaccess=NOW(), answers='', spots='' WHERE session_id=%ld", Z_LVAL(zsesid));
sprintf(sql, "UPDATE cache SET nact=nact+1, lastaccess=NOW() WHERE session_id=%ld", Z_LVAL(zsesid));
if(epublisher->query(sql))
{
if(epublisher->affected_rows() == 1)
{
char *fname;
//zend_printf("uky=%s (l=%d)<br/>\n", epublisher->ukey, strlen(epublisher->ukey));
//zend_printf("tmp=%s<br/>\n", PHRASEA2_G(tempPath));
// zend_printf("tmp=%s (l=%d)<br/>\n", tempPathBuffer, strlen(tempPathBuffer));
//RETURN_FALSE;
int l = strlen(PHRASEA2_G(tempPath))
+ 9 // "_phrasea."
+ strlen(epublisher->ukey)
+ 9 // ".answers."
+ 33 // zsession
+1; // '\0'
if( (fname = (char *)EMALLOC(l)) )
{
// sprintf(fname, "%s_phrasea.answers.%ld.bin", tempPathBuffer, Z_LVAL(zsesid));
sprintf(fname, "%s_phrasea.%s.answers.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, Z_LVAL(zsesid));
remove(fname);
// sprintf(fname, "%s_phrasea.spots.%ld.bin", tempPathBuffer, Z_LVAL(zsesid));
sprintf(fname, "%s_phrasea.%s.spots.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, Z_LVAL(zsesid));
remove(fname);
EFREE(fname);
}
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0, epublisher))
{
if(tmp_session->restore(Z_LVAL(zsesid)))
{
if(PHRASEA2_G(global_session))
delete PHRASEA2_G(global_session);
PHRASEA2_G(global_session) = tmp_session;
PHRASEA2_G(global_session)->serialize_php(return_value, false); // on n'inclue pas les offline et les non registered
sesid = Z_LVAL(zsesid);
return;
}
}
}
}
}
}
RETURN_FALSE;
}
ZEND_FUNCTION(phrasea_create_session)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
zval zusrid;
char sql[1024];
int sesid = -1;
//zend_printf("entree dans phrasea_open_session (global_session=%lx)\n", global_session);
ZVAL_BOOL(return_value, FALSE);
if(ZEND_NUM_ARGS()==1)
{
if(zend_parse_parameters(1 TSRMLS_CC, (char *)"l", &zusrid) == FAILURE)
RETURN_FALSE;
}
else
WRONG_PARAM_COUNT;
if(epublisher)
{
// on cr<63>e une nouvelle session
if(epublisher->query((char *)"LOCK TABLES uids WRITE"))
{
if(epublisher->query((char *)"UPDATE uids SET uid=uid+1 WHERE name='SESSION'"))
{
if(epublisher->affected_rows() == 1)
{
SQLRES res(epublisher);
if(res.query((char *)"SELECT uid FROM uids WHERE name='SESSION'"))
{
SQLROW *row = res.fetch_row();
if(row)
{
sesid = atol(row->field(0));
epublisher->query((char *)"UNLOCK TABLES");
sprintf(sql, (char *)"INSERT INTO cache (session_id, nact, lastaccess, answers, spots, session, usr_id) VALUES (%i, 0, NOW(), '', '', '', %li)", sesid, Z_LVAL(zusrid));
if(epublisher->query(sql))
{
ZVAL_LONG(return_value, sesid);
}
else
sesid = -1;
}
else
epublisher->query((char *)"UNLOCK TABLES");
}
else
epublisher->query((char *)"UNLOCK TABLES");
}
else
epublisher->query((char *)"UNLOCK TABLES");
}
else
epublisher->query((char *)"UNLOCK TABLES");
}
}
if(sesid != -1)
{
// on a une session, on cherche la liste des bases publi<6C>es
SQLRES res(epublisher);
// if(res.query("SELECT base_id, server_host, server_port, server_sqlengine, server_dbname, server_user, server_pwd, server_coll_id FROM bas WHERE active>0 ORDER BY server_host, server_port, server_dbname"))
if(res.query((char *)"SELECT base_id, host, port, dbname, user, pwd, server_coll_id, sbas.sbas_id, viewname FROM (sbas INNER JOIN bas ON sbas.sbas_id=bas.sbas_id) WHERE active>0 ORDER BY sbas.ord, sbas.sbas_id, bas.ord"))
{
long last_sbas_id=0, sbas_id;
char *viewname;
SQLROW *row;
SQLCONN *conn = NULL;
long basid;
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(sesid, epublisher))
{
CACHE_BASE *cache_base = NULL;
while(row = res.fetch_row())
{
basid = atol(row->field(0));
sbas_id = atol(row->field(7));
viewname = (row->field(8) && strlen(row->field(8))>0) ? row->field(8) : row->field(3);
if(sbas_id != last_sbas_id)
{
last_sbas_id = sbas_id;
// on a chang<6E> de base phrasea
if(conn)
delete conn;
int engine = PHRASEA_MYSQLENGINE;
conn = new SQLCONN(row->field(1), atoi(row->field(2)), row->field(4), row->field(5), row->field(3));
if(conn && conn->isok())
{
SQLRES res2(conn);
if(res2.query((char *)"SELECT value AS struct FROM pref WHERE prop='structure' LIMIT 1;"))
{
SQLROW *row2 = res2.fetch_row();
if(row2)
cache_base = tmp_session->addbase(basid, row->field(1), atoi(row->field(2)), row->field(4), row->field(5), row->field(3), row2->field(0), sbas_id, viewname, true);
else
cache_base = tmp_session->addbase(basid, row->field(1), atoi(row->field(2)), row->field(4), row->field(5), row->field(3), NULL, sbas_id, viewname, true);
}
else
{
cache_base = tmp_session->addbase(basid, row->field(1), atoi(row->field(2)), row->field(4), row->field(5), row->field(3), NULL, sbas_id, viewname, true);
}
// zend_printf("Connection OK<br>\n");
}
else
{
// si la connexion est rat<61>e, on ne l'inclue m<>me pas dans les bases !
// zend_printf("Connection BAD<br>\n");
}
}
// ici pour chaque base / collections
if(conn && conn->isok())
{
SQLRES res(conn);
long collid = atol(row->field(6));
// sprintf(sql, "SELECT asciiname, phserver_host, phserver_port, prefs FROM coll WHERE coll_id=%s", row->field(7));
sprintf(sql, "SELECT asciiname, prefs FROM coll WHERE coll_id=%s", row->field(6));
if(res.query(sql))
{
SQLROW *row = res.fetch_row();
if(cache_base)
cache_base->addcoll(collid, basid, row->field(0), (char *)(row->field(1)?row->field(1):""), false);
}
}
}
if(conn)
delete conn;
// on s<>rialize la nouvelle session dans le sql, et on la garde en global
if(PHRASEA2_G(global_session))
delete PHRASEA2_G(global_session);
PHRASEA2_G(global_session) = tmp_session;
PHRASEA2_G(global_session)->save();
PHRASEA2_G(global_session)->serialize_php(return_value, false); // on n'inclue pas les offline et les non registered
//on retourne le numero de session
ZVAL_LONG(return_value, sesid);
}
}
else
ZVAL_LONG(return_value, sesid);
}
else
RETURN_FALSE;
}
ZEND_FUNCTION(phrasea_open_session)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
zval zsesid;
zval zusrid;
char sql[1024];
long sesid = -1;
// zend_printf("entree dans phrasea_open_session (global_session=%lx)<br>", global_session);
ZVAL_BOOL(return_value, FALSE);
if(ZEND_NUM_ARGS()==2)
{
if(zend_parse_parameters(2 TSRMLS_CC, (char *)"ll", &zsesid, &zusrid) == FAILURE)
RETURN_FALSE;
}
else
WRONG_PARAM_COUNT;
sesid = Z_LVAL(zsesid);
if(epublisher)
{
if(sesid != 0)
{
//zend_printf("LINE %i <br/>\n", __LINE__);
// sprintf(sql, "UPDATE cache SET nact=nact+1, lastaccess=NOW(), answers='', spots='' WHERE session_id=%li", Z_LVAL(zsesid));
sprintf(sql, "UPDATE cache SET nact=nact+1, lastaccess=NOW() WHERE session_id=%li AND usr_id=%li", sesid, Z_LVAL(zusrid));
if(epublisher->query(sql))
{
//zend_printf("LINE %i <br/>\n", __LINE__);
if(epublisher->affected_rows() == 1)
{
//zend_printf("LINE %i <br/>\n", __LINE__);
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0, epublisher))
{
//zend_printf("LINE %i <br/>\n", __LINE__);
if(tmp_session->restore(sesid))
{
//zend_printf("LINE %i <br/>\n", __LINE__);
//RETURN_FALSE;
if(tmp_session->get_session_id() == sesid)
{
//zend_printf("LINE %i <br/>\n", __LINE__);
if(PHRASEA2_G(global_session))
delete PHRASEA2_G(global_session);
PHRASEA2_G(global_session) = tmp_session;
PHRASEA2_G(global_session)->serialize_php(return_value, false); // on n'inclue pas les offline et les non registered
}
return;
}
}
}
}
}
}
}
ZEND_FUNCTION(phrasea_register_base)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
zval zsesid, zbaseid, zsave;
char *zuser=NULL, *zpwd=NULL;
int zuserlen, zpwdlen;
int sesid = -1;
ZVAL_BOOL(return_value, FALSE);
if(ZEND_NUM_ARGS() == 5)
{
if(zend_parse_parameters(5 TSRMLS_CC, (char *)"llssb", &zsesid, &zbaseid, &zuser, &zuserlen, &zpwd, &zpwdlen, &zsave) == FAILURE)
RETURN_FALSE;
}
else if(ZEND_NUM_ARGS() == 4)
{
if(zend_parse_parameters(4 TSRMLS_CC, (char *)"llss", &zsesid, &zbaseid, &zuser, &zuserlen, &zpwd, &zpwdlen) == FAILURE)
RETURN_FALSE;
Z_LVAL(zsave) = TRUE;
}
else if(ZEND_NUM_ARGS() == 2)
{
if(zend_parse_parameters(2 TSRMLS_CC, (char *)"ll", &zsesid, &zbaseid) == FAILURE)
RETURN_FALSE;
Z_LVAL(zsave) = TRUE;
}
else
{
WRONG_PARAM_COUNT;
}
if(epublisher && Z_LVAL(zsesid) != -1)
{
if(PHRASEA2_G(global_session))
{
if(PHRASEA2_G(global_session)->get_session_id() == Z_LVAL(zsesid))
{
/* ======== au cas ou on vient de cr<63>er une coll ===================
if(! PHRASEA2_G(global_session)->connect(zbaseid))
{
SQLRES res(epublisher);
SQLCONN *conntmp = NULL;
CACHE_BASE *cache_base = PHRASEA2_G(global_session)->getCacheBase();
sprintf(sql, "SELECT base_id, host, port, sqlengine, dbname, user, pwd, server_coll_id, sbas.sbas_id, sbas.thesaurus_id, viewname FROM (sbas INNER JOIN bas ON sbas.sbas_id=bas.sbas_id) WHERE active>0 AND base_id=%D ORDER BY sbas.ord, sbas.sbas_id, bas.ord", zbaseid );
if(res.query(sql))
{
SQLROW *row = res.fetch_row();
conntmp = new SQLCONN(row->field(1), atoi(row->field(2)), row->field(5), row->field(6), row->field(4), row->field(3));
if(conntmp && conntmp->isok())
{
SQLRES res(conntmp);
long collid = atol(row->field(7));
sprintf(sql, "SELECT asciiname, prefs FROM coll WHERE coll_id=%s", row->field(7));
if(res.query(sql))
{
SQLROW *row = res.fetch_row();
if(cache_base)
{
cache_base->addcoll(collid, zbaseid, row->field(0), (char *)(row->field(1)?row->field(1):""), false);
}
}
}
}
} =============================================================== */
// on se connecte sur la base demand<6E>e
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
// ici normalement on check le user/pwd, mais pour l'instant on fait semblant
// if(zuser && zpwd && strcmp((const char *)zuser, "alchemy")==0 && strcmp((const char *)zpwd, "alchemy")==0)
// {
PHRASEA2_G(global_session)->set_registered(Z_LVAL(zbaseid), true);
if(Z_BVAL(zsave))
PHRASEA2_G(global_session)->save();
// global_session->dump();
ZVAL_BOOL(return_value, TRUE);
// }
}
else
{
// zend_printf("phrasea_register_base ERR 1\n");
}
}
else
{
// zend_printf("phrasea_register_base ERR 3\n");
}
}
else
{
// zend_printf("phrasea_register_base ERR 0\n");
}
}
else
{
// zend_printf("phrasea_register_base ERR 2\n");
}
}
ZEND_FUNCTION(phrasea_save_session)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
zval zsesid;
ZVAL_BOOL(return_value, FALSE);
if(ZEND_NUM_ARGS() == 1)
{
if(zend_parse_parameters(1 TSRMLS_CC, (char *)"l", &zsesid) == FAILURE)
RETURN_FALSE;
}
else
{
WRONG_PARAM_COUNT;
}
if(epublisher && Z_LVAL(zsesid) != -1)
{
if(PHRASEA2_G(global_session))
{
if(PHRASEA2_G(global_session)->get_session_id() == Z_LVAL(zsesid))
{
PHRASEA2_G(global_session)->save();
ZVAL_BOOL(return_value, TRUE);
}
else
{
// zend_printf("phrasea_register_base ERR 3\n");
}
}
else
{
// zend_printf("phrasea_register_base ERR 0\n");
}
}
else
{
// zend_printf("phrasea_register_base ERR 2\n");
}
}
ZEND_FUNCTION(phrasea_close_session)
{
SQLCONN *epublisher = PHRASEA2_G(global_epublisher);
zval zsesid;
char sql[256];
ZVAL_BOOL(return_value, FALSE);
if(ZEND_NUM_ARGS()==1)
{
if(zend_parse_parameters(1 TSRMLS_CC, (char *)"l", &zsesid) == FAILURE)
RETURN_FALSE;
}
else
WRONG_PARAM_COUNT;
if(epublisher)
{
// on a pass<73> une session, on la supprime du cache
sprintf(sql, "DELETE FROM cache WHERE session_id=%li", Z_LVAL(zsesid));
if(epublisher->query(sql))
{
if(epublisher->affected_rows() == 1)
{
char *fname;
int l = strlen(PHRASEA2_G(tempPath))
+ 9 // "_phrasea."
+ strlen(epublisher->ukey)
+ 9 // ".answers."
+ 33 // zsession
+1; // '\0'
if( (fname = (char *)EMALLOC(l)) )
{
// sprintf(fname, "%s_phrasea.answers.%ld.bin", tempPathBuffer, Z_LVAL(zsesid));
sprintf(fname, "%s_phrasea.%s.answers.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, Z_LVAL(zsesid));
remove(fname);
// sprintf(fname, "%s_phrasea.spots.%ld.bin", tempPathBuffer, Z_LVAL(zsesid));
sprintf(fname, "%s_phrasea.%s.spots.%ld.bin", PHRASEA2_G(tempPath), epublisher->ukey, Z_LVAL(zsesid));
remove(fname);
EFREE(fname);
}
ZVAL_BOOL(return_value, TRUE);
}
}
// on en profite pour virer les sessions expir<69>es
// epublisher->query("DELETE FROM cache WHERE DATE_ADD(lastaccess, INTERVAL 5 MINUTE)<NOW()");
}
}

View File

@@ -1,568 +0,0 @@
#include "base_header.h"
#include "phrasea_clock_t.h"
#include "../php_phrasea2.h"
#define QUOTE(x) _QUOTE(x)
#define _QUOTE(a) #a
SQLCONN::SQLCONN(char *host, int port, char *user, char *passwd, char *dbname, bool trace)
{
this->ukey = NULL;
this->connok = false;
// if(trace)
// zend_printf("NEW SQLCONN(host='%s' port=%i user='%s' passwd='%s' dbname='%s' engine='%s')<br>\n", host, port, user, passwd, dbname, engine);
this->mysql_active_result_id = 0;
this->sqlengine = PHRASEA_MYSQLENGINE;
mysql_init(&(this->mysql_conn));
#ifdef MYSQL_OPT_RECONNECT
my_bool reconnect = 1;
mysql_options(&(this->mysql_conn), MYSQL_OPT_RECONNECT, &reconnect);
#else
#endif
if (mysql_real_connect(&(this->mysql_conn), host, user, passwd, NULL, port, NULL, CLIENT_COMPRESS) != NULL)
{
#ifdef MYSQLENCODE
if (mysql_set_character_set(&(this->mysql_conn), QUOTE(MYSQLENCODE)) == 0)
#endif
{
int l = strlen(host) + 1 + 65 + 1 + (dbname ? strlen(dbname) : 0);
if(this->ukey = (char *)EMALLOC(l))
{
sprintf(this->ukey, "%s_%u_%s", host, (unsigned int)port, (dbname?dbname:"") );
this->connok = true;
if(dbname && (mysql_select_db(&(this->mysql_conn), dbname) != 0))
{
// zend_printf("mysql_select_db failed<br>\n");
// on a demand<6E> une base <20> s<>lectionner mais echec : on ferme
mysql_close(&(this->mysql_conn));
// EFREE(this->ukey);
// this->ukey = NULL;
this->connok = false;
}
if(this->connok)
{
// on cr<63>e une table temporaire qui contiendra un extrait des droits distants (basusr)
// cette table est temporaire donc propre <20> cette connexion, donc propre <20> cet application-server
// c'est la responsabilit<69> du site distant de charger/maintenir la table <20> jour
// (par exemple <20> la connexion d'un user, il doit updater ses droits dans l'application-server sur lequel il se connecte)
// char *sql = "CREATE TEMPORARY TABLE IF NOT EXISTS `collusr` (`coll_id` bigint(20) NOT NULL default '0', `htmlname` varchar(50) default NULL, PRIMARY KEY (`coll_id`) ) TYPE=MyISAM";
// char *sql = "CREATE TEMPORARY TABLE IF NOT EXISTS `collusr` (`coll_id` bigint(20) NOT NULL default '0', `usr_id` bigint(20) NOT NULL default '0', `mask_and` bigint(20) unsigned default NULL, `mask_xor` bigint(20) unsigned default NULL, PRIMARY KEY (`coll_id`,`usr_id`) ) TYPE=HEAP";
// this->query(sql, -1);
}
}
}
}
}
void *SQLCONN::get_native_conn()
{
return(&(this->mysql_conn));
}
SQLCONN::~SQLCONN()
{
if(this->ukey)
EFREE(this->ukey);
if(this->connok)
{
mysql_close(&(this->mysql_conn));
}
}
int SQLCONN::escape_string(char *str, int len, char *outbuff)
{
// size_t tolen;
if(len == -1)
len = strlen(str);
if(outbuff == NULL)
return((2*len)+1); // pas de buffer allou<6F> : on retourne la taille requise sans escaper
return(mysql_real_escape_string(&(this->mysql_conn), outbuff, str, len));
}
bool SQLCONN::query(char *sql, int len)
{
int r;
// this->pgnres = -1;
if(this->connok)
{
if(len == -1)
len = strlen(sql);
r = mysql_real_query(&(this->mysql_conn), sql, len);
//zend_printf("SQL=%s ; myafr=%li, r=%i<br>\n", sql, mysql_affected_rows(&(this->mysql_conn)), r);
//if(r != 0)
// zend_printf("ERR:%s<br/>\n", this->error());
return(r == 0);
}
return(false);
}
const char *SQLCONN::error()
{
if(this->connok)
{
return(mysql_error(&(this->mysql_conn)));
}
return(NULL);
}
my_ulonglong SQLCONN::affected_rows()
{
if(this->connok)
{
return(mysql_affected_rows(&(this->mysql_conn)));
}
return (long)(-1);
}
bool SQLCONN::isok()
{
return(this->connok);
}
bool SQLRES::query(char *sql)
{
if(mysql_query(&(parent_conn->mysql_conn), sql) == 0)
{
// zend_printf("SQL=%s<br>\n", sql);
if(this->res)
{
mysql_free_result(this->res);
this->res = NULL;
}
if(this->res = mysql_store_result(&(parent_conn->mysql_conn)))
{
// !!!!!!!!!!!!!!!!!!!!! conversion de _int64 en int !!!!!!!!!!!!!!!!!
this->nrows = (int)mysql_num_rows(res);
this->ncols = (int)mysql_num_fields(res);
}
return(true);
}
return(false);
}
int SQLRES::get_nrows()
{
return(this->nrows);
}
SQLRES::SQLRES(SQLCONN *parent_conn)
{
this->parent_conn = parent_conn;
this->res = NULL;
this->sqlrow.parent_res = this;
this->ncols = 0;
this->ncols = 0;
}
SQLRES::~SQLRES()
{
if(this->res)
mysql_free_result(this->res);
}
SQLROW *SQLRES::fetch_row()
{
if(this->parent_conn->connok)
{
if(this->res)
{
this->sqlrow.row = mysql_fetch_row(this->res);
if(this->sqlrow.row)
return(&(this->sqlrow));
}
}
return(NULL);
}
unsigned long *SQLRES::fetch_lengths()
{
if(this->parent_conn->connok)
{
if(this->res)
{
return(mysql_fetch_lengths(this->res));
}
}
return(NULL);
}
SQLROW::SQLROW()
{
}
SQLROW::~SQLROW()
{
}
char *SQLROW::field(int n)
{
return(this->row[n]);
}
#define SQLFIELD_RID 0
#define SQLFIELD_PRID 1
#define SQLFIELD_CID 2
#define SQLFIELD_HITSTART 3
#define SQLFIELD_HITLEN 4
#define SQLFIELD_IW 5
#define SQLFIELD_STATUS 6
#define SQLFIELD_SHA256 7
// pose une rqt sql <20> la connexion phrasea
// si result!=null, les r<>sultats sont stock<63>s dans une entr<74>e "answers" de ce tableau assoc.
// sinon
// les r<>sultats sont stock<63>s en ram dans le node
void SQLCONN::phrasea_query(char *sql, NODE *n, bool reverse)
{
ANSWER *answer;
long rid, lastrid;
HIT *hit;
SPOT *spot;
CHRONO chrono;
MYSQL_STMT *stmt;
MYSQL_BIND bind[8];
unsigned long length[8];
my_bool is_null[8];
my_bool error[8];
long int_result[6];
long long llstatus;
unsigned char sha256[65];
lastrid = -1;
// zend_printf("szll=%d, MYSQL=%s <br/>\n", sizeof(llstatus), sql);
startChrono(chrono);
//zend_printf("%d <br/>\n", __LINE__);
if( (stmt = mysql_stmt_init(&(this->mysql_conn))) )
{
//zend_printf("%d <br/>\n", __LINE__);
if( mysql_stmt_prepare(stmt, sql, strlen(sql)) == 0 )
{
//zend_printf("%d <br/>\n", __LINE__);
// Execute the SELECT query
if(mysql_stmt_execute(stmt) == 0)
{
n->time_sqlQuery = stopChrono(chrono);
// Bind the result buffers for all columns before fetching them
memset(bind, 0, sizeof(bind));
for(int i=0; i<8; i++)
{
// INTEGER COLUMN(S)
bind[i].buffer_type = MYSQL_TYPE_LONG;
bind[i].buffer = (char *)(&int_result[i]);
bind[i].is_null = &is_null[i];
bind[i].length = &length[i];
bind[i].error = &error[i];
}
// status column : 64 bits
bind[SQLFIELD_STATUS].buffer_type = MYSQL_TYPE_LONGLONG;
bind[SQLFIELD_STATUS].buffer = (char *)(&llstatus);
// sha256 column : 256 bits
bind[SQLFIELD_SHA256].buffer_type = MYSQL_TYPE_STRING;
bind[SQLFIELD_SHA256].buffer_length = 65;
bind[SQLFIELD_SHA256].buffer = (char *)sha256;
// Bind the result buffers
if (mysql_stmt_bind_result(stmt, bind) == 0)
{
//zend_printf("%d <br/>\n", __LINE__);
// Now buffer all results to client (optional step)
startChrono(chrono);
if (mysql_stmt_store_result(stmt) != 0)
{
//fprintf(stderr, " mysql_stmt_store_result() failed\n");
//fprintf(stderr, " %s\n", mysql_stmt_error(stmt));
return;
}
//zend_printf("%d <br/>\n", __LINE__);
n->time_sqlStore = stopChrono(chrono);
ANSWER *tmphead = n->lastanswer;
startChrono(chrono);
while(mysql_stmt_fetch(stmt) == 0)
{
// zend_printf("l=%ld <br/>\n", length[6]);
rid = int_result[SQLFIELD_RID];
// zend_printf("%d : rid=%ld<br/>\n", __LINE__, rid);
// prid = int_result[SQLFIELD_PRID];
// cid = int_result[SQLFIELD_CID];
if(n)
{
if(rid != lastrid)
{
if(answer = (ANSWER *)(EMALLOC(sizeof(ANSWER))))
{
answer->firstspot = answer->lastspot = NULL;
answer->firsthit = answer->lasthit = NULL;
// answer->sqloffsets
answer->rid = rid;
answer->prid = int_result[SQLFIELD_PRID];
answer->llstatus = llstatus;
answer->cid = int_result[SQLFIELD_CID];
if(!is_null[SQLFIELD_SHA256])
answer->osha256 = sha256;
else
answer->osha256 = NULL;
answer->nextanswer = NULL;
if(!reverse)
{
if(!(n->firstanswer))
n->firstanswer = answer;
if(n->lastanswer)
n->lastanswer->nextanswer = answer;
n->lastanswer = answer;
}
else
{
if(!tmphead)
{
if(!n->lastanswer)
{
n->lastanswer = answer;
}
answer->nextanswer = n->firstanswer;
n->firstanswer = answer;
}
else
{
answer->nextanswer = tmphead->nextanswer;
if(!answer->nextanswer)
{
n->lastanswer = answer;
}
tmphead->nextanswer = answer;
}
}
}
n->nbranswers++;
lastrid = rid;
}
}
if(!is_null[SQLFIELD_IW] && answer && (hit = (HIT *)(EMALLOC(sizeof(HIT)))))
{
hit->iws = hit->iwe = int_result[SQLFIELD_IW];
hit->nexthit = NULL;
if(!(answer->firsthit))
answer->firsthit = hit;
if(answer->lasthit)
answer->lasthit->nexthit = hit;
answer->lasthit = hit;
}
if(!is_null[SQLFIELD_HITSTART] && !is_null[SQLFIELD_HITLEN] && answer && (spot = (SPOT *)(EMALLOC(sizeof(SPOT)))))
{
spot->start = int_result[SQLFIELD_HITSTART];
spot->len = int_result[SQLFIELD_HITLEN];
spot->nextspot = NULL;
if(!(answer->firstspot))
answer->firstspot = spot;
if(answer->lastspot)
answer->lastspot->nextspot = spot;
answer->lastspot = spot;
}
}
n->time_sqlFetch = stopChrono(chrono);
// n->sql = sql;
}
}
else
{
}
}
else
{
}
mysql_stmt_close(stmt);
}
}
/*
void SQLCONN::phrasea_query(char *sql, NODE *n, zval *zanswers, bool reverse)
{
MYSQL_RES *myres;
my_ulonglong nrows = 0;
MYSQL_ROW myrow;
ANSWER *answer;
long cid, rid, prid, lastrid;
HIT *hit;
SPOT *spot;
zval *zanswer, *zspots, *zspot;
CHRONO chrono, chrono_all;
MYSQL_STMT *stmt;
MYSQL_BIND bind[6];
cid = rid = lastrid = -1;
zend_printf("MYSQL=%s <br/>\n", sql);
startChrono(chrono_all);
startChrono(chrono);
if(mysql_query(&(this->mysql_conn), sql) == 0)
{
n->time_sqlQuery = stopChrono(chrono);
//zend_printf("<!-- DUREE : %d msec (n->firstanswer=%ld, reverse=%i) -->\n\n", PHRASEA_GET_MS(&sqlin, &sqlout), n->firstanswer, reverse);
startChrono(chrono);
if((myres = mysql_store_result(&(this->mysql_conn))) != NULL)
{
n->time_sqlStore = stopChrono(chrono);
// zend_printf("nrows = %i\n", mysql_num_rows(myres));
answer = NULL;
ANSWER *tmphead = n->lastanswer;
startChrono(chrono);
while(myrow = mysql_fetch_row(myres))
{
rid = atoi(myrow[SQLFIELD_RID]);
prid = atoi(myrow[SQLFIELD_PRID]);
cid = atoi(myrow[SQLFIELD_CID]);
if(n)
{
// zend_printf("rid=%i : iw=%i, hit.s=%i, hit.l=%i\n", rid, atoi(myrow[iwf]), atoi(myrow[hitstartf]), atoi(myrow[hitlenf]) );
if(zanswers)
{
// on stocke dans la zval
MAKE_STD_ZVAL(zanswer);
array_init(zanswer);
add_assoc_long(zanswer, (char *)"rid", rid);
add_assoc_long(zanswer, (char *)"prid", prid);
add_assoc_stringl(zanswer, (char *)"status", myrow[SQLFIELD_STATUS], 16, TRUE);
add_assoc_long(zanswer, (char *)"cid", cid);
if(myrow[SQLFIELD_HITSTART] && myrow[SQLFIELD_HITLEN])
{
MAKE_STD_ZVAL(zspots);
array_init(zspots);
add_assoc_zval(zanswer, (char *)"spots", zspots);
}
add_next_index_zval(zanswers, zanswer);
}
else
{
if(answer = (ANSWER *)(EMALLOC(sizeof(ANSWER))))
{
// answer->sqloffsets
answer->rid = rid;
answer->prid = prid;
memcpy(answer->status, myrow[2], 16);
answer->cid = cid;
answer->firstspot = answer->lastspot = NULL;
answer->firsthit = answer->lasthit = NULL;
// answer->xml = NULL;
// answer->xmllenght = -1;
// if(xmlf != -1)
// {
// lengths = mysql_fetch_lengths(myres);
// if(answer->xml = EMALLOC(answer->xmllenght = lengths[xmlf]))
// memcpy(answer->xml, myrow[xmlf], answer->xmllenght);
// }
answer->nextanswer = NULL;
if(!reverse)
{
if(!(n->firstanswer))
n->firstanswer = answer;
if(n->lastanswer)
n->lastanswer->nextanswer = answer;
n->lastanswer = answer;
}
else
{
//zend_printf("<!-- cid=%ld, rid=%ld -->\n", cid, rid);
if(!tmphead)
{
if(!n->lastanswer)
{
//zend_printf("<!-- 0.0 : n->lastanswer = answer = %li -->\n", answer->rid);
n->lastanswer = answer;
}
//zend_printf("<!-- 0.1 : answer->nextanswer = n->firstanswer = %li -->\n", n->firstanswer ? n->firstanswer->rid : 0);
answer->nextanswer = n->firstanswer;
//zend_printf("<!-- 0.1 : n->firstanswer = answer = %li -->\n", answer->rid );
n->firstanswer = answer;
}
else
{
//zend_printf("<!-- 1.0 : answer->nextanswer = tmphead->nextanswer = %li -->\n", tmphead->nextanswer ? tmphead->nextanswer->rid : 0 );
answer->nextanswer = tmphead->nextanswer;
if(!answer->nextanswer)
{
//zend_printf("<!-- 1.1 : n->lastanswer = answer = %li -->\n", answer->rid );
n->lastanswer = answer;
}
//zend_printf("<!-- 1.2 : tmphead->nextanswer = answer = %li -->\n", answer->rid );
tmphead->nextanswer = answer;
}
}
}
}
n->nbranswers++;
lastrid = rid;
}
if(zanswers)
{
// on stocke dans la zval
if(myrow[SQLFIELD_HITSTART] && myrow[SQLFIELD_HITLEN])
{
MAKE_STD_ZVAL(zspot);
array_init(zspot);
add_assoc_long(zspot, (char *)"start", atoi(myrow[SQLFIELD_HITSTART]));
add_assoc_long(zspot, (char *)"len", atoi(myrow[SQLFIELD_HITLEN]));
add_next_index_zval(zspots, zspot);
}
}
else
{
if(myrow[SQLFIELD_IW] && answer && (hit = (HIT *)(EMALLOC(sizeof(HIT)))))
{
hit->iws = hit->iwe = atoi(myrow[SQLFIELD_IW]);
hit->nexthit = NULL;
if(!(answer->firsthit))
answer->firsthit = hit;
if(answer->lasthit)
answer->lasthit->nexthit = hit;
answer->lasthit = hit;
// zend_printf(" - rid=%i : hit.iws=hit.iwe=%i\n", rid, hit->iws);
}
if(myrow[SQLFIELD_HITSTART] && myrow[SQLFIELD_HITLEN] && answer && (spot = (SPOT *)(EMALLOC(sizeof(SPOT)))))
{
spot->start = atoi(myrow[SQLFIELD_HITSTART]);
spot->len = atoi(myrow[SQLFIELD_HITLEN]);
spot->nextspot = NULL;
if(!(answer->firstspot))
answer->firstspot = spot;
if(answer->lastspot)
answer->lastspot->nextspot = spot;
answer->lastspot = spot;
// zend_printf(" - rid=%i : spot.s=%i, spot.l=%i\n", rid, spot->start, spot->len);
}
}
}
n->time_sqlFetch = stopChrono(chrono);
// n->sql = sql;
// for(ANSWER *a=n->firstanswer; a; a=a->nextanswer)
// zend_printf("<!-- ---------- cid=%ld, rid=%ld -->\n", a->cid, a->rid);
// zend_printf("<!-- ---------- last = %ld -->\n", n->lastanswer->rid);
mysql_free_result(myres);
}
}
n->time_all = stopChrono(chrono_all);
}
*/

View File

@@ -1,79 +0,0 @@
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
// SQLRES *SQLCONN::store_result();
#ifndef SQL_H
#define SQL_H 1
#include "phrasea_types.h" // define NODE
class SQLCONN
{
public:
SQLCONN(char *host, int port, char *user, char *passwd, char *dbname, bool trace=false);
~SQLCONN();
char *ukey;
bool isok();
bool query(char *sql, int len = -1);
const char *error();
int escape_string(char *str, int len = -1, char *outbuff = NULL);
void phrasea_query(char *sql, NODE *n, bool reverse=false);
my_ulonglong affected_rows();
// #WIN - _int64 affected_rows();
void *get_native_conn();
// class SQLRES *store_result();
friend class SQLRES;
friend class SQLROW;
private:
int sqlengine;
bool connok;
// long pgnres;
// char strport[64];
MYSQL mysql_conn;
int mysql_active_result_id;
};
class SQLROW
{
public:
SQLROW();
~SQLROW();
char *field(int n);
friend class SQLRES;
friend class SQLCONN;
private:
MYSQL_ROW row;
class SQLRES *parent_res;
};
class SQLRES
{
public:
SQLRES(SQLCONN *parent_conn);
~SQLRES();
bool query(char *sql);
class SQLROW *fetch_row();
int get_nrows();
friend class SQLROW;
friend class SQLCONN;
unsigned long *fetch_lengths();
private:
class SQLROW sqlrow;
MYSQL_RES *res;
SQLCONN *parent_conn;
int nrows, ncols, currow;
};
#endif

View File

@@ -1,161 +0,0 @@
#include "base_header.h"
#include "../php_phrasea2.h"
ZEND_FUNCTION(phrasea_subdefs)
{
int namelen;
char *name = NULL;
zval zsession, zbaseid, zrid;
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==3)
{
if(zend_parse_parameters(3 TSRMLS_CC, (char *)"lll", &zsession, &zbaseid, &zrid) == FAILURE)
{
RETURN_FALSE;
}
}
else
{
if(ZEND_NUM_ARGS()==4)
{
if(zend_parse_parameters(4 TSRMLS_CC, (char *)"llls", &zsession, &zbaseid, &zrid, &name, &namelen) == FAILURE)
{
RETURN_FALSE;
}
if(namelen > 63)
namelen = 63;
}
else
WRONG_PARAM_COUNT;
}
/*
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
zend_printf("bad global session : restoring<br>\n");
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0))
{
if(tmp_session->restore(Z_LVAL(zsession)))
{
if(global_session)
delete global_session;
global_session = tmp_session;
}
}
}
*/
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
// on cherche la base dans le cache
// global_session->dump();
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char sql[256];
SQLRES res(conn);
if(name)
{
char namez[64];
memcpy(namez, name, namelen);
namez[namelen] = '\0';
sprintf(sql, "SELECT name, baseurl, file, width, height, mime, path, size, substit, type, sha256, bitly, credate, moddate FROM record LEFT JOIN subdef ON subdef.record_id=record.record_id WHERE record.record_id=%li AND name='%s'", Z_LVAL(zrid), namez);
}
else
{
sprintf(sql, "SELECT name, baseurl, file, width, height, mime, path, size, substit, type, sha256, bitly, credate, moddate FROM record LEFT JOIN subdef ON subdef.record_id=record.record_id WHERE record.record_id=%li", Z_LVAL(zrid));
}
// zend_printf("SQL : %s<br>\n", sql);
// RETURN_FALSE;
// return;
if(res.query(sql))
{
SQLROW *row;
zval *zanswer;
array_init(return_value);
while(row = res.fetch_row())
{
if(!row->field(0))
continue;
MAKE_STD_ZVAL(zanswer);
array_init(zanswer);
if(row->field(1))
add_assoc_string(zanswer, (char *)"baseurl", row->field(1), true);
else
add_assoc_null(zanswer, (char *)"baseurl");
if(row->field(2))
add_assoc_string(zanswer, (char *)"file", row->field(2), true);
else
add_assoc_null(zanswer, (char *)"file");
if(row->field(3))
add_assoc_long(zanswer, (char *)"width", atol(row->field(3)));
else
add_assoc_null(zanswer, (char *)"width");
if(row->field(4))
add_assoc_long(zanswer, (char *)"height", atol(row->field(4)));
else
add_assoc_null(zanswer, (char *)"height");
if(row->field(5))
add_assoc_string(zanswer, (char *)"mime", row->field(5), true);
else
add_assoc_null(zanswer, (char *)"mime");
if(row->field(6))
add_assoc_string(zanswer, (char *)"path", row->field(6), true);
else
add_assoc_null(zanswer, (char *)"path");
if(row->field(7))
add_assoc_long(zanswer, (char *)"size", atol(row->field(7)));
else
add_assoc_null(zanswer, (char *)"size");
if(row->field(8))
add_assoc_long(zanswer, (char *)"substit", atol(row->field(8)));
else
add_assoc_null(zanswer, (char *)"substit");
if(row->field(9))
add_assoc_string(zanswer, (char *)"type", row->field(9), true);
else
add_assoc_null(zanswer, (char *)"type");
if(row->field(10))
add_assoc_string(zanswer, (char *)"sha256", row->field(10), true);
else
add_assoc_null(zanswer, (char *)"sha256");
if(row->field(11))
add_assoc_string(zanswer, (char *)"bitly", row->field(11), true);
else
add_assoc_null(zanswer, (char *)"bitly");
if(row->field(12))
add_assoc_string(zanswer, (char *)"credate", row->field(12), true);
else
add_assoc_null(zanswer, (char *)"credate");
if(row->field(13))
add_assoc_string(zanswer, (char *)"moddate", row->field(13), true);
else
add_assoc_null(zanswer, (char *)"moddate");
add_assoc_zval(return_value, row->field(0), zanswer);
}
}
}
}

View File

@@ -1,87 +0,0 @@
// #include "base_header.h"
#include "php.h"
#define RAMLOG "/home/gaulier/ramlog.txt"
#define K (sizeof(int))
int allocated = 0;
void tracelog(const char *s, const char *file, int line)
{
FILE *fp;
if(fp = fopen(RAMLOG, "a"))
{
// fprintf(fp, "%s (%i) : %s\n", file, line, s);
fclose(fp);
}
}
void *my_emalloc(int s, const char *file, int line)
{
void *p, *p2;
FILE *fp;
p = emalloc(K + s);
p2 = (unsigned char *)p + K;
if(p)
*(int *)p = s;
allocated += s;
// zend_printf("(%i):S=%i%s p=%i p2=%i\n", s, allocated, p?"":" ERROR ", p, p2);
if(fp = fopen(RAMLOG, "a"))
{
// fprintf(fp, "%s (%i) +%i S=%i%s p=0x%p p2=0x%p\n", file, line, s, allocated, p?"":" ERROR ", p, p2);
//fprintf(fp, "(%i):S=%i%s p=0x%p p2=0x%p\n", s, allocated, p?"":" ERROR ", p, p2);
fclose(fp);
}
return(p2);
}
void my_efree(void *p2, const char *file, int line)
{
int s=0;
void *p = ((unsigned char*)p2) - K;
FILE *fp;
if(p2)
{
s = *((int *)p);
allocated -= s;
// zend_printf("efree(%i):S=%i p2=%i p=%i\n", s, allocated, p2, p);
if(fp = fopen(RAMLOG, "a"))
{
// fprintf(fp, "%s (%i) -%i S=%i p2=0x%p p=0x%p\n", file, line, s, allocated, p2, p);
//fprintf(fp, "efree(%i):S=%i p2=0x%p p=0x%p\n", s, allocated, p2, p);
fclose(fp);
}
efree(p);
tracelog("freeded", file, line);
}
else
{
if(fp = fopen(RAMLOG, "a"))
{
// fprintf(fp, "%s (%i) efree(ERROR)\n", file, line);
//fprintf(fp, "efree(ERROR)\n");
fclose(fp);
}
}
}
char *my_estrdup(char *s) //, const char *file, int line)
{
char *p;
int l=strlen(s)+1;
if(p = (char *)emalloc(l))
{
strcpy(p, s);
}
return(p);
}
/*
#define emalloc(s) my_emalloc(s)
#define efree(s) my_efree(s)
#define estrdup(s) my_estrdup(s)
*/

View File

@@ -1,22 +0,0 @@
// -------------------------------------------------------------------------------------------------
// ------------------------------------------------ allocation m<>moire trac<61>e ----------------------
#if 1
#define EMALLOC(s) emalloc(s)
#define EFREE(p) efree(p)
#define ESTRDUP(p) estrdup(p)
#define TRACELOG(s) void()
#else
void *my_emalloc(int s, const char *file, int line);
void my_efree(void *p2, const char *file, int line);
#define EMALLOC(s) my_emalloc(s, __FILE__, __LINE__)
#define EFREE(p) my_efree(p, __FILE__, __LINE__)
char *my_estrdup(char *s);
#define ESTRDUP(p) my_estrdup(p)
void tracelog(const char *s, const char *file, int line);
#define TRACELOG(s) tracelog((s), __FILE__, __LINE__)
#endif
// -------------------------------------------------------------------------------------------------

View File

@@ -1,35 +0,0 @@
#include "base_header.h"
// trier un tableau d'entiers
void sort_int(int nint, int *tint)
{
register int i,j,tmp;
for(i=0; i<nint-1; i++)
{
for(j=i+1; j<nint; j++)
{
if(tint[j] < tint[i])
{
tmp = tint[i];
tint[i] = tint[j];
tint[j] = tmp;
}
}
}
}
# ifdef PHP_WIN32
int millisec_diff(struct _timeb *timestart, struct _timeb *timeend)
{
return((1000 * (timeend->time - timestart->time)) + (timeend->millitm - timestart->millitm));
}
void resetclock(struct _timeb * timeref)
{
// ******* tosee : n ?
// n->timeref.time = 0; n->timeref.millitm = 0;
timeref->time = timeref->millitm = 0;
}
#endif

View File

@@ -1,189 +0,0 @@
/*
This part of the extension is imported from the php-uuid PECL extension written by Hartmut Holzgraefe and released under GPL 2.1
Authors: Hartmut Holzgraefe <hartmut@php.net>
*/
#include "base_header.h"
#include "../php_phrasea2.h"
#ifndef UUID_TYPE_DCE_TIME
#ifdef __APPLE__
/* UUID Type definitions */
#define UUID_TYPE_DCE_TIME 1
#define UUID_TYPE_DCE_RANDOM 4
#endif /* __MACOS__ */
#endif /* UUID_TYPE_DCE_TIME */
ZEND_FUNCTION(phrasea_uuid_create)
{
long uuid_type = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &uuid_type) == FAILURE) {
return;
}
do {
uuid_t uuid;
char uuid_str[37];
switch(uuid_type) {
case UUID_TYPE_DCE_TIME:
uuid_generate_time(uuid);
break;
case UUID_TYPE_DCE_RANDOM:
uuid_generate_random(uuid);
break;
case UUID_TYPE_DEFAULT:
uuid_generate(uuid);
break;
default:
php_error_docref(NULL TSRMLS_CC,
E_WARNING,
"Unknown/invalid UUID type '%ld' requested, using default type instead",
uuid_type);
uuid_generate(uuid);
break;
}
uuid_unparse(uuid, uuid_str);
RETURN_STRING(uuid_str, 1);
} while (0);
}
/* {{{ proto bool uuid_is_valid(string uuid)
Check whether a given UUID string is a valid UUID */
ZEND_FUNCTION(phrasea_uuid_is_valid)
{
const char * uuid = NULL;
int uuid_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &uuid, &uuid_len) == FAILURE) {
return;
}
do {
uuid_t u;
RETURN_BOOL(0 == uuid_parse(uuid, u));
} while (0);
}
/* }}} uuid_is_valid */
/* {{{ proto int uuid_compare(string uuid1, string uuid2)
Compare two UUIDs */
ZEND_FUNCTION(phrasea_uuid_compare)
{
const char * uuid1 = NULL;
int uuid1_len = 0;
const char * uuid2 = NULL;
int uuid2_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &uuid1, &uuid1_len, &uuid2, &uuid2_len) == FAILURE) {
return;
}
do {
uuid_t u1, u2;
if(uuid_parse(uuid1, u1)) RETURN_FALSE;
if(uuid_parse(uuid2, u2)) RETURN_FALSE;
RETURN_LONG(uuid_compare(u1, u2));
} while (0);
}
/* }}} uuid_compare */
/* {{{ proto bool uuid_is_null(string uuid)
Check wheter an UUID is the NULL UUID 00000000-0000-0000-0000-000000000000 */
ZEND_FUNCTION(phrasea_uuid_is_null)
{
const char * uuid = NULL;
int uuid_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &uuid, &uuid_len) == FAILURE) {
return;
}
do {
uuid_t u;
if(uuid_parse(uuid, u)) RETURN_FALSE;
RETURN_BOOL(uuid_is_null(u));
} while (0);
}
/* }}} uuid_is_null */
ZEND_FUNCTION(phrasea_uuid_parse)
{
const char * uuid = NULL;
int uuid_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &uuid, &uuid_len) == FAILURE) {
return;
}
do {
uuid_t uuid_bin;
if (uuid_parse(uuid, uuid_bin)) {
RETURN_FALSE;
}
RETURN_STRINGL((char *)uuid_bin, sizeof(uuid_t), 1);
} while (0);
}
/* }}} uuid_parse */
/* {{{ proto string uuid_unparse(string uuid)
*/
ZEND_FUNCTION(phrasea_uuid_unparse)
{
const char * uuid = NULL;
int uuid_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &uuid, &uuid_len) == FAILURE) {
return;
}
do {
char uuid_txt[37];
if (uuid_len != sizeof(uuid_t)) {
RETURN_FALSE;
}
uuid_unparse((unsigned char *)uuid, uuid_txt);
RETURN_STRINGL(uuid_txt, 36, 1);
} while (0);
}
/* }}} uuid_unparse */

View File

@@ -1,325 +0,0 @@
#include "base_header.h"
#include "../php_phrasea2.h"
ZEND_FUNCTION(phrasea_xmlcaption)
{
int highlightlen;
char *highlight = NULL;
zval zsession, zbaseid, zrid;
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==3)
{
if(zend_parse_parameters(3 TSRMLS_CC, (char *)"lll", &zsession, &zbaseid, &zrid) == FAILURE)
{
RETURN_FALSE;
}
}
else
{
if(ZEND_NUM_ARGS()==4)
{
if(zend_parse_parameters(4 TSRMLS_CC, (char *)"llls", &zsession, &zbaseid, &zrid, &highlight, &highlightlen) == FAILURE)
{
RETURN_FALSE;
}
if(highlightlen > 63)
highlightlen = 63;
}
else
WRONG_PARAM_COUNT;
}
/*
if(!global_session || global_session->get_session_id() != Z_LVAL(zsession))
{
zend_printf("bad global session : restoring<br>\n");
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0))
{
if(tmp_session->restore(Z_LVAL(zsession)))
{
if(global_session)
delete global_session;
global_session = tmp_session;
}
}
}
*/
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
// on cherche la base dans le cache
// global_session->dump();
RETVAL_FALSE;
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char sql[256];
SQLRES res(conn);
// if(name)
// {
// char namez[64];
// memcpy(namez, name, namelen);
// namez[namelen] = '\0';
// }
sprintf(sql, "SELECT xml FROM record WHERE record_id=%li", Z_LVAL(zrid));
// zend_printf("SQL : %s<br>\n", sql);
if(res.query(sql))
{
SQLROW *row;
if(row = res.fetch_row())
{
RETVAL_STRING(row->field(0), true);
}
}
}
}
ZEND_FUNCTION(phrasea_status)
{
int highlightlen;
char *highlight = NULL;
zval zsession, zbaseid, zrid;
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==3)
{
if(zend_parse_parameters(3 TSRMLS_CC, (char *)"lll", &zsession, &zbaseid, &zrid) == FAILURE)
{
RETURN_FALSE;
}
}
else
{
if(ZEND_NUM_ARGS()==4)
{
if(zend_parse_parameters(4 TSRMLS_CC, (char *)"llls", &zsession, &zbaseid, &zrid, &highlight, &highlightlen) == FAILURE)
{
RETURN_FALSE;
}
if(highlightlen > 63)
highlightlen = 63;
}
else
WRONG_PARAM_COUNT;
}
/*
if(!global_session || global_session->get_session_id() != Z_LVAL(zsession))
{
zend_printf("bad global session : restoring<br>\n");
if(CACHE_SESSION *tmp_session = new CACHE_SESSION(0))
{
if(tmp_session->restore(Z_LVAL(zsession)))
{
if(global_session)
delete global_session;
global_session = tmp_session;
}
}
}
*/
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
// on cherche la base dans le cache
// global_session->dump();
RETVAL_FALSE;
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char sql[256];
SQLRES res(conn);
// if(name)
// {
// char namez[64];
// memcpy(namez, name, namelen);
// namez[namelen] = '\0';
// }
sprintf(sql, "SELECT BIN(status) FROM record WHERE record_id=%li", Z_LVAL(zrid));
// zend_printf("SQL : %s<br>\n", sql);
if(res.query(sql))
{
SQLROW *row;
if(row = res.fetch_row())
{
RETVAL_STRING(row->field(0), true);
}
}
}
}
/*
ZEND_FUNCTION(phrasea_setstatus)
{
int maskandlen;
char *maskand = NULL;
int maskorlen;
char *maskor = NULL;
zval zsession, zbaseid, zrid;
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==4)
{
if(zend_parse_parameters(5 TSRMLS_CC, "lllss", &zsession, &zbaseid, &zrid, &maskand, &maskandlen, &maskor, &maskorlen) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
RETVAL_FALSE;
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char *escapedmaskand=NULL, *escapedmaskand=NULL, *sql;
int l;
l = conn->escape_string(xml, xmllen, NULL); // on obtient la taille maximum escap<61>e
if( (escapedmaskand = (char *)EMALLOC(l_and)) && (escapedmaskor = (char *)EMALLOC(l_or)) )
{
l_and = conn->escape_string(maskand, maskandlen, escapedmaskand); // on obtient la taille r<>elle
l_or = conn->escape_string(maskor , maskorlen, escapedmaskor); // on obtient la taille r<>elle
if(sql = (char *)EMALLOC(l_and + l_or + sizeof("UPDATE record SET moddate=NOW(), status=((status & _) | _) WHERE record_id=???????????")))
{
sprintf(sql, "UPDATE record SET moddate=NOW(), status=((status & %s) | %s) WHERE record_id=%i", escapedmaskand, escapedmaskor, Z_LVAL(zrid));
if(conn->query(sql))
RETVAL_TRUE;
EFREE(sql);
}
}
if(escapedmaskand
EFREE(escapedxml);
}
}
*/
ZEND_FUNCTION(phrasea_setstatus)
{
int maskandlen;
char *maskand = NULL;
int maskorlen;
char *maskor = NULL;
zval zsession, zbaseid, zrid;
int id = -1;
bool conn_ok = TRUE;
if(ZEND_NUM_ARGS()==5)
{
if(zend_parse_parameters(5 TSRMLS_CC, (char *)"lllss", &zsession, &zbaseid, &zrid, &maskand, &maskandlen, &maskor, &maskorlen) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
RETVAL_FALSE;
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char *sql;
int l=0;
if(sql = (char *)EMALLOC(maskandlen + maskorlen + sizeof("UPDATE record SET moddate=NOW(), status=((status & _) | _) WHERE record_id=???????????")))
{
l += sprintf(sql+l, "UPDATE record SET moddate=NOW(), status=((status & " );
memcpy(sql+l, maskand, maskandlen);
l += maskandlen;
l += sprintf(sql+l, ") | " );
memcpy(sql+l, maskor, maskorlen);
l += maskandlen;
l += sprintf(sql+l, ") WHERE record_id=%li", Z_LVAL(zrid) );
// zend_printf("SQL : %s<br>\n", sql);
if(conn->query(sql))
RETVAL_TRUE;
EFREE(sql);
}
}
}
ZEND_FUNCTION(phrasea_setxmlcaption)
{
int xmllen;
char *xml = NULL;
zval zsession, zbaseid, zrid;
int id = -1;
bool conn_ok = TRUE;
// zend_printf("phrasea_setxmlcaption !<br>\n");
if(ZEND_NUM_ARGS()==4)
{
if(zend_parse_parameters(4 TSRMLS_CC, (char *)"llls", &zsession, &zbaseid, &zrid, &xml, &xmllen) == FAILURE)
{
RETURN_FALSE;
}
}
else
WRONG_PARAM_COUNT;
// zend_printf("phrasea_setxmlcaption : %i<br>\n", xmllen);
// RETURN_TRUE;
if(!PHRASEA2_G(global_session) || PHRASEA2_G(global_session)->get_session_id() != Z_LVAL(zsession))
{
// la session n'existe pas, on ne peut pas continuer
RETURN_FALSE;
}
// on cherche la base dans le cache
// global_session->dump();
RETVAL_FALSE;
SQLCONN *conn = PHRASEA2_G(global_session)->connect(Z_LVAL(zbaseid));
if(conn)
{
char *escapedxml, *sql;
int l;
if(sql = (char *)EMALLOC(sizeof("DELETE FROM idx WHERE record_id=??????????????????????")))
{
sprintf(sql, "DELETE FROM idx WHERE record_id=%li", Z_LVAL(zrid));
conn->query(sql);
EFREE(sql);
}
l = conn->escape_string(xml, xmllen, NULL); // on obtient la taille maximum escap<61>e
if(escapedxml = (char *)EMALLOC(l))
{
l = conn->escape_string(xml, xmllen, escapedxml); // on obtient la taille r<>elle
if(sql = (char *)EMALLOC(l + sizeof("UPDATE record SET moddate=NOW(), status=status & ~1, xml='_' WHERE record_id=??????????????????????")))
{
sprintf(sql, "UPDATE record SET moddate=NOW(), status=status & ~1, xml='%s' WHERE record_id=%li", escapedxml, Z_LVAL(zrid));
if(conn->query(sql))
RETVAL_TRUE;
EFREE(sql);
}
EFREE(escapedxml);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea2 presence
--SKIPIF--
<?php if (!extension_loaded("phrasea2")) print "skip"; ?>
--FILE--
<?php
echo "phrasea2 extension is available";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea2 extension is available

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_create avalaibility
--SKIPIF--
<?php if (!function_exists("phrasea_uuid_create")) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_create is avalaible !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_create is avalaible !

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_is_valid avalaibility
--SKIPIF--
<?php if (!function_exists("phrasea_uuid_is_valid")) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_is_valid is avalaible !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_is_valid is avalaible !

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_compare avalaibility
--SKIPIF--
<?php if (!function_exists("phrasea_uuid_compare")) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_compare is avalaible !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_compare is avalaible !

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_is_null avalaibility
--SKIPIF--
<?php if (!function_exists("phrasea_uuid_is_null")) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_is_null is avalaible !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_is_null is avalaible !

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_create avalaibility
--SKIPIF--
<?php if (!function_exists("phrasea_uuid_create")) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_create is avalaible !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_create is avalaible !

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_parse avalaibility
--SKIPIF--
<?php if (!function_exists("phrasea_uuid_parse")) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_parse is avalaible !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_parse is avalaible !

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_unparse avalaibility
--SKIPIF--
<?php if (!function_exists("phrasea_uuid_unparse")) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_unparse is avalaible !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_unparse is avalaible !

View File

@@ -1,21 +0,0 @@
--TEST--
Check for phrasea_uuid_create works
--SKIPIF--
<?php echo phrasea_uuid_create(); if (!phrasea_uuid_create()) print "skip"; ?>
--FILE--
<?php
echo "phrasea_uuid_create works !";
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
*/
?>
--EXPECT--
phrasea_uuid_create works !

View File

@@ -1,954 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?>
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.215734493">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.215734493" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting languages="cdt.managedbuild.tool.gnu.c.compiler.input.1723689327">
<entry flags="" kind="includePath" name="/usr/include"/>
<entry flags="" kind="includePath" name="/usr/include/libxml2"/>
</externalSetting>
</externalSettings>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="cindexer" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.215734493" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.215734493." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1192777845" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1710315263" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
<builder buildPath="${workspace_loc:/cindexer/Debug}" id="cdt.managedbuild.target.gnu.builder.exe.debug.1519881714" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.debug"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1714261724" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.910686518" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
<option id="gnu.cpp.compiler.exe.debug.option.optimization.level.425728587" name="Optimization Level" superClass="gnu.cpp.compiler.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.debug.option.debugging.level.66014958" name="Debug Level" superClass="gnu.cpp.compiler.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1545619904" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include/libxml2"/>
<listOptionValue builtIn="false" value="/usr/include/mysql/"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1689422968" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.901350661" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.exe.debug.option.optimization.level.1800228119" name="Optimization Level" superClass="gnu.c.compiler.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.debug.option.debugging.level.1461849097" name="Debug Level" superClass="gnu.c.compiler.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.269729307" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include"/>
<listOptionValue builtIn="false" value="/usr/include/libxml2"/>
<listOptionValue builtIn="false" value="/usr/include/mysql/"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1723689327" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1259611459" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.1642386473" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.118891256" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.debug.1711684336" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.190359241" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.215734493;cdt.managedbuild.config.gnu.exe.debug.215734493.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.910686518;cdt.managedbuild.tool.gnu.cpp.compiler.input.1689422968">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.740389843;cdt.managedbuild.config.gnu.exe.release.740389843.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.844945369;cdt.managedbuild.tool.gnu.cpp.compiler.input.1888370256">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.215734493;cdt.managedbuild.config.gnu.exe.debug.215734493.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.901350661;cdt.managedbuild.tool.gnu.c.compiler.input.1723689327">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.740389843;cdt.managedbuild.config.gnu.exe.release.740389843.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.679798380;cdt.managedbuild.tool.gnu.c.compiler.input.1367600996">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.740389843">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.740389843" moduleId="org.eclipse.cdt.core.settings" name="Release">
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
<extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="cindexer" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.740389843" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.740389843." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.291195499" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1419827200" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
<builder buildPath="${workspace_loc:/cindexer/Release}" id="cdt.managedbuild.target.gnu.builder.exe.release.249141399" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.exe.release"/>
<tool id="cdt.managedbuild.tool.gnu.archiver.base.1805463705" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.844945369" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
<option id="gnu.cpp.compiler.exe.release.option.optimization.level.1492793847" name="Optimization Level" superClass="gnu.cpp.compiler.exe.release.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
<option id="gnu.cpp.compiler.exe.release.option.debugging.level.131983807" name="Debug Level" superClass="gnu.cpp.compiler.exe.release.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1219807806" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include/mysql/"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1888370256" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.679798380" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.703790021" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.1325614372" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.466737899" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="/usr/include/libxml2"/>
<listOptionValue builtIn="false" value="/usr/include/mysql/"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1367600996" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.exe.release.1814630070" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.257510005" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1691470537" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
</inputType>
</tool>
<tool id="cdt.managedbuild.tool.gnu.assembler.exe.release.587355022" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release">
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1006858333" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
</toolChain>
</folderInfo>
</configuration>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.215734493;cdt.managedbuild.config.gnu.exe.debug.215734493.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.910686518;cdt.managedbuild.tool.gnu.cpp.compiler.input.1689422968">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.740389843;cdt.managedbuild.config.gnu.exe.release.740389843.;cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.844945369;cdt.managedbuild.tool.gnu.cpp.compiler.input.1888370256">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.debug.215734493;cdt.managedbuild.config.gnu.exe.debug.215734493.;cdt.managedbuild.tool.gnu.c.compiler.exe.debug.901350661;cdt.managedbuild.tool.gnu.c.compiler.input.1723689327">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.exe.release.740389843;cdt.managedbuild.config.gnu.exe.release.740389843.;cdt.managedbuild.tool.gnu.c.compiler.exe.release.679798380;cdt.managedbuild.tool.gnu.c.compiler.input.1367600996">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="makefileGenerator">
<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.cpp" command="g++" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-E -P -v -dD ${plugin_state_location}/specs.c" command="gcc" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/${specs_file}&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'g++ -E -P -v -dD &quot;${plugin_state_location}/specs.cpp&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC">
<buildOutputProvider>
<openAction enabled="true" filePath=""/>
<parser enabled="true"/>
</buildOutputProvider>
<scannerInfoProvider id="specsFile">
<runAction arguments="-c 'gcc -E -P -v -dD &quot;${plugin_state_location}/specs.c&quot;'" command="sh" useDefault="true"/>
<parser enabled="true"/>
</scannerInfoProvider>
</profile>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="cindexer.cdt.managedbuild.target.gnu.exe.1109846491" name="Executable" projectType="cdt.managedbuild.target.gnu.exe"/>
</storageModule>
</cproject>

View File

@@ -1,82 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>cindexer</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
<dictionary>
<key>?name?</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.append_environment</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildArguments</key>
<value></value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildCommand</key>
<value>make</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/cindexer/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
<value>clean</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.contents</key>
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
<value>false</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
<value>all</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.stopOnError</key>
<value>true</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
<value>true</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>

View File

@@ -1,12 +0,0 @@
AUTOMAKE_OPTIONS = foreign no-dependencies no-define no-dist no-installinfo
# what flags you want to pass to the C compiler & linker
CFLAGS = --pedantic -Wall -std=c99 -O2
#LDFLAGS =
# this lists the binaries to produce, the (non-PHONY, binary) targets in
# the previous manual Makefile
bin_PROGRAMS = phraseanet_indexer
phraseanet_indexer_SOURCES = src/main.cpp src/_version.h src/callback_record.cpp src/connbas.cpp src/connbas_abox.cpp src/connbas_dbox.cpp src/dom.cpp src/indexer.cpp src/lownodiacritics_utf8.cpp src/phrasea_clock_t.cpp src/sbas.cpp src/thesaurus.cpp src/trace_memory.cpp src/sockets.cpp ./xNIX/syslog_xnix.cpp

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="customprops"
>
<UserMacro
Name="PHVERSION"
Value="3,7,1,0"
/>
<UserMacro
Name="PHDOTVERSION"
Value="3.7.1.0"
/>
</VisualStudioPropertySheet>

View File

@@ -1,22 +0,0 @@
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE 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.

View File

@@ -1,148 +0,0 @@
Release 2.0.0 Wed Jan 11 2006
- We no longer use the "check" library for C unit testing; we
always use the (partial) internal implementation of the API.
- Report XML_NS setting via XML_GetFeatureList().
- Fixed headers for use from C++.
- XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber()
now return unsigned integers.
- Added XML_LARGE_SIZE switch to enable 64-bit integers for
byte indexes and line/column numbers.
- Updated to use libtool 1.5.22 (the most recent).
- Added support for AmigaOS.
- Some mostly minor bug fixes. SF issues include: 1006708,
1021776, 1023646, 1114960, 1156398, 1221160, 1271642.
Release 1.95.8 Fri Jul 23 2004
- Major new feature: suspend/resume. Handlers can now request
that a parse be suspended for later resumption or aborted
altogether. See "Temporarily Stopping Parsing" in the
documentation for more details.
- Some mostly minor bug fixes, but compilation should no
longer generate warnings on most platforms. SF issues
include: 827319, 840173, 846309, 888329, 896188, 923913,
928113, 961698, 985192.
Release 1.95.7 Mon Oct 20 2003
- Fixed enum XML_Status issue (reported on SourceForge many
times), so compilers that are properly picky will be happy.
- Introduced an XMLCALL macro to control the calling
convention used by the Expat API; this macro should be used
to annotate prototypes and definitions of callback
implementations in code compiled with a calling convention
other than the default convention for the host platform.
- Improved ability to build without the configure-generated
expat_config.h header. This is useful for applications
which embed Expat rather than linking in the library.
- Fixed a variety of bugs: see SF issues 458907, 609603,
676844, 679754, 692878, 692964, 695401, 699323, 699487,
820946.
- Improved hash table lookups.
- Added more regression tests and improved documentation.
Release 1.95.6 Tue Jan 28 2003
- Added XML_FreeContentModel().
- Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree().
- Fixed a variety of bugs: see SF issues 615606, 616863,
618199, 653180, 673791.
- Enhanced the regression test suite.
- Man page improvements: includes SF issue 632146.
Release 1.95.5 Fri Sep 6 2002
- Added XML_UseForeignDTD() for improved SAX2 support.
- Added XML_GetFeatureList().
- Defined XML_Bool type and the values XML_TRUE and XML_FALSE.
- Use an incomplete struct instead of a void* for the parser
(may not retain).
- Fixed UTF-8 decoding bug that caused legal UTF-8 to be rejected.
- Finally fixed bug where default handler would report DTD
events that were already handled by another handler.
Initial patch contributed by Darryl Miles.
- Removed unnecessary DllMain() function that caused static
linking into a DLL to be difficult.
- Added VC++ projects for building static libraries.
- Reduced line-length for all source code and headers to be
no longer than 80 characters, to help with AS/400 support.
- Reduced memory copying during parsing (SF patch #600964).
- Fixed a variety of bugs: see SF issues 580793, 434664,
483514, 580503, 581069, 584041, 584183, 584832, 585537,
596555, 596678, 598352, 598944, 599715, 600479, 600971.
Release 1.95.4 Fri Jul 12 2002
- Added support for VMS, contributed by Craig Berry. See
vms/README.vms for more information.
- Added Mac OS (classic) support, with a makefile for MPW,
contributed by Thomas Wegner and Daryle Walker.
- Added Borland C++ Builder 5 / BCC 5.5 support, contributed
by Patrick McConnell (SF patch #538032).
- Fixed a variety of bugs: see SF issues 441449, 563184,
564342, 566334, 566901, 569461, 570263, 575168, 579196.
- Made skippedEntityHandler conform to SAX2 (see source comment)
- Re-implemented WFC: Entity Declared from XML 1.0 spec and
added a new error "entity declared in parameter entity":
see SF bug report 569461 and SF patch 578161
- Re-implemented section 5.1 from XML 1.0 spec:
see SF bug report 570263 and SF patch 578161
Release 1.95.3 Mon Jun 3 2002
- Added a project to the MSVC workspace to create a wchar_t
version of the library; the DLLs are named libexpatw.dll.
- Changed the name of the Windows DLLs from expat.dll to
libexpat.dll; this fixes SF bug #432456.
- Added the XML_ParserReset() API function.
- Fixed XML_SetReturnNSTriplet() to work for element names.
- Made the XML_UNICODE builds usable (thanks, Karl!).
- Allow xmlwf to read from standard input.
- Install a man page for xmlwf on Unix systems.
- Fixed many bugs; see SF bug reports 231864, 461380, 464837,
466885, 469226, 477667, 484419, 487840, 494749, 496505,
547350. Other bugs which we can't test as easily may also
have been fixed, especially in the area of build support.
Release 1.95.2 Fri Jul 27 2001
- More changes to make MSVC happy with the build; add a single
workspace to support both the library and xmlwf application.
- Added a Windows installer for Windows users; includes
xmlwf.exe.
- Added compile-time constants that can be used to determine the
Expat version
- Removed a lot of GNU-specific dependencies to aide portability
among the various Unix flavors.
- Fix the UTF-8 BOM bug.
- Cleaned up warning messages for several compilers.
- Added the -Wall, -Wstrict-prototypes options for GCC.
Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000
- Changes to get expat to build under Microsoft compiler
- Removed all aborts and instead return an UNEXPECTED_STATE error.
- Fixed a bug where a stray '%' in an entity value would cause an
abort.
- Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for
finding this oversight.
- Changed default patterns in lib/Makefile.in to fit non-GNU makes
Thanks to robin@unrated.net for reporting and providing an
account to test on.
- The reference had the wrong label for XML_SetStartNamespaceDecl.
Reported by an anonymous user.
Release 1.95.0 Fri Sep 29 2000
- XML_ParserCreate_MM
Allows you to set a memory management suite to replace the
standard malloc,realloc, and free.
- XML_SetReturnNSTriplet
If you turn this feature on when namespace processing is in
effect, then qualified, prefixed element and attribute names
are returned as "uri|name|prefix" where '|' is whatever
separator character is used in namespace processing.
- Merged in features from perl-expat
o XML_SetElementDeclHandler
o XML_SetAttlistDeclHandler
o XML_SetXmlDeclHandler
o XML_SetEntityDeclHandler
o StartDoctypeDeclHandler takes 3 additional parameters:
sysid, pubid, has_internal_subset
o Many paired handler setters (like XML_SetElementHandler)
now have corresponding individual handler setters
o XML_GetInputContext for getting the input context of
the current parse position.
- Added reference material
- Packaged into a distribution that builds a sharable library

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -1,101 +0,0 @@
body {
background-color: white;
border: 0px;
margin: 0px;
padding: 0px;
}
.corner {
width: 200px;
height: 80px;
text-align: center;
}
.banner {
background-color: rgb(110,139,61);
color: rgb(255,236,176);
padding-left: 2em;
}
.banner h1 {
font-size: 200%;
}
.content {
padding: 0em 2em 1em 2em;
}
.releaseno {
background-color: rgb(110,139,61);
color: rgb(255,236,176);
padding-bottom: 0.3em;
padding-top: 0.5em;
text-align: center;
font-weight: bold;
}
.noborder {
border-width: 0px;
}
.eg {
padding-left: 1em;
padding-top: .5em;
padding-bottom: .5em;
border: solid thin;
margin: 1em 0;
background-color: tan;
margin-left: 2em;
margin-right: 10%;
}
.pseudocode {
padding-left: 1em;
padding-top: .5em;
padding-bottom: .5em;
border: solid thin;
margin: 1em 0;
background-color: rgb(250,220,180);
margin-left: 2em;
margin-right: 10%;
}
.handler {
width: 100%;
border-top-width: thin;
margin-bottom: 1em;
}
.handler p {
margin-left: 2em;
}
.setter {
font-weight: bold;
}
.signature {
color: navy;
}
.fcndec {
width: 100%;
border-top-width: thin;
font-weight: bold;
}
.fcndef {
margin-left: 2em;
margin-bottom: 2em;
}
dd {
margin-bottom: 2em;
}
.cpp-symbols dt {
font-family: monospace;
}
.cpp-symbols dd {
margin-bottom: 1em;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

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