Compare commits
78 Commits
libnode-2_
...
libnode-2_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
97d57e391f | ||
|
|
d1778a5431 | ||
|
|
416ee6de00 | ||
|
|
8c1000401d | ||
|
|
11f4f585b3 | ||
|
|
0990ad102d | ||
|
|
da9d517e9a | ||
|
|
d50da065a6 | ||
|
|
f8f96b1ec8 | ||
|
|
b49d497bfb | ||
|
|
80665f9931 | ||
|
|
1d9539466d | ||
|
|
3ce278d6e5 | ||
|
|
3d91078a5c | ||
|
|
51482fb475 | ||
|
|
75cfc21e01 | ||
|
|
5aea056299 | ||
|
|
3f6d118ae2 | ||
|
|
7c96ad706b | ||
|
|
c70c4e5aba | ||
|
|
7f142acda3 | ||
|
|
64baaa1bc5 | ||
|
|
77330558f0 | ||
|
|
4634d49ce9 | ||
|
|
6cae72830f | ||
|
|
61dfd5c682 | ||
|
|
898992430e | ||
|
|
3c40fadbff | ||
|
|
126de83bc9 | ||
|
|
8541d83655 | ||
|
|
2274de2cf2 | ||
|
|
fa40487565 | ||
|
|
79b8e412a2 | ||
|
|
de448e9237 | ||
|
|
f3598b72e5 | ||
|
|
f2f8facb0e | ||
|
|
d299d7ce87 | ||
|
|
05877292fa | ||
|
|
ee32700240 | ||
|
|
7c7ecea547 | ||
|
|
3b595554f4 | ||
|
|
352f592518 | ||
|
|
211babbf5b | ||
|
|
adbf463812 | ||
|
|
c4617d7c1f | ||
|
|
2f56c19c82 | ||
|
|
3443aba602 | ||
|
|
655e66ee8b | ||
|
|
6410c70eb1 | ||
|
|
69d684f700 | ||
|
|
a10f0b1cf5 | ||
|
|
6ded620c00 | ||
|
|
0514715693 | ||
|
|
c4969560a3 | ||
|
|
10a6a983c5 | ||
|
|
78e9d49e45 | ||
|
|
27c0b3cda7 | ||
|
|
a0addad286 | ||
|
|
9bb2b42716 | ||
|
|
76e61fb382 | ||
|
|
ebfe0b2aec | ||
|
|
6c7c5cd686 | ||
|
|
490684cdb6 | ||
|
|
2b81ff3566 | ||
|
|
5f92190c59 | ||
|
|
2260f97db2 | ||
|
|
a512c467f7 | ||
|
|
af664cd6a0 | ||
|
|
2966eb9115 | ||
|
|
ea02a52457 | ||
|
|
882cde0d40 | ||
|
|
5b48497b78 | ||
|
|
189a24bcb7 | ||
|
|
5fe2168c92 | ||
|
|
377c39b8de | ||
|
|
9704a9fb35 | ||
|
|
bb58630b79 | ||
|
|
4d87a3c6f9 |
355
GNU-FDL.txt
Normal file
355
GNU-FDL.txt
Normal file
@@ -0,0 +1,355 @@
|
|||||||
|
GNU Free Documentation License
|
||||||
|
Version 1.1, March 2000
|
||||||
|
|
||||||
|
Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
|
||||||
|
0. PREAMBLE
|
||||||
|
|
||||||
|
The purpose of this License is to make a manual, textbook, or other
|
||||||
|
written document "free" in the sense of freedom: to assure everyone
|
||||||
|
the effective freedom to copy and redistribute it, with or without
|
||||||
|
modifying it, either commercially or noncommercially. Secondarily,
|
||||||
|
this License preserves for the author and publisher a way to get
|
||||||
|
credit for their work, while not being considered responsible for
|
||||||
|
modifications made by others.
|
||||||
|
|
||||||
|
This License is a kind of "copyleft", which means that derivative
|
||||||
|
works of the document must themselves be free in the same sense. It
|
||||||
|
complements the GNU General Public License, which is a copyleft
|
||||||
|
license designed for free software.
|
||||||
|
|
||||||
|
We have designed this License in order to use it for manuals for free
|
||||||
|
software, because free software needs free documentation: a free
|
||||||
|
program should come with manuals providing the same freedoms that the
|
||||||
|
software does. But this License is not limited to software manuals;
|
||||||
|
it can be used for any textual work, regardless of subject matter or
|
||||||
|
whether it is published as a printed book. We recommend this License
|
||||||
|
principally for works whose purpose is instruction or reference.
|
||||||
|
|
||||||
|
|
||||||
|
1. APPLICABILITY AND DEFINITIONS
|
||||||
|
|
||||||
|
This License applies to any manual or other work that contains a
|
||||||
|
notice placed by the copyright holder saying it can be distributed
|
||||||
|
under the terms of this License. The "Document", below, refers to any
|
||||||
|
such manual or work. Any member of the public is a licensee, and is
|
||||||
|
addressed as "you".
|
||||||
|
|
||||||
|
A "Modified Version" of the Document means any work containing the
|
||||||
|
Document or a portion of it, either copied verbatim, or with
|
||||||
|
modifications and/or translated into another language.
|
||||||
|
|
||||||
|
A "Secondary Section" is a named appendix or a front-matter section of
|
||||||
|
the Document that deals exclusively with the relationship of the
|
||||||
|
publishers or authors of the Document to the Document's overall subject
|
||||||
|
(or to related matters) and contains nothing that could fall directly
|
||||||
|
within that overall subject. (For example, if the Document is in part a
|
||||||
|
textbook of mathematics, a Secondary Section may not explain any
|
||||||
|
mathematics.) The relationship could be a matter of historical
|
||||||
|
connection with the subject or with related matters, or of legal,
|
||||||
|
commercial, philosophical, ethical or political position regarding
|
||||||
|
them.
|
||||||
|
|
||||||
|
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||||
|
are designated, as being those of Invariant Sections, in the notice
|
||||||
|
that says that the Document is released under this License.
|
||||||
|
|
||||||
|
The "Cover Texts" are certain short passages of text that are listed,
|
||||||
|
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||||
|
the Document is released under this License.
|
||||||
|
|
||||||
|
A "Transparent" copy of the Document means a machine-readable copy,
|
||||||
|
represented in a format whose specification is available to the
|
||||||
|
general public, whose contents can be viewed and edited directly and
|
||||||
|
straightforwardly with generic text editors or (for images composed of
|
||||||
|
pixels) generic paint programs or (for drawings) some widely available
|
||||||
|
drawing editor, and that is suitable for input to text formatters or
|
||||||
|
for automatic translation to a variety of formats suitable for input
|
||||||
|
to text formatters. A copy made in an otherwise Transparent file
|
||||||
|
format whose markup has been designed to thwart or discourage
|
||||||
|
subsequent modification by readers is not Transparent. A copy that is
|
||||||
|
not "Transparent" is called "Opaque".
|
||||||
|
|
||||||
|
Examples of suitable formats for Transparent copies include plain
|
||||||
|
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||||
|
or XML using a publicly available DTD, and standard-conforming simple
|
||||||
|
HTML designed for human modification. Opaque formats include
|
||||||
|
PostScript, PDF, proprietary formats that can be read and edited only
|
||||||
|
by proprietary word processors, SGML or XML for which the DTD and/or
|
||||||
|
processing tools are not generally available, and the
|
||||||
|
machine-generated HTML produced by some word processors for output
|
||||||
|
purposes only.
|
||||||
|
|
||||||
|
The "Title Page" means, for a printed book, the title page itself,
|
||||||
|
plus such following pages as are needed to hold, legibly, the material
|
||||||
|
this License requires to appear in the title page. For works in
|
||||||
|
formats which do not have any title page as such, "Title Page" means
|
||||||
|
the text near the most prominent appearance of the work's title,
|
||||||
|
preceding the beginning of the body of the text.
|
||||||
|
|
||||||
|
|
||||||
|
2. VERBATIM COPYING
|
||||||
|
|
||||||
|
You may copy and distribute the Document in any medium, either
|
||||||
|
commercially or noncommercially, provided that this License, the
|
||||||
|
copyright notices, and the license notice saying this License applies
|
||||||
|
to the Document are reproduced in all copies, and that you add no other
|
||||||
|
conditions whatsoever to those of this License. You may not use
|
||||||
|
technical measures to obstruct or control the reading or further
|
||||||
|
copying of the copies you make or distribute. However, you may accept
|
||||||
|
compensation in exchange for copies. If you distribute a large enough
|
||||||
|
number of copies you must also follow the conditions in section 3.
|
||||||
|
|
||||||
|
You may also lend copies, under the same conditions stated above, and
|
||||||
|
you may publicly display copies.
|
||||||
|
|
||||||
|
|
||||||
|
3. COPYING IN QUANTITY
|
||||||
|
|
||||||
|
If you publish printed copies of the Document numbering more than 100,
|
||||||
|
and the Document's license notice requires Cover Texts, you must enclose
|
||||||
|
the copies in covers that carry, clearly and legibly, all these Cover
|
||||||
|
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||||
|
the back cover. Both covers must also clearly and legibly identify
|
||||||
|
you as the publisher of these copies. The front cover must present
|
||||||
|
the full title with all words of the title equally prominent and
|
||||||
|
visible. You may add other material on the covers in addition.
|
||||||
|
Copying with changes limited to the covers, as long as they preserve
|
||||||
|
the title of the Document and satisfy these conditions, can be treated
|
||||||
|
as verbatim copying in other respects.
|
||||||
|
|
||||||
|
If the required texts for either cover are too voluminous to fit
|
||||||
|
legibly, you should put the first ones listed (as many as fit
|
||||||
|
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||||
|
pages.
|
||||||
|
|
||||||
|
If you publish or distribute Opaque copies of the Document numbering
|
||||||
|
more than 100, you must either include a machine-readable Transparent
|
||||||
|
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||||
|
a publicly-accessible computer-network location containing a complete
|
||||||
|
Transparent copy of the Document, free of added material, which the
|
||||||
|
general network-using public has access to download anonymously at no
|
||||||
|
charge using public-standard network protocols. If you use the latter
|
||||||
|
option, you must take reasonably prudent steps, when you begin
|
||||||
|
distribution of Opaque copies in quantity, to ensure that this
|
||||||
|
Transparent copy will remain thus accessible at the stated location
|
||||||
|
until at least one year after the last time you distribute an Opaque
|
||||||
|
copy (directly or through your agents or retailers) of that edition to
|
||||||
|
the public.
|
||||||
|
|
||||||
|
It is requested, but not required, that you contact the authors of the
|
||||||
|
Document well before redistributing any large number of copies, to give
|
||||||
|
them a chance to provide you with an updated version of the Document.
|
||||||
|
|
||||||
|
|
||||||
|
4. MODIFICATIONS
|
||||||
|
|
||||||
|
You may copy and distribute a Modified Version of the Document under
|
||||||
|
the conditions of sections 2 and 3 above, provided that you release
|
||||||
|
the Modified Version under precisely this License, with the Modified
|
||||||
|
Version filling the role of the Document, thus licensing distribution
|
||||||
|
and modification of the Modified Version to whoever possesses a copy
|
||||||
|
of it. In addition, you must do these things in the Modified Version:
|
||||||
|
|
||||||
|
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||||
|
from that of the Document, and from those of previous versions
|
||||||
|
(which should, if there were any, be listed in the History section
|
||||||
|
of the Document). You may use the same title as a previous version
|
||||||
|
if the original publisher of that version gives permission.
|
||||||
|
B. List on the Title Page, as authors, one or more persons or entities
|
||||||
|
responsible for authorship of the modifications in the Modified
|
||||||
|
Version, together with at least five of the principal authors of the
|
||||||
|
Document (all of its principal authors, if it has less than five).
|
||||||
|
C. State on the Title page the name of the publisher of the
|
||||||
|
Modified Version, as the publisher.
|
||||||
|
D. Preserve all the copyright notices of the Document.
|
||||||
|
E. Add an appropriate copyright notice for your modifications
|
||||||
|
adjacent to the other copyright notices.
|
||||||
|
F. Include, immediately after the copyright notices, a license notice
|
||||||
|
giving the public permission to use the Modified Version under the
|
||||||
|
terms of this License, in the form shown in the Addendum below.
|
||||||
|
G. Preserve in that license notice the full lists of Invariant Sections
|
||||||
|
and required Cover Texts given in the Document's license notice.
|
||||||
|
H. Include an unaltered copy of this License.
|
||||||
|
I. Preserve the section entitled "History", and its title, and add to
|
||||||
|
it an item stating at least the title, year, new authors, and
|
||||||
|
publisher of the Modified Version as given on the Title Page. If
|
||||||
|
there is no section entitled "History" in the Document, create one
|
||||||
|
stating the title, year, authors, and publisher of the Document as
|
||||||
|
given on its Title Page, then add an item describing the Modified
|
||||||
|
Version as stated in the previous sentence.
|
||||||
|
J. Preserve the network location, if any, given in the Document for
|
||||||
|
public access to a Transparent copy of the Document, and likewise
|
||||||
|
the network locations given in the Document for previous versions
|
||||||
|
it was based on. These may be placed in the "History" section.
|
||||||
|
You may omit a network location for a work that was published at
|
||||||
|
least four years before the Document itself, or if the original
|
||||||
|
publisher of the version it refers to gives permission.
|
||||||
|
K. In any section entitled "Acknowledgements" or "Dedications",
|
||||||
|
preserve the section's title, and preserve in the section all the
|
||||||
|
substance and tone of each of the contributor acknowledgements
|
||||||
|
and/or dedications given therein.
|
||||||
|
L. Preserve all the Invariant Sections of the Document,
|
||||||
|
unaltered in their text and in their titles. Section numbers
|
||||||
|
or the equivalent are not considered part of the section titles.
|
||||||
|
M. Delete any section entitled "Endorsements". Such a section
|
||||||
|
may not be included in the Modified Version.
|
||||||
|
N. Do not retitle any existing section as "Endorsements"
|
||||||
|
or to conflict in title with any Invariant Section.
|
||||||
|
|
||||||
|
If the Modified Version includes new front-matter sections or
|
||||||
|
appendices that qualify as Secondary Sections and contain no material
|
||||||
|
copied from the Document, you may at your option designate some or all
|
||||||
|
of these sections as invariant. To do this, add their titles to the
|
||||||
|
list of Invariant Sections in the Modified Version's license notice.
|
||||||
|
These titles must be distinct from any other section titles.
|
||||||
|
|
||||||
|
You may add a section entitled "Endorsements", provided it contains
|
||||||
|
nothing but endorsements of your Modified Version by various
|
||||||
|
parties--for example, statements of peer review or that the text has
|
||||||
|
been approved by an organization as the authoritative definition of a
|
||||||
|
standard.
|
||||||
|
|
||||||
|
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||||
|
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||||
|
of Cover Texts in the Modified Version. Only one passage of
|
||||||
|
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||||
|
through arrangements made by) any one entity. If the Document already
|
||||||
|
includes a cover text for the same cover, previously added by you or
|
||||||
|
by arrangement made by the same entity you are acting on behalf of,
|
||||||
|
you may not add another; but you may replace the old one, on explicit
|
||||||
|
permission from the previous publisher that added the old one.
|
||||||
|
|
||||||
|
The author(s) and publisher(s) of the Document do not by this License
|
||||||
|
give permission to use their names for publicity for or to assert or
|
||||||
|
imply endorsement of any Modified Version.
|
||||||
|
|
||||||
|
|
||||||
|
5. COMBINING DOCUMENTS
|
||||||
|
|
||||||
|
You may combine the Document with other documents released under this
|
||||||
|
License, under the terms defined in section 4 above for modified
|
||||||
|
versions, provided that you include in the combination all of the
|
||||||
|
Invariant Sections of all of the original documents, unmodified, and
|
||||||
|
list them all as Invariant Sections of your combined work in its
|
||||||
|
license notice.
|
||||||
|
|
||||||
|
The combined work need only contain one copy of this License, and
|
||||||
|
multiple identical Invariant Sections may be replaced with a single
|
||||||
|
copy. If there are multiple Invariant Sections with the same name but
|
||||||
|
different contents, make the title of each such section unique by
|
||||||
|
adding at the end of it, in parentheses, the name of the original
|
||||||
|
author or publisher of that section if known, or else a unique number.
|
||||||
|
Make the same adjustment to the section titles in the list of
|
||||||
|
Invariant Sections in the license notice of the combined work.
|
||||||
|
|
||||||
|
In the combination, you must combine any sections entitled "History"
|
||||||
|
in the various original documents, forming one section entitled
|
||||||
|
"History"; likewise combine any sections entitled "Acknowledgements",
|
||||||
|
and any sections entitled "Dedications". You must delete all sections
|
||||||
|
entitled "Endorsements."
|
||||||
|
|
||||||
|
|
||||||
|
6. COLLECTIONS OF DOCUMENTS
|
||||||
|
|
||||||
|
You may make a collection consisting of the Document and other documents
|
||||||
|
released under this License, and replace the individual copies of this
|
||||||
|
License in the various documents with a single copy that is included in
|
||||||
|
the collection, provided that you follow the rules of this License for
|
||||||
|
verbatim copying of each of the documents in all other respects.
|
||||||
|
|
||||||
|
You may extract a single document from such a collection, and distribute
|
||||||
|
it individually under this License, provided you insert a copy of this
|
||||||
|
License into the extracted document, and follow this License in all
|
||||||
|
other respects regarding verbatim copying of that document.
|
||||||
|
|
||||||
|
|
||||||
|
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||||
|
|
||||||
|
A compilation of the Document or its derivatives with other separate
|
||||||
|
and independent documents or works, in or on a volume of a storage or
|
||||||
|
distribution medium, does not as a whole count as a Modified Version
|
||||||
|
of the Document, provided no compilation copyright is claimed for the
|
||||||
|
compilation. Such a compilation is called an "aggregate", and this
|
||||||
|
License does not apply to the other self-contained works thus compiled
|
||||||
|
with the Document, on account of their being thus compiled, if they
|
||||||
|
are not themselves derivative works of the Document.
|
||||||
|
|
||||||
|
If the Cover Text requirement of section 3 is applicable to these
|
||||||
|
copies of the Document, then if the Document is less than one quarter
|
||||||
|
of the entire aggregate, the Document's Cover Texts may be placed on
|
||||||
|
covers that surround only the Document within the aggregate.
|
||||||
|
Otherwise they must appear on covers around the whole aggregate.
|
||||||
|
|
||||||
|
|
||||||
|
8. TRANSLATION
|
||||||
|
|
||||||
|
Translation is considered a kind of modification, so you may
|
||||||
|
distribute translations of the Document under the terms of section 4.
|
||||||
|
Replacing Invariant Sections with translations requires special
|
||||||
|
permission from their copyright holders, but you may include
|
||||||
|
translations of some or all Invariant Sections in addition to the
|
||||||
|
original versions of these Invariant Sections. You may include a
|
||||||
|
translation of this License provided that you also include the
|
||||||
|
original English version of this License. In case of a disagreement
|
||||||
|
between the translation and the original English version of this
|
||||||
|
License, the original English version will prevail.
|
||||||
|
|
||||||
|
|
||||||
|
9. TERMINATION
|
||||||
|
|
||||||
|
You may not copy, modify, sublicense, or distribute the Document except
|
||||||
|
as expressly provided for under this License. Any other attempt to
|
||||||
|
copy, modify, sublicense or distribute the Document is void, and will
|
||||||
|
automatically terminate your rights under this License. However,
|
||||||
|
parties who have received copies, or rights, from you under this
|
||||||
|
License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
|
||||||
|
10. FUTURE REVISIONS OF THIS LICENSE
|
||||||
|
|
||||||
|
The Free Software Foundation may publish new, revised versions
|
||||||
|
of the GNU Free Documentation 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. See
|
||||||
|
http://www.gnu.org/copyleft/.
|
||||||
|
|
||||||
|
Each version of the License is given a distinguishing version number.
|
||||||
|
If the Document specifies that a particular numbered version of this
|
||||||
|
License "or any later version" applies to it, you have the option of
|
||||||
|
following the terms and conditions either of that specified version or
|
||||||
|
of any later version that has been published (not as a draft) by the
|
||||||
|
Free Software Foundation. If the Document does not specify a version
|
||||||
|
number of this License, you may choose any version ever published (not
|
||||||
|
as a draft) by the Free Software Foundation.
|
||||||
|
|
||||||
|
|
||||||
|
ADDENDUM: How to use this License for your documents
|
||||||
|
|
||||||
|
To use this License in a document you have written, include a copy of
|
||||||
|
the License in the document and put the following copyright and
|
||||||
|
license notices just after the title page:
|
||||||
|
|
||||||
|
Copyright (c) YEAR YOUR NAME.
|
||||||
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
|
under the terms of the GNU Free Documentation License, Version 1.1
|
||||||
|
or any later version published by the Free Software Foundation;
|
||||||
|
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||||
|
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||||
|
A copy of the license is included in the section entitled "GNU
|
||||||
|
Free Documentation License".
|
||||||
|
|
||||||
|
If you have no Invariant Sections, write "with no Invariant Sections"
|
||||||
|
instead of saying which ones are invariant. If you have no
|
||||||
|
Front-Cover Texts, write "no Front-Cover Texts" instead of
|
||||||
|
"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
|
||||||
|
|
||||||
|
If your document contains nontrivial examples of program code, we
|
||||||
|
recommend releasing these examples in parallel under your choice of
|
||||||
|
free software license, such as the GNU General Public License,
|
||||||
|
to permit their use in free software.
|
||||||
340
GNU-GPL.txt
Normal file
340
GNU-GPL.txt
Normal file
@@ -0,0 +1,340 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
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.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END 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
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <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 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
||||||
504
GNU-LGPL.txt
Normal file
504
GNU-LGPL.txt
Normal file
@@ -0,0 +1,504 @@
|
|||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
Version 2.1, February 1999
|
||||||
|
|
||||||
|
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
[This is the first released version of the Lesser GPL. It also counts
|
||||||
|
as the successor of the GNU Library Public License, version 2, hence
|
||||||
|
the version number 2.1.]
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
Licenses are intended to guarantee your freedom to share and change
|
||||||
|
free software--to make sure the software is free for all its users.
|
||||||
|
|
||||||
|
This license, the Lesser General Public License, applies to some
|
||||||
|
specially designated software packages--typically libraries--of the
|
||||||
|
Free Software Foundation and other authors who decide to use it. You
|
||||||
|
can use it too, but we suggest you first think carefully about whether
|
||||||
|
this license or the ordinary General Public License is the better
|
||||||
|
strategy to use in any particular case, based on the explanations below.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom of use,
|
||||||
|
not price. Our General Public Licenses are designed to make sure that
|
||||||
|
you have the freedom to distribute copies of free software (and charge
|
||||||
|
for this service if you wish); that you receive source code or can get
|
||||||
|
it if you want it; that you can change the software and use pieces of
|
||||||
|
it in new free programs; and that you are informed that you can do
|
||||||
|
these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
distributors to deny you these rights or to ask you to surrender these
|
||||||
|
rights. These restrictions translate to certain responsibilities for
|
||||||
|
you if you distribute copies of the library or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of the library, whether gratis
|
||||||
|
or for a fee, you must give the recipients all the rights that we gave
|
||||||
|
you. You must make sure that they, too, receive or can get the source
|
||||||
|
code. If you link other code with the library, you must provide
|
||||||
|
complete object files to the recipients, so that they can relink them
|
||||||
|
with the library after making changes to the library and recompiling
|
||||||
|
it. And you must show them these terms so they know their rights.
|
||||||
|
|
||||||
|
We protect your rights with a two-step method: (1) we copyright the
|
||||||
|
library, and (2) we offer you this license, which gives you legal
|
||||||
|
permission to copy, distribute and/or modify the library.
|
||||||
|
|
||||||
|
To protect each distributor, we want to make it very clear that
|
||||||
|
there is no warranty for the free library. Also, if the library is
|
||||||
|
modified by someone else and passed on, the recipients should know
|
||||||
|
that what they have is not the original version, so that the original
|
||||||
|
author's reputation will not be affected by problems that might be
|
||||||
|
introduced by others.
|
||||||
|
|
||||||
|
Finally, software patents pose a constant threat to the existence of
|
||||||
|
any free program. We wish to make sure that a company cannot
|
||||||
|
effectively restrict the users of a free program by obtaining a
|
||||||
|
restrictive license from a patent holder. Therefore, we insist that
|
||||||
|
any patent license obtained for a version of the library must be
|
||||||
|
consistent with the full freedom of use specified in this license.
|
||||||
|
|
||||||
|
Most GNU software, including some libraries, is covered by the
|
||||||
|
ordinary GNU General Public License. This license, the GNU Lesser
|
||||||
|
General Public License, applies to certain designated libraries, and
|
||||||
|
is quite different from the ordinary General Public License. We use
|
||||||
|
this license for certain libraries in order to permit linking those
|
||||||
|
libraries into non-free programs.
|
||||||
|
|
||||||
|
When a program is linked with a library, whether statically or using
|
||||||
|
a shared library, the combination of the two is legally speaking a
|
||||||
|
combined work, a derivative of the original library. The ordinary
|
||||||
|
General Public License therefore permits such linking only if the
|
||||||
|
entire combination fits its criteria of freedom. The Lesser General
|
||||||
|
Public License permits more lax criteria for linking other code with
|
||||||
|
the library.
|
||||||
|
|
||||||
|
We call this license the "Lesser" General Public License because it
|
||||||
|
does Less to protect the user's freedom than the ordinary General
|
||||||
|
Public License. It also provides other free software developers Less
|
||||||
|
of an advantage over competing non-free programs. These disadvantages
|
||||||
|
are the reason we use the ordinary General Public License for many
|
||||||
|
libraries. However, the Lesser license provides advantages in certain
|
||||||
|
special circumstances.
|
||||||
|
|
||||||
|
For example, on rare occasions, there may be a special need to
|
||||||
|
encourage the widest possible use of a certain library, so that it becomes
|
||||||
|
a de-facto standard. To achieve this, non-free programs must be
|
||||||
|
allowed to use the library. A more frequent case is that a free
|
||||||
|
library does the same job as widely used non-free libraries. In this
|
||||||
|
case, there is little to gain by limiting the free library to free
|
||||||
|
software only, so we use the Lesser General Public License.
|
||||||
|
|
||||||
|
In other cases, permission to use a particular library in non-free
|
||||||
|
programs enables a greater number of people to use a large body of
|
||||||
|
free software. For example, permission to use the GNU C Library in
|
||||||
|
non-free programs enables many more people to use the whole GNU
|
||||||
|
operating system, as well as its variant, the GNU/Linux operating
|
||||||
|
system.
|
||||||
|
|
||||||
|
Although the Lesser General Public License is Less protective of the
|
||||||
|
users' freedom, it does ensure that the user of a program that is
|
||||||
|
linked with the Library has the freedom and the wherewithal to run
|
||||||
|
that program using a modified version of the Library.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow. Pay close attention to the difference between a
|
||||||
|
"work based on the library" and a "work that uses the library". The
|
||||||
|
former contains code derived from the library, whereas the latter must
|
||||||
|
be combined with the library in order to run.
|
||||||
|
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License Agreement applies to any software library or other
|
||||||
|
program which contains a notice placed by the copyright holder or
|
||||||
|
other authorized party saying it may be distributed under the terms of
|
||||||
|
this Lesser General Public License (also called "this License").
|
||||||
|
Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
A "library" means a collection of software functions and/or data
|
||||||
|
prepared so as to be conveniently linked with application programs
|
||||||
|
(which use some of those functions and data) to form executables.
|
||||||
|
|
||||||
|
The "Library", below, refers to any such software library or work
|
||||||
|
which has been distributed under these terms. A "work based on the
|
||||||
|
Library" means either the Library or any derivative work under
|
||||||
|
copyright law: that is to say, a work containing the Library or a
|
||||||
|
portion of it, either verbatim or with modifications and/or translated
|
||||||
|
straightforwardly into another language. (Hereinafter, translation is
|
||||||
|
included without limitation in the term "modification".)
|
||||||
|
|
||||||
|
"Source code" for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For a library, complete source code means
|
||||||
|
all the source code for all modules it contains, plus any associated
|
||||||
|
interface definition files, plus the scripts used to control compilation
|
||||||
|
and installation of the library.
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running a program using the Library is not restricted, and output from
|
||||||
|
such a program is covered only if its contents constitute a work based
|
||||||
|
on the Library (independent of the use of the Library in a tool for
|
||||||
|
writing it). Whether that is true depends on what the Library does
|
||||||
|
and what the program that uses the Library does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Library's
|
||||||
|
complete source code as you receive it, in any medium, provided that
|
||||||
|
you conspicuously and appropriately publish on each copy an
|
||||||
|
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||||
|
all the notices that refer to this License and to the absence of any
|
||||||
|
warranty; and distribute a copy of this License along with the
|
||||||
|
Library.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy,
|
||||||
|
and you may at your option offer warranty protection in exchange for a
|
||||||
|
fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Library or any portion
|
||||||
|
of it, thus forming a work based on the Library, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The modified work must itself be a software library.
|
||||||
|
|
||||||
|
b) You must cause the files modified to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
c) You must cause the whole of the work to be licensed at no
|
||||||
|
charge to all third parties under the terms of this License.
|
||||||
|
|
||||||
|
d) If a facility in the modified Library refers to a function or a
|
||||||
|
table of data to be supplied by an application program that uses
|
||||||
|
the facility, other than as an argument passed when the facility
|
||||||
|
is invoked, then you must make a good faith effort to ensure that,
|
||||||
|
in the event an application does not supply such function or
|
||||||
|
table, the facility still operates, and performs whatever part of
|
||||||
|
its purpose remains meaningful.
|
||||||
|
|
||||||
|
(For example, a function in a library to compute square roots has
|
||||||
|
a purpose that is entirely well-defined independent of the
|
||||||
|
application. Therefore, Subsection 2d requires that any
|
||||||
|
application-supplied function or table used by this function must
|
||||||
|
be optional: if the application does not supply it, the square
|
||||||
|
root function must still compute square roots.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Library,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Library, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote
|
||||||
|
it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Library.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Library
|
||||||
|
with the Library (or with a work based on the Library) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||||
|
License instead of this License to a given copy of the Library. To do
|
||||||
|
this, you must alter all the notices that refer to this License, so
|
||||||
|
that they refer to the ordinary GNU General Public License, version 2,
|
||||||
|
instead of to this License. (If a newer version than version 2 of the
|
||||||
|
ordinary GNU General Public License has appeared, then you can specify
|
||||||
|
that version instead if you wish.) Do not make any other change in
|
||||||
|
these notices.
|
||||||
|
|
||||||
|
Once this change is made in a given copy, it is irreversible for
|
||||||
|
that copy, so the ordinary GNU General Public License applies to all
|
||||||
|
subsequent copies and derivative works made from that copy.
|
||||||
|
|
||||||
|
This option is useful when you wish to copy part of the code of
|
||||||
|
the Library into a program that is not a library.
|
||||||
|
|
||||||
|
4. You may copy and distribute the Library (or a portion or
|
||||||
|
derivative of it, under Section 2) in object code or executable form
|
||||||
|
under the terms of Sections 1 and 2 above provided that you accompany
|
||||||
|
it with the complete corresponding machine-readable source code, which
|
||||||
|
must be distributed under the terms of Sections 1 and 2 above on a
|
||||||
|
medium customarily used for software interchange.
|
||||||
|
|
||||||
|
If distribution of object code is made by offering access to copy
|
||||||
|
from a designated place, then offering equivalent access to copy the
|
||||||
|
source code from the same place satisfies the requirement to
|
||||||
|
distribute the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
5. A program that contains no derivative of any portion of the
|
||||||
|
Library, but is designed to work with the Library by being compiled or
|
||||||
|
linked with it, is called a "work that uses the Library". Such a
|
||||||
|
work, in isolation, is not a derivative work of the Library, and
|
||||||
|
therefore falls outside the scope of this License.
|
||||||
|
|
||||||
|
However, linking a "work that uses the Library" with the Library
|
||||||
|
creates an executable that is a derivative of the Library (because it
|
||||||
|
contains portions of the Library), rather than a "work that uses the
|
||||||
|
library". The executable is therefore covered by this License.
|
||||||
|
Section 6 states terms for distribution of such executables.
|
||||||
|
|
||||||
|
When a "work that uses the Library" uses material from a header file
|
||||||
|
that is part of the Library, the object code for the work may be a
|
||||||
|
derivative work of the Library even though the source code is not.
|
||||||
|
Whether this is true is especially significant if the work can be
|
||||||
|
linked without the Library, or if the work is itself a library. The
|
||||||
|
threshold for this to be true is not precisely defined by law.
|
||||||
|
|
||||||
|
If such an object file uses only numerical parameters, data
|
||||||
|
structure layouts and accessors, and small macros and small inline
|
||||||
|
functions (ten lines or less in length), then the use of the object
|
||||||
|
file is unrestricted, regardless of whether it is legally a derivative
|
||||||
|
work. (Executables containing this object code plus portions of the
|
||||||
|
Library will still fall under Section 6.)
|
||||||
|
|
||||||
|
Otherwise, if the work is a derivative of the Library, you may
|
||||||
|
distribute the object code for the work under the terms of Section 6.
|
||||||
|
Any executables containing that work also fall under Section 6,
|
||||||
|
whether or not they are linked directly with the Library itself.
|
||||||
|
|
||||||
|
6. As an exception to the Sections above, you may also combine or
|
||||||
|
link a "work that uses the Library" with the Library to produce a
|
||||||
|
work containing portions of the Library, and distribute that work
|
||||||
|
under terms of your choice, provided that the terms permit
|
||||||
|
modification of the work for the customer's own use and reverse
|
||||||
|
engineering for debugging such modifications.
|
||||||
|
|
||||||
|
You must give prominent notice with each copy of the work that the
|
||||||
|
Library is used in it and that the Library and its use are covered by
|
||||||
|
this License. You must supply a copy of this License. If the work
|
||||||
|
during execution displays copyright notices, you must include the
|
||||||
|
copyright notice for the Library among them, as well as a reference
|
||||||
|
directing the user to the copy of this License. Also, you must do one
|
||||||
|
of these things:
|
||||||
|
|
||||||
|
a) Accompany the work with the complete corresponding
|
||||||
|
machine-readable source code for the Library including whatever
|
||||||
|
changes were used in the work (which must be distributed under
|
||||||
|
Sections 1 and 2 above); and, if the work is an executable linked
|
||||||
|
with the Library, with the complete machine-readable "work that
|
||||||
|
uses the Library", as object code and/or source code, so that the
|
||||||
|
user can modify the Library and then relink to produce a modified
|
||||||
|
executable containing the modified Library. (It is understood
|
||||||
|
that the user who changes the contents of definitions files in the
|
||||||
|
Library will not necessarily be able to recompile the application
|
||||||
|
to use the modified definitions.)
|
||||||
|
|
||||||
|
b) Use a suitable shared library mechanism for linking with the
|
||||||
|
Library. A suitable mechanism is one that (1) uses at run time a
|
||||||
|
copy of the library already present on the user's computer system,
|
||||||
|
rather than copying library functions into the executable, and (2)
|
||||||
|
will operate properly with a modified version of the library, if
|
||||||
|
the user installs one, as long as the modified version is
|
||||||
|
interface-compatible with the version that the work was made with.
|
||||||
|
|
||||||
|
c) Accompany the work with a written offer, valid for at
|
||||||
|
least three years, to give the same user the materials
|
||||||
|
specified in Subsection 6a, above, for a charge no more
|
||||||
|
than the cost of performing this distribution.
|
||||||
|
|
||||||
|
d) If distribution of the work is made by offering access to copy
|
||||||
|
from a designated place, offer equivalent access to copy the above
|
||||||
|
specified materials from the same place.
|
||||||
|
|
||||||
|
e) Verify that the user has already received a copy of these
|
||||||
|
materials or that you have already sent this user a copy.
|
||||||
|
|
||||||
|
For an executable, the required form of the "work that uses the
|
||||||
|
Library" must include any data and utility programs needed for
|
||||||
|
reproducing the executable from it. However, as a special exception,
|
||||||
|
the materials to be distributed need not include anything that is
|
||||||
|
normally distributed (in either source or binary form) with the major
|
||||||
|
components (compiler, kernel, and so on) of the operating system on
|
||||||
|
which the executable runs, unless that component itself accompanies
|
||||||
|
the executable.
|
||||||
|
|
||||||
|
It may happen that this requirement contradicts the license
|
||||||
|
restrictions of other proprietary libraries that do not normally
|
||||||
|
accompany the operating system. Such a contradiction means you cannot
|
||||||
|
use both them and the Library together in an executable that you
|
||||||
|
distribute.
|
||||||
|
|
||||||
|
7. You may place library facilities that are a work based on the
|
||||||
|
Library side-by-side in a single library together with other library
|
||||||
|
facilities not covered by this License, and distribute such a combined
|
||||||
|
library, provided that the separate distribution of the work based on
|
||||||
|
the Library and of the other library facilities is otherwise
|
||||||
|
permitted, and provided that you do these two things:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work
|
||||||
|
based on the Library, uncombined with any other library
|
||||||
|
facilities. This must be distributed under the terms of the
|
||||||
|
Sections above.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library of the fact
|
||||||
|
that part of it is a work based on the Library, and explaining
|
||||||
|
where to find the accompanying uncombined form of the same work.
|
||||||
|
|
||||||
|
8. You may not copy, modify, sublicense, link with, or distribute
|
||||||
|
the Library except as expressly provided under this License. Any
|
||||||
|
attempt otherwise to copy, modify, sublicense, link with, or
|
||||||
|
distribute the Library is void, and will automatically terminate your
|
||||||
|
rights under this License. However, parties who have received copies,
|
||||||
|
or rights, from you under this License will not have their licenses
|
||||||
|
terminated so long as such parties remain in full compliance.
|
||||||
|
|
||||||
|
9. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Library or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Library (or any work based on the
|
||||||
|
Library), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Library or works based on it.
|
||||||
|
|
||||||
|
10. Each time you redistribute the Library (or any work based on the
|
||||||
|
Library), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute, link with or modify the Library
|
||||||
|
subject to these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties with
|
||||||
|
this License.
|
||||||
|
|
||||||
|
11. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Library at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Library by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Library.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under any
|
||||||
|
particular circumstance, the balance of the section is intended to apply,
|
||||||
|
and the section as a whole is intended to apply in other circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
12. If the distribution and/or use of the Library is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Library under this License may add
|
||||||
|
an explicit geographical distribution limitation excluding those countries,
|
||||||
|
so that distribution is permitted only in or among countries not thus
|
||||||
|
excluded. In such case, this License incorporates the limitation as if
|
||||||
|
written in the body of this License.
|
||||||
|
|
||||||
|
13. The Free Software Foundation may publish revised and/or new
|
||||||
|
versions of the Lesser General Public License from time to time.
|
||||||
|
Such new versions will be similar in spirit to the present version,
|
||||||
|
but may differ in detail to address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Library
|
||||||
|
specifies a version number of this License which applies to it and
|
||||||
|
"any later version", you have the option of following the terms and
|
||||||
|
conditions either of that version or of any later version published by
|
||||||
|
the Free Software Foundation. If the Library does not specify a
|
||||||
|
license version number, you may choose any version ever published by
|
||||||
|
the Free Software Foundation.
|
||||||
|
|
||||||
|
14. If you wish to incorporate parts of the Library into other free
|
||||||
|
programs whose distribution conditions are incompatible with these,
|
||||||
|
write to the author to ask for permission. For software which is
|
||||||
|
copyrighted by the Free Software Foundation, write to the Free
|
||||||
|
Software Foundation; we sometimes make exceptions for this. Our
|
||||||
|
decision will be guided by the two goals of preserving the free status
|
||||||
|
of all derivatives of our free software and of promoting the sharing
|
||||||
|
and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||||
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||||
|
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||||
|
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||||
|
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||||
|
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||||
|
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||||
|
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||||
|
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||||
|
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||||
|
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||||
|
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||||
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||||
|
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||||
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
|
DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Libraries
|
||||||
|
|
||||||
|
If you develop a new library, and you want it to be of the greatest
|
||||||
|
possible use to the public, we recommend making it free software that
|
||||||
|
everyone can redistribute and change. You can do so by permitting
|
||||||
|
redistribution under these terms (or, alternatively, under the terms of the
|
||||||
|
ordinary General Public License).
|
||||||
|
|
||||||
|
To apply these terms, attach the following notices to the library. It is
|
||||||
|
safest to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least the
|
||||||
|
"copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the library's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This library is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Lesser General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This library is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Lesser General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Lesser General Public
|
||||||
|
License along with this library; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||||
|
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1990
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
25
Makefile
Normal file
25
Makefile
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# $RCSfile: Makefile,v $
|
||||||
|
# $Revision: 1.3 $
|
||||||
|
# $Name: $
|
||||||
|
# $Date: 2003/07/16 23:32:06 $
|
||||||
|
# $Author: agibert $
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Main Makefile
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
SUBDIRS := include lib util demo doc
|
||||||
|
|
||||||
|
FILE_DOC := *.txt
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include Makefile.var
|
||||||
|
include Makefile.rule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dir_clean:
|
||||||
|
$(RM) $(PROG_VERSION_NAME).src.*
|
||||||
359
Makefile.rule
Normal file
359
Makefile.rule
Normal file
@@ -0,0 +1,359 @@
|
|||||||
|
# $RCSfile: Makefile.rule,v $
|
||||||
|
# $Revision: 1.4 $
|
||||||
|
# $Name: $
|
||||||
|
# $Date: 2003/07/16 23:37:37 $
|
||||||
|
# $Author: agibert $
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Rule Makefile
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------- DEFAULT RULES ---------------------
|
||||||
|
default:all
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------- IMPLICITES RULES ---------------------
|
||||||
|
|
||||||
|
# Here are all the rules allowing to compile sources files
|
||||||
|
# c -> o
|
||||||
|
%.o:%.c
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
|
||||||
|
|
||||||
|
# c -> executable
|
||||||
|
.c :
|
||||||
|
$(CC) $(CFLAGS) $(INCLUDE) $< -o $@ -I . $(LIB)
|
||||||
|
|
||||||
|
# o -> executable
|
||||||
|
%:%.o
|
||||||
|
$(CC) $(LFLAGS) -o $@ $? $(LIB)
|
||||||
|
|
||||||
|
# .o -> .so
|
||||||
|
%.so:%.o
|
||||||
|
$(CC) $(LDSOFLAGS) -shared -o $@ $? $(LIB)
|
||||||
|
|
||||||
|
%.a:%.o
|
||||||
|
$(AR) -r $@ $?
|
||||||
|
|
||||||
|
$(OBJECTS) : $(SRC)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "depend" rule allow to build the dependancy file
|
||||||
|
depend:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "all" Rule
|
||||||
|
all: dir_all
|
||||||
|
ifneq ($(SUBDIRS),)
|
||||||
|
for d in $(SUBDIRS) ; do $(MAKE) all -C $$d/ ; done
|
||||||
|
endif
|
||||||
|
|
||||||
|
dir_all: $(TARGETS)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "clean" Rule
|
||||||
|
clean: dir_clean
|
||||||
|
ifneq ($(SUBDIRS),)
|
||||||
|
for d in $(SUBDIRS) ; do $(MAKE) clean -C $$d/ ; done
|
||||||
|
endif
|
||||||
|
|
||||||
|
dir_clean:
|
||||||
|
@(command="$(RM) $(TARGETS) $$(echo $(SRC) | sed "s/\.c/\.o/g") ;" ; \
|
||||||
|
echo $$command ; \
|
||||||
|
eval $$command ;)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "pre_install" Rule
|
||||||
|
# This empty rule can be overiden in module Makefile in order to run pre-install commands.
|
||||||
|
pre_install:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "post_install" Rule
|
||||||
|
# This empty rule can be overiden in module Makefile in order to run post-install commands.
|
||||||
|
post_install:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "install" Rule
|
||||||
|
install: dir_install
|
||||||
|
ifneq ($(SUBDIRS),)
|
||||||
|
for d in $(SUBDIRS) ; do $(MAKE) install -C $$d/ ; done
|
||||||
|
endif
|
||||||
|
|
||||||
|
dir_install: dir_all
|
||||||
|
$(MAKE) pre_install
|
||||||
|
ifneq ($(FILE_BIN),)
|
||||||
|
@if test ! -d $(PATH_BIN) ; then $(MKDIR) $(PATH_BIN) ; fi
|
||||||
|
$(INSTALLBIN) $(FILE_BIN) $(PATH_BIN)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_BINSUID),)
|
||||||
|
@if test ! -d $(PATH_BINSUID) ; then $(MKDIR) $(PATH_BINSUID) ; fi
|
||||||
|
$(INSTALLBINSUID) $(FILE_BINSUID) $(PATH_BINSUID)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_CGI),)
|
||||||
|
@if test ! -d $(PATH_CGI) ; then $(MKDIR) $(PATH_CGI) ; fi
|
||||||
|
$(INSTALLCGI) $(FILE_CGI) $(PATH_CGI)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_DOC),)
|
||||||
|
@if test ! -d $(PATH_DOC) ; then $(MKDIR) $(PATH_DOC) ; fi
|
||||||
|
$(INSTALLDOC) $(FILE_DOC) $(PATH_DOC)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_ETC),)
|
||||||
|
@if test ! -d $(PATH_ETC) ; then $(MKDIR) $(PATH_ETC) ; fi
|
||||||
|
$(INSTALLETC) $(FILE_ETC) $(PATH_ETC)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HOME),)
|
||||||
|
@if test ! -d $(PATH_HOME) ; then $(MKDIR) $(PATH_HOME) ; fi
|
||||||
|
$(INSTALLHOME) $(FILE_HOME) $(PATH_HOME)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HOMEBIN),)
|
||||||
|
@if test ! -d $(PATH_HOMEBIN) ; then $(MKDIR) $(PATH_HOMEBIN) ; fi
|
||||||
|
$(INSTALLHOMEBIN) $(FILE_HOMEBIN) $(PATH_HOMEBIN)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_LIB),)
|
||||||
|
@if test ! -d $(PATH_LIB) ; then $(MKDIR) $(PATH_LIB) ; fi
|
||||||
|
$(INSTALLLIB) $(FILE_LIB) $(PATH_LIB)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HOMELIB),)
|
||||||
|
@if test ! -d $(PATH_HOMELIB) ; then $(MKDIR) $(PATH_HOMELIB) ; fi
|
||||||
|
$(INSTALLHOMELIB) $(FILE_HOMELIB) $(PATH_HOMELIB)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_INCLUDE),)
|
||||||
|
@if test ! -d $(PATH_INCLUDE) ; then $(MKDIR) $(PATH_INCLUDE) ; fi
|
||||||
|
$(INSTALLINCLUDE) $(FILE_INCLUDE) $(PATH_INCLUDE)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_MAN),)
|
||||||
|
@for d in $(FILE_MAN) ; do \
|
||||||
|
if test ! -d $(PATH_MAN)/$(FILE_MAN) ; then \
|
||||||
|
$(MKDIR) $(PATH_MAN)/$(FILE_MAN) ; \
|
||||||
|
fi ; \
|
||||||
|
$(INSTALLMAN) $(FILE_MAN)/* $(PATH_MAN)/$(FILE_MAN) ; \
|
||||||
|
done
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_WEBCONF),)
|
||||||
|
@if test ! -d $(PATH_WEBCONF) ; then $(MKDIR) $(PATH_WEBCONF) ; fi
|
||||||
|
$(INSTALLWEBCONF) $(FILE_WEBCONF) $(PATH_WEBCONF)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_WEBCONFSSL),)
|
||||||
|
@if test ! -d $(PATH_WEBCONFSSL) ; then $(MKDIR) $(PATH_WEBCONFSSL) ; fi
|
||||||
|
$(INSTALLWEBCONFSSL) $(FILE_WEBCONFSSL) $(PATH_WEBCONFSSL)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HTML),)
|
||||||
|
@if test ! -d $(PATH_HTML) ; then $(MKDIR) $(PATH_HTML) ; fi
|
||||||
|
$(INSTALLHTML) $(FILE_HTML) $(PATH_HTML)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_WEBICONS),)
|
||||||
|
@if test ! -d $(PATH_WEBICONS) ; then $(MKDIR) $(PATH_WEBICONS) ; fi
|
||||||
|
$(INSTALLWEBICONS) $(FILE_WEBICONS) $(PATH_WEBICONS)
|
||||||
|
endif
|
||||||
|
$(MAKE) post_install
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "pre_uninstall" Rule
|
||||||
|
# This empty rule can be overiden in module Makefile in order to run pre-uninstall commands.
|
||||||
|
|
||||||
|
pre_uninstall:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "post_uninstall" Rule
|
||||||
|
# This empty rule can be overiden in module Makefile in order to run post-uninstall commands.
|
||||||
|
post_uninstall:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "uninstall" Rule
|
||||||
|
uninstall: dir_uninstall
|
||||||
|
ifneq ($(SUBDIRS),)
|
||||||
|
for d in $(SUBDIRS) ; do $(MAKE) uninstall -C $$d/ ; done
|
||||||
|
endif
|
||||||
|
|
||||||
|
dir_uninstall:
|
||||||
|
$(MAKE) pre_uninstall
|
||||||
|
ifneq ($(FILE_BIN),)
|
||||||
|
@(if test -d $(PATH_BIN) ; then \
|
||||||
|
$(CD) $(PATH_BIN) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_BIN)" ; \
|
||||||
|
echo "$(RM) $(FILE_BIN)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_BIN) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_BINSUID),)
|
||||||
|
@(if test -d $(PATH_BINSUID) ; then \
|
||||||
|
$(CD) $(PATH_BINSUID) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_BINSUID)" ; \
|
||||||
|
echo "$(RM) $(FILE_BINSUID)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_BINSUID) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_CGI),)
|
||||||
|
@(if test -d $(PATH_CGI) ; then \
|
||||||
|
$(CD) $(PATH_CGI) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_CGI)" ; \
|
||||||
|
echo "$(RM) $(FILE_CGI)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_CGI) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_DOC),)
|
||||||
|
@(if test -d $(PATH_DOC) ; then \
|
||||||
|
$(CD) $(PATH_DOC) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_DOC)" ; \
|
||||||
|
echo "$(RM) $(FILE_DOC)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_DOC) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_ETC),)
|
||||||
|
@(if test -d $(PATH_ETC) ; then \
|
||||||
|
$(CD) $(PATH_ETC) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_ETC)" ; \
|
||||||
|
echo "$(RM) $(FILE_ETC)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_ETC) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HOME),)
|
||||||
|
@(if test -d $(PATH_HOME) ; then \
|
||||||
|
$(CD) $(PATH_HOME) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_HOME)" ; \
|
||||||
|
echo "$(RM) $(FILE_HOME)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_HOME) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HOMEBIN),)
|
||||||
|
@(if test -d $(PATH_HOMEBIN) ; then \
|
||||||
|
$(CD) $(PATH_HOMEBIN) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_HOMEBIN)" ; \
|
||||||
|
echo "$(RM) $(FILE_HOMEBIN)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_HOMEBIN) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_LIB),)
|
||||||
|
@(if test -d $(PATH_LIB) ; then \
|
||||||
|
$(CD) $(PATH_LIB) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_LIB)" ; \
|
||||||
|
echo "$(RM) $(FILE_LIB)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_LIB) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HOMELIB),)
|
||||||
|
@(if test -d $(PATH_HOMELIB) ; then \
|
||||||
|
$(CD) $(PATH_HOMELIB) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_HOMELIB)" ; \
|
||||||
|
echo "$(RM) $(FILE_HOMELIB)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_HOMELIB) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_INCLUDE),)
|
||||||
|
@(if test -d $(PATH_INCLUDE) ; then \
|
||||||
|
$(CD) $(PATH_INCLUDE) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_INCLUDE)" ; \
|
||||||
|
echo "$(RM) $(FILE_INCLUDE)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_INCLUDE) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_MAN),)
|
||||||
|
@(if test -d $(PATH_MAN) ; then \
|
||||||
|
$(CD) $(PATH_MAN) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_MAN)" ; \
|
||||||
|
echo "$(RM) $(FILE_MAN)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_MAN) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_WEBCONF),)
|
||||||
|
@(if test -d $(PATH_WEBCONF) ; then \
|
||||||
|
$(CD) $(PATH_WEBCONF) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_WEBCONF)" ; \
|
||||||
|
echo "$(RM) $(FILE_WEBCONF)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_WEBCONF) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_WEBCONFSSL),)
|
||||||
|
@(if test -d $(PATH_WEBCONFSSL) ; then \
|
||||||
|
$(CD) $(PATH_WEBCONFSSL) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_WEBCONFSSL)" ; \
|
||||||
|
echo "$(RM) $(FILE_WEBCONFSSL)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_WEBCONFSSL) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_HTML),)
|
||||||
|
@(if test -d $(PATH_HTML) ; then \
|
||||||
|
$(CD) $(PATH_HTML) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_HTML)" ; \
|
||||||
|
echo "$(RM) $(FILE_HTML)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_HTML) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
ifneq ($(FILE_WEBICONS),)
|
||||||
|
@(if test -d $(PATH_WEBICONS) ; then \
|
||||||
|
$(CD) $(PATH_WEBICONS) ; \
|
||||||
|
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
|
||||||
|
if [ $$? -ne 0 ] ; then \
|
||||||
|
echo "$(CD) $(PATH_WEBICONS)" ; \
|
||||||
|
echo "$(RM) $(FILE_WEBICONS)" ; \
|
||||||
|
fi ; \
|
||||||
|
$(RM) $(FILE_WEBICONS) ; \
|
||||||
|
fi)
|
||||||
|
endif
|
||||||
|
$(MAKE) post_uninstall
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# "distrib" Rule
|
||||||
|
distrib:
|
||||||
|
$(MAKE) clean
|
||||||
|
$(MKDIR) $(TMP_DIR)/$(PROG_VERSION_NAME)
|
||||||
|
$(TAR) cf - . | $(TAR) xvpf - -C $(TMP_DIR)/$(PROG_VERSION_NAME)
|
||||||
|
$(TAR) cvf - -C $(TMP_DIR) --exclude CVS $(PROG_VERSION_NAME) | $(GZIP) -9 >$(PROG_VERSION_NAME).src.tgz
|
||||||
|
$(TAR) cvf - -C $(TMP_DIR) --exclude CVS $(PROG_VERSION_NAME) | $(BZIP2) -9 >$(PROG_VERSION_NAME).src.tbz2
|
||||||
|
$(MV) $(TMP_DIR)/$(PROG_VERSION_NAME) .
|
||||||
|
$(ZIP) -r -m -9 $(PROG_VERSION_NAME).src.zip $(PROG_VERSION_NAME) -x \*/CVS/\*
|
||||||
|
$(RM) -r $(PROG_VERSION_NAME)
|
||||||
92
Makefile.var
Normal file
92
Makefile.var
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
# $RCSfile: Makefile.var,v $
|
||||||
|
# $Revision: 1.4 $
|
||||||
|
# $Name: $
|
||||||
|
# $Date: 2005/01/19 23:30:05 $
|
||||||
|
# $Author: agibert $
|
||||||
|
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
# Variable Makefile
|
||||||
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PROG_NAME=libnode
|
||||||
|
PROG_TAG=$Name: $
|
||||||
|
|
||||||
|
ifeq ($(words $(PROG_TAG)),2)
|
||||||
|
PROG_VERSION_NAME=$(subst _,.,$(word 2, $(PROG_TAG)))
|
||||||
|
else
|
||||||
|
PROG_VERSION_NAME=$(PROG_NAME)
|
||||||
|
endif
|
||||||
|
|
||||||
|
CC=/usr/bin/gcc
|
||||||
|
AR=/usr/bin/ar
|
||||||
|
|
||||||
|
CD=cd
|
||||||
|
MKDIR=/bin/mkdir -p
|
||||||
|
RM=/bin/rm -f
|
||||||
|
MV=/bin/mv
|
||||||
|
TAR=tar
|
||||||
|
GZIP=gzip
|
||||||
|
BZIP2=bzip2
|
||||||
|
ZIP=zip
|
||||||
|
|
||||||
|
PATH_WEB=$(addprefix /var/httpd/, $(PROG_NAME))
|
||||||
|
|
||||||
|
INSTALLBIN=/usr/bin/install -m 755
|
||||||
|
INSTALLBINSUID=/usr/bin/install -m 4755
|
||||||
|
INSTALLCGI=/usr/bin/install -m 555
|
||||||
|
INSTALLDOC=/usr/bin/install -m 444
|
||||||
|
INSTALLETC=/usr/bin/install -m 600
|
||||||
|
INSTALLHOME=/usr/bin/install -m 400
|
||||||
|
INSTALLHOMEBIN=/usr/bin/install -m 750
|
||||||
|
INSTALLLIB=/usr/bin/install -m 755
|
||||||
|
INSTALLHOMELIB=/usr/bin/install -m 755
|
||||||
|
INSTALLINCLUDE=/usr/bin/install -m 644
|
||||||
|
INSTALLMAN=/usr/bin/install -m 644
|
||||||
|
INSTALLWEBCONF=/usr/bin/install -m 644
|
||||||
|
INSTALLWEBCONFSSL=/usr/bin/install -m 644
|
||||||
|
INSTALLHTML=/usr/bin/install -m 444
|
||||||
|
INSTALLWEBICONS=/usr/bin/install -m 444
|
||||||
|
|
||||||
|
ifeq ($(ROOT),)
|
||||||
|
HOME_DIR := /
|
||||||
|
else
|
||||||
|
HOME_DIR := $(ROOT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
PATH_BIN := $(addprefix $(HOME_DIR),/usr/bin)
|
||||||
|
PATH_BINSUID := $(PATH_BIN)
|
||||||
|
PATH_CGI := $(addprefix $(HOME_DIR),$(addprefix $(PATH_WEB),/cgi-bin))
|
||||||
|
PATH_DOC := $(addprefix $(HOME_DIR),$(addprefix /usr/share/doc/,$(PROG_VERSION_NAME)))
|
||||||
|
PATH_ETC := $(addprefix $(HOME_DIR),$(addprefix /etc/,$(MODULE)))
|
||||||
|
PATH_HOME := $(addprefix $(HOME_DIR),$(addprefix $(addprefix /var/lib/, $(PROG_NAME)), $(MODULE)))
|
||||||
|
PATH_HOMEBIN := $(addprefix $(HOME_DIR), $(addprefix $(addprefix /var/lib/, $(PROG_NAME)), /bin))
|
||||||
|
PATH_LIB := $(addprefix $(HOME_DIR),/usr/lib)
|
||||||
|
PATH_HOMELIB := $(addprefix $(HOME_DIR), $(addprefix $(addprefix /var/lib/, $(PROG_NAME)), /lib))
|
||||||
|
PATH_INCLUDE := $(addprefix $(HOME_DIR),/usr/include)
|
||||||
|
PATH_MAN := $(addprefix $(HOME_DIR),/usr/share/man)
|
||||||
|
PATH_WEBCONF := $(addprefix $(HOME_DIR),/etc/httpd/conf/vhosts)
|
||||||
|
PATH_WEBCONFSSL := $(addprefix $(HOME_DIR),/etc/httpd/conf/ssl)
|
||||||
|
PATH_HTML := $(addprefix $(HOME_DIR),$(addprefix $(addprefix $(PATH_WEB),/html/),$(MODULE)))
|
||||||
|
PATH_WEBICONS := $(addprefix $(HOME_DIR),$(addprefix $(PATH_WEB),/icons))
|
||||||
|
|
||||||
|
PATH_LOG := $(addprefix $(HOME_DIR),/var/log)
|
||||||
|
|
||||||
|
TMP_DIR=/tmp
|
||||||
|
|
||||||
|
CFLAGS=
|
||||||
|
|
||||||
|
ifeq ($(DEBUG), YES)
|
||||||
|
CFLAGS += -g -D_DEBUG
|
||||||
|
endif
|
||||||
|
ifeq ($(DEBUG), Y)
|
||||||
|
CFLAGS += -g -D_DEBUG
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OPTIM), YES)
|
||||||
|
CFLAGS += -O3
|
||||||
|
endif
|
||||||
|
ifeq ($(OPTIM), Y)
|
||||||
|
CFLAGS += -O3
|
||||||
|
endif
|
||||||
32
ReadMe.txt
32
ReadMe.txt
@@ -1,7 +1,7 @@
|
|||||||
# $RCSfile: ReadMe.txt,v $
|
# $RCSfile: ReadMe.txt,v $
|
||||||
# $Revision: 2.2 $
|
# $Revision: 2.7 $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
# $Date: 2002/02/25 23:40:42 $
|
# $Date: 2005/01/19 22:32:05 $
|
||||||
# $Author: agibert $
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
@@ -10,19 +10,35 @@
|
|||||||
|
|
||||||
Welcome to LibNode 2.0.x !
|
Welcome to LibNode 2.0.x !
|
||||||
|
|
||||||
This release of LibNode support the following OS:
|
|
||||||
- Linux 2.2.X and 2.4.x (tested on RedHat & Mandrake),
|
|
||||||
- Solaris 2.6,
|
|
||||||
- Windows NT4 & 2000.
|
|
||||||
|
|
||||||
The support of LibVer is now optional.
|
|
||||||
|
This release of LibNode supports the following OS:
|
||||||
|
- Linux 2.2.x, 2.4.x and 2.6.x (tested on RedHat & Mandrake),
|
||||||
|
- Solaris 2.6,
|
||||||
|
- Windows NT4, 2000 and XP.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The support of LibVer is now optional (To enable it, use: make _LIBVER_SUPPORT=1 all).
|
||||||
|
|
||||||
LibShm and LibDataStr are no more supported.
|
LibShm and LibDataStr are no more supported.
|
||||||
|
|
||||||
Warning: Associated documentation is outdated...
|
|
||||||
|
|
||||||
|
Warning: Associated documentation (including the comments !) is outdated...
|
||||||
Please read demo and ndbench code.
|
Please read demo and ndbench code.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Libnode is licensed under the LGPL/GPL GNU Licenses.
|
||||||
|
For more information, please read the corresponding source file headers.
|
||||||
|
The license details can be found in the GNU-GPL.txt, GNU-LGPL.txt and GNU-FDL.txt files.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Enjoy it!
|
Enjoy it!
|
||||||
|
|
||||||
Your LibNode Team.
|
Your LibNode Team.
|
||||||
|
|
||||||
|
arnaud@rx3.net
|
||||||
|
http://www.rx3.org/dvp/libnode
|
||||||
|
|||||||
150
ReleaseNotes.txt
150
ReleaseNotes.txt
@@ -1,47 +1,122 @@
|
|||||||
# $RCSfile: ReleaseNotes.txt,v $
|
# $RCSfile: ReleaseNotes.txt,v $
|
||||||
# $Revision: 2.7 $
|
# $Revision: 2.18 $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
# $Date: 2002/02/27 17:25:12 $
|
# $Date: 2005/01/19 23:40:40 $
|
||||||
# $Author: agibert $
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
LibNode V 2.0.7-1 - A. Gibert - 20/01/05
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
All: Add to Makefile.var auto version label detection from CVS Tag.
|
||||||
|
This should be the final release of the 2.0 branch,
|
||||||
|
This new release is developped for the MICOT/Target project (Banque de France - Paris).
|
||||||
|
LibNode: Minor bug fixes in ND_*_Info_Print() functions and ND_Library_StdErr_Set alias defines.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
LibNode V 2.0.6-1 - A. Gibert - 24/08/04
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
All: Generate *-c executables with checking mode enabled (ND_MODE=1),
|
||||||
|
Code clean up and more cleanly indented,
|
||||||
|
This new release is developped for the MICOT/Target project (Banque de France - Paris),
|
||||||
|
LibNode: Add OpenStruct tracing support (Enabled by ND_MODE=1 and Debug=1),
|
||||||
|
Re-implement for Unix and Windows target, full address checking in ND_Address_Check(),
|
||||||
|
NDDemo0: Add LibNode 2.0.6 support: Add ND_Library_Open/Close() calls,
|
||||||
|
NDBench: Add Lib_Open, Lib_Close, Index_Value_Break and Index_Node_Break command,
|
||||||
|
Improve random number generation,
|
||||||
|
Add test-10.ndb and test-errror.ndb batch files.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
LibNode V 2.0.5-1 - A. Gibert / M. Regimbeau - 28/07/03
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
All: Add a new Makefile system (Makefile.rule and Makefile.var),
|
||||||
|
Add 'make distrib' support,
|
||||||
|
Add libnode.spec file,
|
||||||
|
Move node.h from lib directory to include directory.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
LibNode V 2.0.4-1 - A. Gibert - 29/07/02
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
All: This release of libnode pass with sucess valgrind test on linux.
|
||||||
|
LibNode: Add and use ND_Index_Clear() private API,
|
||||||
|
NbBench: Add fclose() call at the end of batch_run.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
LibNode V 2.0.3-1 - A. Gibert - 09/04/02
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
All: Fix Microsoft Visual Project to generate Debug and Release config correctly,
|
||||||
|
LibNode: Change index type numeric print value from decimal to hexa in ND_Index_Info_Print() API,
|
||||||
|
LibNode: Add new cases in ND_Index_Convert() handling (List->List:FIFO and List->List:LIFO),
|
||||||
|
LibNode: Generate in Debug mode libnoded.lib, libnoded.dll, libnoded_a.lib,
|
||||||
|
LibNode: Generate in Release mode libnode.lib, libnode.dll, libnode_a.lib,
|
||||||
|
Demo0: Generate in Debug mode demo0d.exe and in Release mode demo0d.exe,
|
||||||
|
NbBench: Generate in Debug mode ndbenchd.exe and in Release mode ndbenchd.exe.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
LibNode V 2.0.2-2 - A. Gibert - 01/03/02
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
All: Add GNU-GPL.txt, GNU-LGPL.txt and GNU-FDL.txt license files,
|
||||||
|
All: Add license stuff in ReandMe.
|
||||||
|
LibNode: Add LGPL header in libnode.c, libnode.h and node.h,
|
||||||
|
LibNode: Replace GPL by LGPL in libnode.rc,
|
||||||
|
Demo0: Add GPL header in demo0.c,
|
||||||
|
NbBench: Add GPL header in ndbench.c.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.2-1 - A. Gibert - 27/02/02
|
LibNode V 2.0.2-1 - A. Gibert - 27/02/02
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
All: Makefiles now generate static and dynamic objects,
|
All: Makefiles now generate static and dynamic objects,
|
||||||
All: Add no libver support in Makefiles,
|
All: Add no libver support in Makefiles,
|
||||||
LibNode: VisualStudio Project now generate Windows DLL and use libnode.rc resource file,
|
LibNode: VisualStudio Project now generate Windows DLL and use libnode.rc resource file,
|
||||||
LibNode: Rename Index_Open_Nb into Index_Open_Count,
|
LibNode: Rename Index_Open_Nb into Index_Open_Count,
|
||||||
LibNode: Fix bugs in ND_Node_Root_Alloc() on Index_Open_Count handling,
|
LibNode: Fix bugs in ND_Node_Root_Alloc() on Index_Open_Count handling,
|
||||||
LibNode: Minor fix into ND_DataStruct_Check_I() and ND_Index_Check_I() functions.
|
LibNode: Minor fix into ND_DataStruct_Check_I() and ND_Index_Check_I() functions,
|
||||||
NbBench: Implement Index_Close and Index_Info_Print functions.
|
NbBench: Implement Index_Close and Index_Info_Print functions.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.1-1 - A. Gibert - 28/11/01
|
LibNode V 2.0.1-1 - A. Gibert - 28/11/01
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
LibNode: Fix the error level of TIMAS_KO: it's now an error status.
|
LibNode: Fix the error level of TIMAS_KO: it's now an error status.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.0-1 - A. Gibert - 26/11/01
|
LibNode V 2.0.0-1 - A. Gibert - 26/11/01
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
All: Merge the main CVS trunc with the win32 branche (2.0.0-alpha5),
|
All: Merge the main CVS trunc with the win32 branche (2.0.0-alpha5),
|
||||||
Switch file release to 2.0.
|
Switch file release to 2.0.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.0-alpha5 - A. Gibert - 25/10/01
|
LibNode V 2.0.0-alpha5 - A. Gibert - 25/10/01
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
LibNode: Add Open/Close Index support,
|
LibNode: Add Open/Close Index support,
|
||||||
LibNode: Fix return code next to empty struct manipulations,
|
LibNode: Fix return code next to empty struct manipulations,
|
||||||
@@ -49,9 +124,9 @@ NdBench: Add full multi index support.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.0-alpha4 - A. Gibert - 28/9/01
|
LibNode V 2.0.0-alpha4 - A. Gibert - 28/09/01
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
All: Add optional libver support,
|
All: Add optional libver support,
|
||||||
LibNode: Fix missing recursive offset args,
|
LibNode: Fix missing recursive offset args,
|
||||||
@@ -60,18 +135,18 @@ NdBench: Fix local stack pointer big bug.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.0-alpha3 - A. Gibert - 18/9/01
|
LibNode V 2.0.0-alpha3 - A. Gibert - 18/9/01
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
New manager args interface (again !),
|
New manager args interface (again !),
|
||||||
ndbench support batch mode.
|
ndbench support batch mode.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.0-alpha2 - A. Gibert - 8/9/01
|
LibNode V 2.0.0-alpha2 - A. Gibert - 08/09/01
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Re-enable libver support for unix,
|
Re-enable libver support for unix,
|
||||||
Bug fixes,
|
Bug fixes,
|
||||||
@@ -79,53 +154,54 @@ Code cleanup.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 2.0.0-alpha1 - A. Gibert - 7/9/01
|
LibNode V 2.0.0-alpha1 - A. Gibert - 07/09/01
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Add Full win32 support,
|
Add Full win32 support,
|
||||||
Remove libver support,
|
Remove libver support,
|
||||||
Multi index support,
|
Multi index support,
|
||||||
New manager args format,
|
New manager args format,
|
||||||
Major Code cleanup et standardisation.
|
Major Code cleanup et standardisation.
|
||||||
|
This new version (2.0.x) is developped for the TIMA project (Misys IBS - France).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 1.0.0 - S. Mas / A. Gibert - 18/7/00
|
LibNode V 1.0.0 - S. Mas / A. Gibert - 18/07/00
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Unix (Linux and Solaris) version only, for BDM project (Société Générale - Paris)
|
Unix (Linux and Solaris) version only, for BDM project (Société Générale - Paris)
|
||||||
Major code rewrite.
|
Major code rewrite.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 0.2.2 - A. Gibert - 1/6/93
|
LibNode V 0.2.2 - A. Gibert - 01/06/93
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Embeded version on OS/2 2.1 (Companie Générale des Eaux - Paris)
|
Embeded version on OS/2 2.1 (Companie Générale des Eaux - Paris)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 0.2.1 - A. Gibert - 1/4/92
|
LibNode V 0.2.1 - A. Gibert - 01/04/92
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Amiga and PC support (Bareau de Draguignan - Ste Maxime).
|
Amiga and PC support (Bareau de Draguignan - Ste Maxime).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 0.2.0 - A. Gibert - 1/3/91
|
LibNode V 0.2.0 - A. Gibert - 01/03/91
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
C version aided by p2c tools on Pyramid (Swansee University - Wales).
|
C version aided by p2c tools on Pyramid (Swansee University - Wales).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
LibNode V 0.1.0 - A. Gibert - 1/12/90
|
LibNode V 0.1.0 - A. Gibert - 01/12/90
|
||||||
--------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
Inital version in Pascal on Pyramid (Swansee University - Wales).
|
Inital version in Pascal on Pyramid (Swansee University - Wales).
|
||||||
|
|||||||
10
ToDo.txt
10
ToDo.txt
@@ -1,14 +1,14 @@
|
|||||||
# $RCSfile: ToDo.txt,v $
|
# $RCSfile: ToDo.txt,v $
|
||||||
# $Revision: 2.1 $
|
# $Revision: 2.4 $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
# $Date: 2001/11/26 11:25:11 $
|
# $Date: 2005/01/19 22:37:44 $
|
||||||
# $Author: agibert $
|
# $Author: agibert $
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- More debug !
|
- Re-enable LibShM/LibDataStr support (via symbol lookup support),
|
||||||
|
- Add Cache Value option,
|
||||||
- New English documentation (man/tex),
|
- New English documentation (man/tex),
|
||||||
- Improve API consitency,
|
- Improve API consitency.
|
||||||
- Re-enable LibShm/LibDataStr support (via TIMAT_DataStruct implementation).
|
|
||||||
|
|||||||
@@ -1,10 +1,54 @@
|
|||||||
all: demo0 demo0-static
|
SRC := nddemo0.c
|
||||||
|
TARGETS := nddemo0 nddemo0-c nddemo0-static nddemo0-static-c
|
||||||
|
FILE_BIN := nddemo0 nddemo0-c nddemo0-static nddemo0-static-c
|
||||||
|
FILE_LIB := nddemo0.dat
|
||||||
|
|
||||||
demo0-static: demo0.c ../lib/node.h ../lib/libnode.a Makefile
|
|
||||||
gcc -g -o demo0-static -I ../lib -ldl demo0.c ../lib/libnode.a
|
|
||||||
|
|
||||||
demo0: demo0.c ../lib/node.h ../lib/libnode.so Makefile
|
|
||||||
gcc -g -o demo0 -I ../lib -L ../lib -ldl -lnode demo0.c
|
|
||||||
|
|
||||||
clean:
|
include ../Makefile.var
|
||||||
rm -f demo0 demo0-static
|
include ../Makefile.rule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DEP_STATIC += ../lib/libnode.a
|
||||||
|
DEP_DYNAMIC += ../lib/libnode.so
|
||||||
|
INCLUDE += -I . -I ../include
|
||||||
|
LIBDIR += -L . -L ../lib
|
||||||
|
LIB_STATIC += ../lib/libnode.a -ldl
|
||||||
|
LIB_DYNAMIC += -lnode -ldl
|
||||||
|
CFLAGS += -rdynamic
|
||||||
|
|
||||||
|
ifdef _LIBVER_SUPPORT
|
||||||
|
DEP_STATIC += ../../libver/ver.h ../../libver/libver.a
|
||||||
|
DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so
|
||||||
|
INCLUDE += -I ../../libver/lib
|
||||||
|
LIBDIR += -L ../../libver/lib
|
||||||
|
|
||||||
|
ifeq ($(OSTYPE),linux-gnu)
|
||||||
|
LIB_STATIC += ../../libver/lib/libver.a
|
||||||
|
LIB_DYNAMIC += -lver
|
||||||
|
else
|
||||||
|
LIB_STATIC += ../../libver/lib/libver.a
|
||||||
|
LIB_DYNAMIC += -lver
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -D_LIBVER_SUPPORT
|
||||||
|
endif
|
||||||
|
|
||||||
|
ND_CHECK_FLAGS = -DND_MODE=0
|
||||||
|
ND_NOCHECK_FLAGS = -DND_MODE=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
nddemo0: nddemo0.c $(DEP_DYNAMIC)
|
||||||
|
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
|
||||||
|
|
||||||
|
nddemo0-c: nddemo0.c $(DEP_DYNAMIC)
|
||||||
|
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
|
||||||
|
|
||||||
|
nddemo0-static: nddemo0.c $(DEP_STATIC)
|
||||||
|
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
|
||||||
|
|
||||||
|
nddemo0-static-c: nddemo0.c $(DEP_STATIC)
|
||||||
|
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
|
||||||
|
|
||||||
|
|||||||
401
demo/nddemo0.c
401
demo/nddemo0.c
@@ -1,52 +1,70 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $RCSfile: nddemo0.c,v $ */
|
/* $RCSfile: nddemo0.c,v $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Revision: 2.0 $ */
|
/* $Revision: 2.8 $ */
|
||||||
/* $Name: $ */
|
/* $Name: $ */
|
||||||
/* $Date: 2001/11/26 10:53:34 $ */
|
/* $Date: 2004/08/23 22:48:37 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* This file is part of LibNode */
|
||||||
|
/* */
|
||||||
|
/* LibNode is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU General Public Licence as published by */
|
||||||
|
/* the Free Software Foundation; either version 2 of the License, or */
|
||||||
|
/* (at your option) any later version. */
|
||||||
|
/* */
|
||||||
|
/* LibNode is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU Lesser General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU General Public License */
|
||||||
|
/* along with LibNode; if not, write to the Free Software */
|
||||||
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <node.h>
|
#include <node.h>
|
||||||
//#include <windows.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DEMO_FILE_NAME "demo0.txt"
|
#define DEMO_FILE_NAME "nddemo0.dat"
|
||||||
#define STRING_LEN (short)1024
|
#define STRING_LEN ( short) 1024
|
||||||
#define STRING_SIZE (short)(STRING_LEN + 1)
|
#define STRING_SIZE ( short) ( STRING_LEN + 1)
|
||||||
#define VAL_LEN (short)64
|
#define VAL_LEN ( short) 64
|
||||||
#define VAL_SIZE (short)(VAL_LEN + 1)
|
#define VAL_SIZE ( short) ( VAL_LEN + 1)
|
||||||
#define INDEX_NB (short)4
|
#define INDEX_NB ( short) 4
|
||||||
|
|
||||||
#define NDT_CMD_INDEX0_PRINT (NDT_Command)64
|
#define NDD_CMD_INDEX0_PRINT ( NDT_Command) 64
|
||||||
#define NDT_CMD_INDEX1_PRINT (NDT_Command)65
|
#define NDD_CMD_INDEX1_PRINT ( NDT_Command) 65
|
||||||
#define NDT_CMD_INDEX2_PRINT (NDT_Command)66
|
#define NDD_CMD_INDEX2_PRINT ( NDT_Command) 66
|
||||||
#define NDT_CMD_INDEX3_PRINT (NDT_Command)67
|
#define NDD_CMD_INDEX3_PRINT ( NDT_Command) 67
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct Demo_Value
|
typedef struct Demo_Value
|
||||||
{
|
{
|
||||||
char Val0[VAL_SIZE];
|
char Val0[ VAL_SIZE];
|
||||||
char Val1[VAL_SIZE];
|
char Val1[ VAL_SIZE];
|
||||||
char Val2[VAL_SIZE];
|
char Val2[ VAL_SIZE];
|
||||||
char Val3[VAL_SIZE];
|
char Val3[ VAL_SIZE];
|
||||||
} Demo_Value;
|
} Demo_Value;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* Prototypes */
|
/* Prototypes */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status Manager_Demo_DS( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDT_Status Demo_DS_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
||||||
void DataStruct_Load( NDT_Root *, FILE *);
|
void DataStruct_Load( NDT_Root *, FILE *);
|
||||||
void DataStruct_Load( NDT_Root *, FILE *);
|
void DataStruct_Load( NDT_Root *, FILE *);
|
||||||
void Demo( char *, short);
|
void Demo( char *, short);
|
||||||
@@ -59,10 +77,10 @@ int main( int, char **);
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* */
|
/* */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
NDT_Status Demo_DS_Manager( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_Node *Node_Ptr, NDT_Command Command, va_list Args)
|
||||||
{
|
{
|
||||||
NDT_Command_Name Command_Name;
|
NDT_Command_Name Command_Name;
|
||||||
|
|
||||||
@@ -76,7 +94,7 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
|
|
||||||
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
Command_Name = "NDD_CMD_MANAGER_VERSION";
|
||||||
|
|
||||||
*Version_Name_Ptr = "$Revision: 2.0 $ $Name: $ $Date: 2001/11/26 10:53:34 $ $Author: agibert $";
|
*Version_Name_Ptr = "$Revision: 2.8 $ $Name: $ $Date: 2004/08/23 22:48:37 $ $Author: agibert $";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@@ -84,10 +102,10 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_INDEX_GET:
|
case NDD_CMD_INDEX_GET:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
||||||
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
NDT_Command Cmd = (NDT_Command)va_arg( Args, NDT_Command);
|
||||||
void *Value_ptr = (void *)va_arg( Args, void *);
|
void *Value_ptr = (void *)va_arg( Args, void *);
|
||||||
*/
|
*/
|
||||||
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
NDT_Index_Id *Reply_Index_Id_Ptr = (NDT_Index_Id *)va_arg( Args, NDT_Index_Id *);
|
||||||
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
NDT_Command *Reply_Command_Ptr = (NDT_Command *)va_arg( Args, NDT_Command *);
|
||||||
@@ -99,28 +117,28 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
|
|
||||||
switch(Cmd)
|
switch(Cmd)
|
||||||
{
|
{
|
||||||
case NDT_CMD_INDEX0_PRINT:
|
case NDD_CMD_INDEX0_PRINT:
|
||||||
{
|
{
|
||||||
*Reply_Index_Id_Ptr = 0;
|
*Reply_Index_Id_Ptr = 0;
|
||||||
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NDT_CMD_INDEX1_PRINT:
|
case NDD_CMD_INDEX1_PRINT:
|
||||||
{
|
{
|
||||||
*Reply_Index_Id_Ptr = 1;
|
*Reply_Index_Id_Ptr = 1;
|
||||||
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NDT_CMD_INDEX2_PRINT:
|
case NDD_CMD_INDEX2_PRINT:
|
||||||
{
|
{
|
||||||
*Reply_Index_Id_Ptr = 2;
|
*Reply_Index_Id_Ptr = 2;
|
||||||
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NDT_CMD_INDEX3_PRINT:
|
case NDD_CMD_INDEX3_PRINT:
|
||||||
{
|
{
|
||||||
*Reply_Index_Id_Ptr = 3;
|
*Reply_Index_Id_Ptr = 3;
|
||||||
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
*Reply_Command_Ptr = NDD_CMD_VALUE_PRINT;
|
||||||
@@ -141,10 +159,10 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_ALLOC:
|
case NDD_CMD_VALUE_ALLOC:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void **Value_Ptr_Ptr = (void **)va_arg( Args, void **);
|
void **Value_Ptr_Ptr = (void **)va_arg( Args, void **);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
va_list user_args = (va_list)va_arg( Args, va_list);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
user_type user_data = (user_type)va_arg( user_args, user_type);
|
||||||
... = (...)va_arg( user_args, ...);
|
... = (...)va_arg( user_args, ...);
|
||||||
*/
|
*/
|
||||||
Demo_Value **Value_Ptr_Ptr = va_arg( Args, Demo_Value **);
|
Demo_Value **Value_Ptr_Ptr = va_arg( Args, Demo_Value **);
|
||||||
|
|
||||||
@@ -169,10 +187,10 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_FREE:
|
case NDD_CMD_VALUE_FREE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
void *Value_Ptr = (void *)va_arg( Args, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
va_list user_args = (va_list)va_arg( Args, va_list);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
user_type user_data = (user_type)va_arg( user_args, user_type);
|
||||||
... = (...)va_arg( user_args, ...);
|
... = (...)va_arg( user_args, ...);
|
||||||
*/
|
*/
|
||||||
Demo_Value *Value_Ptr = (Demo_Value *)va_arg( Args, Demo_Value *);
|
Demo_Value *Value_Ptr = (Demo_Value *)va_arg( Args, Demo_Value *);
|
||||||
|
|
||||||
@@ -187,11 +205,11 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_COMP:
|
case NDD_CMD_VALUE_COMP:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value1_Ptr = (void *)va_arg( Args, void *);
|
void *Value1_Ptr = (void *)va_arg( Args, void *);
|
||||||
void *Value2_Ptr = (void *)va_arg( Args, void *);
|
void *Value2_Ptr = (void *)va_arg( Args, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
va_list user_args = (va_list)va_arg( Args, va_list);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
user_type user_data = (user_type)va_arg( user_args, user_type);
|
||||||
... = (...)va_arg( user_args, ...);
|
... = (...)va_arg( user_args, ...);
|
||||||
*/
|
*/
|
||||||
Demo_Value *Value1_Ptr = va_arg( Args, Demo_Value *);
|
Demo_Value *Value1_Ptr = va_arg( Args, Demo_Value *);
|
||||||
Demo_Value *Value2_Ptr = va_arg( Args, Demo_Value *);
|
Demo_Value *Value2_Ptr = va_arg( Args, Demo_Value *);
|
||||||
@@ -210,63 +228,63 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
|
|
||||||
if( rc < 0)
|
if( rc < 0)
|
||||||
{
|
{
|
||||||
return(NDS_LOWER);
|
return( NDS_LOWER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( rc > 0)
|
if( rc > 0)
|
||||||
{
|
{
|
||||||
return(NDS_GREATER);
|
return( NDS_GREATER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return(NDS_EQUAL);
|
return( NDS_EQUAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
int val1 = atoi(Value1_Ptr->Val1);
|
int val1 = atoi( Value1_Ptr->Val1);
|
||||||
int val2 = atoi(Value2_Ptr->Val1);
|
int val2 = atoi( Value2_Ptr->Val1);
|
||||||
|
|
||||||
|
|
||||||
if( val1 < val2)
|
if( val1 < val2)
|
||||||
{
|
{
|
||||||
return(NDS_LOWER);
|
return( NDS_LOWER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( val1 > val2)
|
if( val1 > val2)
|
||||||
{
|
{
|
||||||
return(NDS_GREATER);
|
return( NDS_GREATER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return(NDS_EQUAL);
|
return( NDS_EQUAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
int val1 = strlen(Value1_Ptr->Val2);
|
int val1 = strlen( Value1_Ptr->Val2);
|
||||||
int val2 = strlen(Value2_Ptr->Val2);
|
int val2 = strlen( Value2_Ptr->Val2);
|
||||||
|
|
||||||
|
|
||||||
if( val1 < val2)
|
if( val1 < val2)
|
||||||
{
|
{
|
||||||
return(NDS_LOWER);
|
return( NDS_LOWER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( val1 > val2)
|
if( val1 > val2)
|
||||||
{
|
{
|
||||||
return(NDS_GREATER);
|
return( NDS_GREATER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return(NDS_EQUAL);
|
return( NDS_EQUAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -284,10 +302,10 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_ADD:
|
case NDD_CMD_VALUE_ADD:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
void *Value_Ptr = (void *)va_arg( Args, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
va_list user_args = (va_list)va_arg( Args, va_list);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
user_type user_data = (user_type)va_arg( user_args, user_type);
|
||||||
... = (...)va_arg( user_args, ...);
|
... = (...)va_arg( user_args, ...);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_ADD";
|
Command_Name = "NDD_CMD_VALUE_ADD";
|
||||||
@@ -298,29 +316,30 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_VALUE_REMOVE:
|
case NDD_CMD_VALUE_REMOVE:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
void *Value_Ptr = (void *)va_arg( Args, void *);
|
void *Value_Ptr = (void *)va_arg( Args, void *);
|
||||||
va_list user_args = (va_list)va_arg( Args, va_list);
|
va_list user_args = (va_list)va_arg( Args, va_list);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
user_type user_data = (user_type)va_arg( user_args, user_type);
|
||||||
... = (...)va_arg( user_args, ...);
|
... = (...)va_arg( user_args, ...);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_VALUE_REMOVE";
|
Command_Name = "NDD_CMD_VALUE_REMOVE";
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
case NDD_CMD_VALUE_PRINT:
|
case NDD_CMD_VALUE_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
va_list lib_args = (va_list)va_arg( Args, va_list);
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
user_type user_data = (user_type)va_arg( user_args, user_type);
|
||||||
... = (...)va_arg( user_args, ...);
|
... = (...)va_arg( user_args, ...);
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
void *Value_Ptr = Node_Ptr->Value;
|
||||||
*/
|
*/
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
va_list lib_args = (va_list)va_arg( Args, va_list);
|
||||||
@@ -334,7 +353,7 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
Command_Name = "NDD_CMD_VALUE_PRINT";
|
Command_Name = "NDD_CMD_VALUE_PRINT";
|
||||||
|
|
||||||
fprintf( Out, "Val0: (%s) Val1: (%s) Val2: (%s) Val3: (%s)\n",
|
fprintf( Out, "Val0: (%s) Val1: (%s) Val2: (%s) Val3: (%s)\n",
|
||||||
Value_Ptr->Val0, Value_Ptr->Val1, Value_Ptr->Val2, Value_Ptr->Val3);
|
Value_Ptr->Val0, Value_Ptr->Val1, Value_Ptr->Val2, Value_Ptr->Val3);
|
||||||
|
|
||||||
return( NDS_OK);
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
@@ -342,16 +361,16 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
case NDD_CMD_INFO_PRINT:
|
case NDD_CMD_INFO_PRINT:
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
NDT_Node *Next_Node_Ptr = (NDT_Node *)va_arg( Args, NDT_Node *);
|
||||||
va_list lib_args = (va_list)va_arg( Args, va_list);
|
va_list lib_args = (va_list)va_arg( Args, va_list);
|
||||||
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
FILE *Out = (FILE *)va_arg( lib_args, FILE *);
|
||||||
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
NDT_Recursive_Mode Recursive_Mode = (NDT_Recursive_Mode)va_arg( lib_args, NDT_Recursive_Mode);
|
||||||
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
NDT_Recursive_Depth Recursive_Depth = (NDT_Recursive_Depth)va_arg( lib_args, NDT_Recursive_Depth);
|
||||||
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
va_list user_args = (va_list)va_arg( lib_args, va_list);
|
||||||
user_type user_data = (user_type)va_arg( user_args, user_type);
|
user_type user_data = (user_type)va_arg( user_args, user_type);
|
||||||
... = (...)va_arg( user_args, ...);
|
... = (...)va_arg( user_args, ...);
|
||||||
|
|
||||||
void *Value_Ptr = Node_Ptr->Value;
|
void *Value_Ptr = Node_Ptr->Value;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Command_Name = "NDD_CMD_INFO_PRINT";
|
Command_Name = "NDD_CMD_INFO_PRINT";
|
||||||
@@ -362,12 +381,12 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
printf( "Demo_DS_Manager() called with an undefined command %d\n", Command);
|
printf( "Demo_DS_Manager() called with an undefined command %d\n", Command);
|
||||||
return NDS_ERRAPI;
|
return( NDS_ERRAPI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf( "Demo_DS_Manager() called with command %d (%s)\n", Command, Command_Name);
|
printf( "Demo_DS_Manager() called with command %d (%s)\n", Command, Command_Name);
|
||||||
return NDS_OK;
|
return( NDS_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -375,7 +394,7 @@ NDT_Status Manager_Demo_DS( NDT_Root *Root_Ptr, NDT_Index_Id Index_Id, NDT_No
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* */
|
/* */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
void DataStruct_Load( NDT_Root *ds_ptr, FILE *demo_file)
|
void DataStruct_Load( NDT_Root *ds_ptr, FILE *demo_file)
|
||||||
@@ -415,7 +434,7 @@ void DataStruct_Load( NDT_Root *ds_ptr, FILE *demo_file)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf( "Input line read: \t(%s)\t(%s)\t(%s)\t(%s)\n", val0, val1, val2, val3);
|
printf( "Input line read: \t(%s)\t(%s)\t(%s)\t(%s)\n", val0, val1, val2, val3);
|
||||||
printf( "Allocate Vallue: ");
|
printf( "Allocate Vallue: ");
|
||||||
|
|
||||||
if( ( status = ND_Value_Alloc( ds_ptr, (void **)&value_ptr)) != NDS_OK)
|
if( ( status = ND_Value_Alloc( ds_ptr, (void **)&value_ptr)) != NDS_OK)
|
||||||
{
|
{
|
||||||
@@ -474,7 +493,7 @@ void DataStruct_Dump( NDT_Root *ds_ptr)
|
|||||||
|
|
||||||
printf( "Traverse DataStructure Index 0:\n");
|
printf( "Traverse DataStructure Index 0:\n");
|
||||||
|
|
||||||
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDT_CMD_INDEX0_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDD_CMD_INDEX0_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
||||||
{
|
{
|
||||||
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
||||||
}
|
}
|
||||||
@@ -485,7 +504,7 @@ void DataStruct_Dump( NDT_Root *ds_ptr)
|
|||||||
|
|
||||||
printf( "Traverse DataStructure Index 1:\n");
|
printf( "Traverse DataStructure Index 1:\n");
|
||||||
|
|
||||||
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDT_CMD_INDEX1_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDD_CMD_INDEX1_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
||||||
{
|
{
|
||||||
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
||||||
}
|
}
|
||||||
@@ -496,7 +515,7 @@ void DataStruct_Dump( NDT_Root *ds_ptr)
|
|||||||
|
|
||||||
printf( "Traverse DataStructure Index 2:\n");
|
printf( "Traverse DataStructure Index 2:\n");
|
||||||
|
|
||||||
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDT_CMD_INDEX2_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDD_CMD_INDEX2_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
||||||
{
|
{
|
||||||
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
||||||
}
|
}
|
||||||
@@ -507,7 +526,7 @@ void DataStruct_Dump( NDT_Root *ds_ptr)
|
|||||||
|
|
||||||
printf( "Traverse DataStructure Index 3:\n");
|
printf( "Traverse DataStructure Index 3:\n");
|
||||||
|
|
||||||
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDT_CMD_INDEX3_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
if( ( status = ND_DataStruct_Traverse( ds_ptr, NDD_CMD_INDEX3_PRINT, stdout, NDD_RECURSIVE_MODE_PARENT, 0)) != NDS_OK)
|
||||||
{
|
{
|
||||||
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
printf( "ND_DataStruct_Traverse() failed (%d) !\n", status);
|
||||||
}
|
}
|
||||||
@@ -520,7 +539,7 @@ void DataStruct_Dump( NDT_Root *ds_ptr)
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* */
|
/* */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
void Demo( char *Demo_File_Name, short Optimized_Mode)
|
void Demo( char *Demo_File_Name, short Optimized_Mode)
|
||||||
@@ -528,107 +547,119 @@ void Demo( char *Demo_File_Name, short Optimized_Mode)
|
|||||||
NDT_Status status;
|
NDT_Status status;
|
||||||
NDT_Root *demo_ds_ptr;
|
NDT_Root *demo_ds_ptr;
|
||||||
NDT_Index_Type index_type_initial_tab[INDEX_NB] =
|
NDT_Index_Type index_type_initial_tab[INDEX_NB] =
|
||||||
{
|
{
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO),
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO),
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO),
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO),
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO),
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO),
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO)
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO)
|
||||||
};
|
};
|
||||||
NDT_Index_Type index_type_final_tab[INDEX_NB] =
|
NDT_Index_Type index_type_final_tab[INDEX_NB] =
|
||||||
{
|
{
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_TREE | NDD_INDEX_SUBTYPE_BALANCED),
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_TREE | NDD_INDEX_SUBTYPE_BALANCED),
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_SORTED),
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_SORTED),
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_TREE | NDD_INDEX_SUBTYPE_BALANCED),
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_TREE | NDD_INDEX_SUBTYPE_BALANCED),
|
||||||
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO)
|
(NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO)
|
||||||
};
|
};
|
||||||
NDT_Index_Type *index_type_ptr;
|
NDT_Index_Type *index_type_ptr;
|
||||||
FILE *demo_file;
|
FILE *demo_file;
|
||||||
|
|
||||||
|
|
||||||
printf( "Create demo DataStructure: ");
|
printf( "Open library: ");
|
||||||
|
|
||||||
if( Optimized_Mode)
|
if( ( status = ND_Library_Open( NDD_TRUE)) != NDS_OK)
|
||||||
{
|
{
|
||||||
index_type_ptr = index_type_initial_tab;
|
printf( "ND_Library_Open() failed (%d) !\n", status);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
index_type_ptr = index_type_final_tab;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( ( status = ND_DataStruct_Open( &demo_ds_ptr, INDEX_NB, index_type_ptr, "Manager_Demo_DS", Manager_Demo_DS, NULL, NULL, NULL, NULL,0, NULL)) != NDS_OK)
|
|
||||||
{
|
|
||||||
printf( "ND_DataStruct_Open() failed (%d) !\n", status);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf( "Ok !\n");
|
printf( "Ok !\n");
|
||||||
|
|
||||||
printf( "Open demo datafile: ");
|
printf( "Create demo DataStructure: ");
|
||||||
|
|
||||||
if( ( demo_file = fopen( Demo_File_Name, "r")) == NULL)
|
if( Optimized_Mode)
|
||||||
{
|
{
|
||||||
printf( "fopen() failed (%d/%s) !\n", errno, strerror(errno));
|
index_type_ptr = index_type_initial_tab;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf( "Ok !\n");
|
index_type_ptr = index_type_final_tab;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( ( status = ND_DataStruct_Open( &demo_ds_ptr, INDEX_NB, index_type_ptr, "Demo_DS_Manager", Demo_DS_Manager, NULL, NULL, NULL, NULL,0, NULL)) != NDS_OK)
|
||||||
|
{
|
||||||
|
printf( "ND_DataStruct_Open() failed (%d) !\n", status);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf( "Ok !\n");
|
||||||
|
|
||||||
|
printf( "Open demo datafile: ");
|
||||||
|
|
||||||
|
if( ( demo_file = fopen( Demo_File_Name, "r")) == NULL)
|
||||||
|
{
|
||||||
|
printf( "fopen() failed (%d/%s) !\n", errno, strerror(errno));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf( "Ok !\n");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf( "\n\n\nLaod Data File:\n\n");
|
printf( "\n\n\nLaod Data File:\n\n");
|
||||||
DataStruct_Load( demo_ds_ptr, demo_file);
|
DataStruct_Load( demo_ds_ptr, demo_file);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if( Optimized_Mode)
|
if( Optimized_Mode)
|
||||||
{
|
{
|
||||||
|
printf( "\n\n\nInitial Structure Dump:\n\n");
|
||||||
printf( "\n\n\nInitial Structure Dump:\n\n");
|
DataStruct_Dump( demo_ds_ptr);
|
||||||
DataStruct_Dump( demo_ds_ptr);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf( "Convert data structure: ");
|
printf( "Convert data structure: ");
|
||||||
|
|
||||||
if( ( status = ND_DataStruct_Convert( demo_ds_ptr, index_type_final_tab)) != NDS_OK)
|
if( ( status = ND_DataStruct_Convert( demo_ds_ptr, index_type_final_tab)) != NDS_OK)
|
||||||
{
|
{
|
||||||
printf( "ND_DataStruct_Convert() failed (%d) !\n", status);
|
printf( "ND_DataStruct_Convert() failed (%d) !\n", status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf( "Ok !\n");
|
printf( "Ok !\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf( "\n\n\nFinal Structure Dump:\n\n");
|
printf( "\n\n\nFinal Structure Dump:\n\n");
|
||||||
DataStruct_Dump( demo_ds_ptr);
|
DataStruct_Dump( demo_ds_ptr);
|
||||||
|
|
||||||
|
printf( "Close demo datafile: ");
|
||||||
|
|
||||||
|
if( fclose( demo_file) != 0)
|
||||||
|
{
|
||||||
|
printf( "fclose() failed (%d/%s) !\n", errno, strerror(errno));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf( "Ok !\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
printf( "Close demo DataStructure: ");
|
||||||
printf( "Close demo datafile: ");
|
|
||||||
|
|
||||||
if( fclose( demo_file) != 0)
|
|
||||||
{
|
|
||||||
printf( "fclose() failed (%d/%s) !\n", errno, strerror(errno));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf( "Ok !\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf( "Close demo DataStructure: ");
|
|
||||||
|
|
||||||
if( ( status = ND_DataStruct_Close( demo_ds_ptr)) != NDS_OK)
|
if( ( status = ND_DataStruct_Close( demo_ds_ptr)) != NDS_OK)
|
||||||
|
{
|
||||||
|
printf( "ND_DataStruct_Close() failed (%d) !\n", status);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf( "Ok !\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
printf( "Close library: ");
|
||||||
|
|
||||||
|
if( ( status = ND_Library_Close()) != NDS_OK)
|
||||||
{
|
{
|
||||||
printf( "ND_DataStruct_Close() failed (%d) !\n", status);
|
printf( "ND_Library_Close() failed (%d) !\n", status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -642,7 +673,7 @@ void Demo( char *Demo_File_Name, short Optimized_Mode)
|
|||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* */
|
/* */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
int main( int argc, char **argv)
|
int main( int argc, char **argv)
|
||||||
@@ -652,34 +683,4 @@ int main( int argc, char **argv)
|
|||||||
|
|
||||||
printf( "\n\n\n\n\nOptimized Demo\n--------------\n\n\n");
|
printf( "\n\n\n\n\nOptimized Demo\n--------------\n\n\n");
|
||||||
Demo( DEMO_FILE_NAME, 1);
|
Demo( DEMO_FILE_NAME, 1);
|
||||||
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
HMODULE my_module;
|
|
||||||
char buf[256];
|
|
||||||
FARPROC my_function;
|
|
||||||
|
|
||||||
my_module = GetModuleHandle( NULL);
|
|
||||||
printf( "Module_Handle: (%p)\n", my_module);
|
|
||||||
|
|
||||||
buf[0] = '\0';
|
|
||||||
GetModuleFileName( my_module, buf, 255);
|
|
||||||
printf( "Module_Name: (%s)\n", buf);
|
|
||||||
|
|
||||||
my_function = GetProcAddress( my_module, "zob");
|
|
||||||
printf( "Function_Addr: (%p)\n", my_function);
|
|
||||||
|
|
||||||
my_function();
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
__declspec(dllexport) void zob(void)
|
|
||||||
{
|
|
||||||
printf( "Zoby la mouche qui pête...!!!\n");
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# $RCSfile: nddemo0.dat,v $
|
# $RCSfile: nddemo0.dat,v $
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# $Revision: 2.0 $
|
# $Revision: 2.1 $
|
||||||
# $Name: $
|
# $Name: $
|
||||||
# $Date: 2001/11/26 10:53:34 $
|
# $Date: 2003/07/16 00:17:02 $
|
||||||
# $Author: agibert $
|
# $Author: agibert $
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
ggg 1 xxxxxx example
|
ggg 1 xxxxxx example
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
# Microsoft Developer Studio Project File - Name="demo0" - Package Owner=<4>
|
# Microsoft Developer Studio Project File - Name="nddemo0" - Package Owner=<4>
|
||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# ** DO NOT EDIT **
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
CFG=demo0 - Win32 Debug
|
CFG=nddemo0 - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "demo0.mak".
|
!MESSAGE NMAKE /f "nddemo0.mak".
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "demo0.mak" CFG="demo0 - Win32 Debug"
|
!MESSAGE NMAKE /f "nddemo0.mak" CFG="nddemo0 - Win32 Debug"
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE "demo0 - Win32 Release" (based on "Win32 (x86) Console Application")
|
!MESSAGE "nddemo0 - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE "demo0 - Win32 Debug" (based on "Win32 (x86) Console Application")
|
!MESSAGE "nddemo0 - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
|
|
||||||
# Begin Project
|
# Begin Project
|
||||||
@@ -28,7 +28,7 @@ CFG=demo0 - Win32 Debug
|
|||||||
CPP=cl.exe
|
CPP=cl.exe
|
||||||
RSC=rc.exe
|
RSC=rc.exe
|
||||||
|
|
||||||
!IF "$(CFG)" == "demo0 - Win32 Release"
|
!IF "$(CFG)" == "nddemo0 - Win32 Release"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 0
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
@@ -37,11 +37,12 @@ RSC=rc.exe
|
|||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Release"
|
# PROP Output_Dir ""
|
||||||
# PROP Intermediate_Dir "Release"
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -49,9 +50,9 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /incremental:yes /machine:I386
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "demo0 - Win32 Debug"
|
!ELSEIF "$(CFG)" == "nddemo0 - Win32 Debug"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
# PROP BASE Use_Debug_Libraries 1
|
# PROP BASE Use_Debug_Libraries 1
|
||||||
@@ -60,12 +61,12 @@ LINK32=link.exe
|
|||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Debug"
|
# PROP Output_Dir ""
|
||||||
# PROP Intermediate_Dir "Debug"
|
# PROP Intermediate_Dir "Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
|
||||||
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
# ADD BASE RSC /l 0x809 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x809 /d "_DEBUG"
|
# ADD RSC /l 0x809 /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -73,24 +74,24 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnoded.lib /nologo /subsystem:console /debug /machine:I386 /out:"nddemo0d.exe" /pdbtype:sept
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# Begin Target
|
# Begin Target
|
||||||
|
|
||||||
# Name "demo0 - Win32 Release"
|
# Name "nddemo0 - Win32 Release"
|
||||||
# Name "demo0 - Win32 Debug"
|
# Name "nddemo0 - Win32 Debug"
|
||||||
# Begin Group "Source Files"
|
# Begin Group "Source Files"
|
||||||
|
|
||||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\demo0.c
|
SOURCE=.\nddemo0.c
|
||||||
|
|
||||||
!IF "$(CFG)" == "demo0 - Win32 Release"
|
!IF "$(CFG)" == "nddemo0 - Win32 Release"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "demo0 - Win32 Debug"
|
!ELSEIF "$(CFG)" == "nddemo0 - Win32 Debug"
|
||||||
|
|
||||||
# ADD CPP /MDd
|
# ADD CPP /MDd
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
Project: "demo0"=.\demo0\demo0.dsp - Package Owner=<4>
|
Project: "nddemo0"=.\nddemo0.dsp - Package Owner=<4>
|
||||||
|
|
||||||
Package=<5>
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
|
|||||||
5
doc/Makefile
Normal file
5
doc/Makefile
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
FILE_DOC := libnode.doc
|
||||||
|
FILE_MAN := man3
|
||||||
|
|
||||||
|
include ../Makefile.var
|
||||||
|
include ../Makefile.rule
|
||||||
6
include/Makefile
Normal file
6
include/Makefile
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
FILE_INCLUDE := node.h
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include ../Makefile.var
|
||||||
|
include ../Makefile.rule
|
||||||
327
include/node.h
327
include/node.h
@@ -1,30 +1,50 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $RCSfile: node.h,v $ */
|
/* $RCSfile: node.h,v $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Revision: 2.3 $ */
|
/* $Revision: 2.11 $ */
|
||||||
/* $Name: $ */
|
/* $Name: $ */
|
||||||
/* $Date: 2002/02/27 16:04:10 $ */
|
/* $Date: 2005/01/11 20:57:04 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* This file is part of LibNode */
|
||||||
|
/* */
|
||||||
|
/* LibNode is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU Lesser General Public Licence as published by */
|
||||||
|
/* the Free Software Foundation; either version 2.1 of the License, or */
|
||||||
|
/* (at your option) any later version. */
|
||||||
|
/* */
|
||||||
|
/* LibNode is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU Lesser General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU Lesser General Public License */
|
||||||
|
/* along with LibNode; if not, write to the Free Software */
|
||||||
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _LIBNODE_H_
|
#ifndef _LIBNODE_H_
|
||||||
#define _LIBNODE_H_
|
# define _LIBNODE_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#include <stdio.h>
|
# include <stdlib.h>
|
||||||
#include <stdlib.h>
|
# include <stdio.h>
|
||||||
#include <string.h>
|
# include <string.h>
|
||||||
#include <signal.h>
|
# include <stdarg.h>
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#ifdef _LIBVER_SUPPORT
|
# ifdef _LIBVER_SUPPORT
|
||||||
# include <ver.h>
|
# include <ver.h>
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -43,9 +63,9 @@ extern "C" {
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Différence de profondeur entre la branche la plus courte et
|
Différence de profondeur entre la branche la plus courte et
|
||||||
la plus longue d'un arbre.
|
la plus longue d'un arbre.
|
||||||
Le dépassement de ce seuil provoque le rééquilibrage de l'arbre
|
Le dépassement de ce seuil provoque le rééquilibrage de l'arbre
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DEF_MAX_DIF 100
|
#define DEF_MAX_DIF 100
|
||||||
@@ -110,9 +130,9 @@ typedef int NDT_Index_Type;
|
|||||||
|
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNKNOWN)
|
#define ND_INDEX_SUBTYPE_VALUE_UNKNOWN_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNKNOWN)
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_FIFO)
|
#define ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_FIFO)
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_LILO_IS( v) ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v)
|
#define ND_INDEX_SUBTYPE_VALUE_LILO_IS( v) ND_INDEX_SUBTYPE_VALUE_FIFO_IS( v)
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_LIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_LIFO)
|
#define ND_INDEX_SUBTYPE_VALUE_LIFO_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_LIFO)
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_FILO_IS( v) ND_INDEX_SUBTYPE_LIFO_IS( r, i)
|
#define ND_INDEX_SUBTYPE_VALUE_FILO_IS( v) ND_INDEX_SUBTYPE_LIFO_IS( r, i)
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_SORTED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_SORTED)
|
#define ND_INDEX_SUBTYPE_VALUE_SORTED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_SORTED)
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNBALANCED)
|
#define ND_INDEX_SUBTYPE_VALUE_UNBALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_UNBALANCED)
|
||||||
#define ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_BALANCED)
|
#define ND_INDEX_SUBTYPE_VALUE_BALANCED_IS( v) ( ( (v) & NDD_INDEX_SUBTYPE_MSK) == NDD_INDEX_SUBTYPE_BALANCED)
|
||||||
@@ -206,7 +226,7 @@ typedef NDT_Status NDT_Manager( struct NDT_Root *, NDT_Index_Id, struct NDT_Nod
|
|||||||
|
|
||||||
typedef char *NDT_Allocator_Name;
|
typedef char *NDT_Allocator_Name;
|
||||||
|
|
||||||
typedef NDT_Status NDT_Allocator(size_t, void **, void *);
|
typedef NDT_Status NDT_Allocator( void **, size_t, void *);
|
||||||
|
|
||||||
|
|
||||||
/* Pointeur de fonction sur le désallocateur */
|
/* Pointeur de fonction sur le désallocateur */
|
||||||
@@ -216,23 +236,23 @@ typedef NDT_Status NDT_Allocator(size_t, void **, void *);
|
|||||||
|
|
||||||
typedef char *NDT_Desallocator_Name;
|
typedef char *NDT_Desallocator_Name;
|
||||||
|
|
||||||
typedef NDT_Status NDT_Desallocator(void *, void *);
|
typedef NDT_Status NDT_Desallocator( void *, void *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct NDT_Index
|
typedef struct NDT_Index
|
||||||
{
|
{
|
||||||
NDT_Index_Type Type; /* Type de la structure (liste, arbre ... ) */
|
NDT_Index_Type Type; /* Type de la structure (liste, arbre ... ) */
|
||||||
|
|
||||||
long Node_Number; /* Nombre de noeuds dans la structure */
|
long Node_Number; /* Nombre de noeuds dans la structure */
|
||||||
long Min_Depth; /* Profondeur minimale de l'arbre */
|
long Min_Depth; /* Profondeur minimale de l'arbre */
|
||||||
long Max_Depth; /* Profondeur maximale de l'arbre */
|
long Max_Depth; /* Profondeur maximale de l'arbre */
|
||||||
long Max_Dif; /* Différence maximale autorisée entre la branche la plus courte et la plus longue */
|
long Max_Dif; /* Différence maximale autorisée entre la branche la plus courte et la plus longue */
|
||||||
long Nb_Equ; /* Nombre de réquilibrages réalisés sur l'arbre */
|
long Nb_Equ; /* Nombre de réquilibrages réalisés sur l'arbre */
|
||||||
struct NDT_Node * Head; /* Noeud de tête */
|
struct NDT_Node *Head; /* Noeud de tête */
|
||||||
struct NDT_Node * Tail; /* Noeud de queue */
|
struct NDT_Node *Tail; /* Noeud de queue */
|
||||||
struct NDT_Node * Save; /* Pointeur de sauvegarde (utile pour la fonction de restauration) */
|
struct NDT_Node *Save; /* Pointeur de sauvegarde (utile pour la fonction de restauration) */
|
||||||
|
|
||||||
} NDT_Index;
|
} NDT_Index;
|
||||||
|
|
||||||
@@ -240,22 +260,22 @@ typedef struct NDT_Index
|
|||||||
|
|
||||||
typedef struct NDT_Root
|
typedef struct NDT_Root
|
||||||
{
|
{
|
||||||
// NDT_Root_Type Type; /* Root Structure Type */
|
/* NDT_Root_Type Type;*/ /* Root Structure Type */
|
||||||
// NDT_DataStruct_Type DS_Type; /* Type de la structure (liste, arbre ... ) */
|
/* NDT_DataStruct_Type DS_Type;*/ /* Type de la structure (liste, arbre ... ) */
|
||||||
|
|
||||||
NDT_Manager *Manager_Ptr; /* Pointeur sur la fonction manager */
|
NDT_Manager *Manager_Ptr; /* Pointeur sur la fonction manager */
|
||||||
char Manager_Name[NDD_MANAGER_NAME_SIZE_MAX]; /* Nom de la fonction manager */
|
char Manager_Name[NDD_MANAGER_NAME_SIZE_MAX]; /* Nom de la fonction manager */
|
||||||
NDT_Allocator *Allocator_Ptr; /* Pointeur sur la fonction d'allocation */
|
NDT_Allocator *Allocator_Ptr; /* Pointeur sur la fonction d'allocation */
|
||||||
char Allocator_Name[NDD_ALLOCATOR_NAME_SIZE_MAX]; /* Nom de la fonction d'allocation */
|
char Allocator_Name[NDD_ALLOCATOR_NAME_SIZE_MAX]; /* Nom de la fonction d'allocation */
|
||||||
NDT_Desallocator *Desallocator_Ptr; /* Pointeur sur la fonction de désallocation */
|
NDT_Desallocator *Desallocator_Ptr; /* Pointeur sur la fonction de désallocation */
|
||||||
char Desallocator_Name[NDD_DESALLOCATOR_NAME_SIZE_MAX]; /* Nom de la fonction de désallocation */
|
char Desallocator_Name[NDD_DESALLOCATOR_NAME_SIZE_MAX]; /* Nom de la fonction de désallocation */
|
||||||
|
|
||||||
short Own_Value; /* Indique si la structure est propriétaire de ses valeurs */
|
short Own_Value; /* Indique si la structure est propriétaire de ses valeurs */
|
||||||
void *User; /* Pointeur utilisable librement par l'utilisateur */
|
void *User_Ptr; /* Pointeur utilisable librement par l'utilisateur */
|
||||||
|
|
||||||
NDT_Index_Nb Index_Nb;
|
NDT_Index_Nb Index_Nb;
|
||||||
NDT_Index_Nb Index_Open_Count;
|
NDT_Index_Nb Index_Open_Count;
|
||||||
NDT_Index Index_Tab[0];
|
NDT_Index Index_Tab[1];
|
||||||
|
|
||||||
} NDT_Root;
|
} NDT_Root;
|
||||||
|
|
||||||
@@ -264,11 +284,11 @@ typedef struct NDT_Root
|
|||||||
typedef struct NDT_DataStruct
|
typedef struct NDT_DataStruct
|
||||||
{
|
{
|
||||||
|
|
||||||
NDT_Root *Root_Ptr;
|
NDT_Root *Root_Ptr;
|
||||||
|
|
||||||
NDT_Manager *Manager_Ptr; /* Manager function pointer */
|
NDT_Manager *Manager_Ptr; /* Manager function pointer */
|
||||||
NDT_Allocator *Allocator_Ptr; /* Allocator function pointer */
|
NDT_Allocator *Allocator_Ptr; /* Allocator function pointer */
|
||||||
NDT_Desallocator *Desallocator_Ptr; /* Desallocator function pointer */
|
NDT_Desallocator *Desallocator_Ptr; /* Desallocator function pointer */
|
||||||
|
|
||||||
} NDT_DataStruct;
|
} NDT_DataStruct;
|
||||||
|
|
||||||
@@ -278,33 +298,29 @@ typedef struct NDT_DataStruct
|
|||||||
|
|
||||||
typedef struct NDT_Node
|
typedef struct NDT_Node
|
||||||
{
|
{
|
||||||
NDT_Root *Root;
|
NDT_Root *Root;
|
||||||
NDT_Index_Id Index;
|
NDT_Index_Id Index;
|
||||||
struct NDT_Node *Parent;
|
struct NDT_Node *Parent;
|
||||||
struct NDT_Node *Left;
|
struct NDT_Node *Left;
|
||||||
struct NDT_Node *Right;
|
struct NDT_Node *Right;
|
||||||
void *Value;
|
void *Value;
|
||||||
} NDT_Node;
|
} NDT_Node;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
char ND_Error_Msg [512];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef int NDT_Recursive_Mode;
|
typedef int NDT_Recursive_Mode;
|
||||||
typedef int NDT_Recursive_Depth;
|
typedef int NDT_Recursive_Depth;
|
||||||
typedef int NDT_Recursive_Offset;
|
typedef int NDT_Recursive_Offset;
|
||||||
|
|
||||||
#define NDD_RECURSIVE_MODE_UNKNOWN (NDT_Recursive_Mode)0x00
|
#define NDD_RECURSIVE_MODE_UNKNOWN (NDT_Recursive_Mode)0x00
|
||||||
#define NDD_RECURSIVE_MODE_PARENT (NDT_Recursive_Mode)0x01
|
#define NDD_RECURSIVE_MODE_PARENT (NDT_Recursive_Mode)0x01
|
||||||
#define NDD_RECURSIVE_MODE_CHILD (NDT_Recursive_Mode)0x02
|
#define NDD_RECURSIVE_MODE_CHILD (NDT_Recursive_Mode)0x02
|
||||||
#define NDD_RECURSIVE_MODE_PARENT_CHILD (NDT_Recursive_Mode)0x03
|
#define NDD_RECURSIVE_MODE_PARENT_CHILD (NDT_Recursive_Mode)0x03
|
||||||
|
|
||||||
#define ND_RECURSIVE_PARENT_IS(m) (m & NDD_RECURSIVE_MODE_PARENT)
|
#define ND_RECURSIVE_PARENT_IS(m) (m & NDD_RECURSIVE_MODE_PARENT)
|
||||||
#define ND_RECURSIVE_CHILD_IS(m) (m & NDD_RECURSIVE_MODE_CHILD)
|
#define ND_RECURSIVE_CHILD_IS(m) (m & NDD_RECURSIVE_MODE_CHILD)
|
||||||
|
|
||||||
#define ND_RECURSIVE_PRINT_OFFSET 8
|
#define ND_RECURSIVE_PRINT_OFFSET 8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -318,7 +334,7 @@ typedef int NDT_Recursive_Offset;
|
|||||||
|
|
||||||
#define ND_Library_Open ND_Library_Open_I
|
#define ND_Library_Open ND_Library_Open_I
|
||||||
#define ND_Library_Close ND_Library_Close_I
|
#define ND_Library_Close ND_Library_Close_I
|
||||||
#define ND_Library_Stderr_Set ND_Library_Stderr_Set_I
|
#define ND_Library_StdErr_Set ND_Library_StdErr_Set_I
|
||||||
|
|
||||||
#define ND_DataStruct_Open ND_DataStruct_Open_I
|
#define ND_DataStruct_Open ND_DataStruct_Open_I
|
||||||
#define ND_DataStruct_Close ND_DataStruct_Close_I
|
#define ND_DataStruct_Close ND_DataStruct_Close_I
|
||||||
@@ -334,25 +350,25 @@ typedef int NDT_Recursive_Offset;
|
|||||||
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_I
|
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_I
|
||||||
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_I
|
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_I
|
||||||
|
|
||||||
#define ND_Index_Open ND_Index_Open_I
|
#define ND_Index_Open ND_Index_Open_I
|
||||||
#define ND_Index_Close ND_Index_Close_I
|
#define ND_Index_Close ND_Index_Close_I
|
||||||
#define ND_Index_Flush ND_Index_Flush_I
|
#define ND_Index_Flush ND_Index_Flush_I
|
||||||
#define ND_Index_Check ND_Index_Check_I
|
#define ND_Index_Check ND_Index_Check_I
|
||||||
#define ND_Index_Convert ND_Index_Convert_I
|
#define ND_Index_Convert ND_Index_Convert_I
|
||||||
#define ND_Index_Reorg ND_Index_Reorg_I
|
#define ND_Index_Reorg ND_Index_Reorg_I
|
||||||
#define ND_Index_Traverse_V ND_Index_Traverse_VI
|
#define ND_Index_Traverse_V ND_Index_Traverse_VI
|
||||||
#define ND_Index_Traverse ND_Index_Traverse_I
|
#define ND_Index_Traverse ND_Index_Traverse_I
|
||||||
#define ND_Index_Info_Print ND_Index_Info_Print_I
|
#define ND_Index_Info_Print ND_Index_Info_Print_I
|
||||||
#define ND_Index_Value_Add ND_Index_Value_Add_I
|
#define ND_Index_Value_Add ND_Index_Value_Add_I
|
||||||
#define ND_Index_Value_Remove ND_Index_Value_Remove_I
|
#define ND_Index_Value_Remove ND_Index_Value_Remove_I
|
||||||
#define ND_Index_Value_Print ND_Index_Value_Print_I
|
#define ND_Index_Value_Print ND_Index_Value_Print_I
|
||||||
#define ND_Index_Node_Add ND_Index_Node_Add_I
|
#define ND_Index_Node_Add ND_Index_Node_Add_I
|
||||||
#define ND_Index_Node_Remove ND_Index_Node_Remove_I
|
#define ND_Index_Node_Remove ND_Index_Node_Remove_I
|
||||||
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_I
|
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_I
|
||||||
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_I
|
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_I
|
||||||
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_I
|
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_I
|
||||||
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_I
|
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_I
|
||||||
#define ND_Index_Node_Find ND_Index_Node_Find_I
|
#define ND_Index_Node_Find ND_Index_Node_Find_I
|
||||||
|
|
||||||
#define ND_Node_Root_Get ND_Node_Root_Get_I
|
#define ND_Node_Root_Get ND_Node_Root_Get_I
|
||||||
|
|
||||||
@@ -368,7 +384,7 @@ typedef int NDT_Recursive_Offset;
|
|||||||
|
|
||||||
#define ND_Library_Open ND_Library_Open_C
|
#define ND_Library_Open ND_Library_Open_C
|
||||||
#define ND_Library_Close ND_Library_Close_C
|
#define ND_Library_Close ND_Library_Close_C
|
||||||
#define ND_Library_Stderr_Set ND_Library_Stderr_Set_C
|
#define ND_Library_StdErr_Set ND_Library_StdErr_Set_C
|
||||||
|
|
||||||
#define ND_DataStruct_Open ND_DataStruct_Open_C
|
#define ND_DataStruct_Open ND_DataStruct_Open_C
|
||||||
#define ND_DataStruct_Close ND_DataStruct_Close_C
|
#define ND_DataStruct_Close ND_DataStruct_Close_C
|
||||||
@@ -384,25 +400,25 @@ typedef int NDT_Recursive_Offset;
|
|||||||
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_C
|
#define ND_DataStruct_Value_Print ND_DataStruct_Value_Print_C
|
||||||
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_C
|
#define ND_DataStruct_Value_Find ND_DataStruct_Value_Find_C
|
||||||
|
|
||||||
#define ND_Index_Open ND_Index_Open_C
|
#define ND_Index_Open ND_Index_Open_C
|
||||||
#define ND_Index_Close ND_Index_Close_C
|
#define ND_Index_Close ND_Index_Close_C
|
||||||
#define ND_Index_Flush ND_Index_Flush_C
|
#define ND_Index_Flush ND_Index_Flush_C
|
||||||
#define ND_Index_Check ND_Index_Check_C
|
#define ND_Index_Check ND_Index_Check_C
|
||||||
#define ND_Index_Convert ND_Index_Convert_C
|
#define ND_Index_Convert ND_Index_Convert_C
|
||||||
#define ND_Index_Reorg ND_Index_Reorg_C
|
#define ND_Index_Reorg ND_Index_Reorg_C
|
||||||
#define ND_Index_Traverse_V ND_Index_Traverse_VC
|
#define ND_Index_Traverse_V ND_Index_Traverse_VC
|
||||||
#define ND_Index_Traverse ND_Index_Traverse_C
|
#define ND_Index_Traverse ND_Index_Traverse_C
|
||||||
#define ND_Index_Info_Print ND_Index_Info_Print_C
|
#define ND_Index_Info_Print ND_Index_Info_Print_C
|
||||||
#define ND_Index_Value_Add ND_Index_Value_Add_C
|
#define ND_Index_Value_Add ND_Index_Value_Add_C
|
||||||
#define ND_Index_Value_Remove ND_Index_Value_Remove_C
|
#define ND_Index_Value_Remove ND_Index_Value_Remove_C
|
||||||
#define ND_Index_Value_Print ND_Index_Value_Print_C
|
#define ND_Index_Value_Print ND_Index_Value_Print_C
|
||||||
#define ND_Index_Node_Add ND_Index_Node_Add_C
|
#define ND_Index_Node_Add ND_Index_Node_Add_C
|
||||||
#define ND_Index_Node_Remove ND_Index_Node_Remove_C
|
#define ND_Index_Node_Remove ND_Index_Node_Remove_C
|
||||||
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_C
|
#define ND_Index_Node_First_Get ND_Index_Node_First_Get_C
|
||||||
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_C
|
#define ND_Index_Node_Last_Get ND_Index_Node_Last_Get_C
|
||||||
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_C
|
#define ND_Index_Node_Next_Get ND_Index_Node_Next_Get_C
|
||||||
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_C
|
#define ND_Index_Node_Previous_Get ND_Index_Node_Previous_Get_C
|
||||||
#define ND_Index_Node_Find ND_Index_Node_Find_C
|
#define ND_Index_Node_Find ND_Index_Node_Find_C
|
||||||
|
|
||||||
#define ND_Node_Root_Get ND_Node_Root_Get_C
|
#define ND_Node_Root_Get ND_Node_Root_Get_C
|
||||||
|
|
||||||
@@ -451,8 +467,8 @@ NDD_DLL_API NDT_Status ND_Library_Close_C( void);
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Définition de la sortie standard des messages d'erreur de la librairie */
|
/* Définition de la sortie standard des messages d'erreur de la librairie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Library_Stderr_Set_I( FILE *Out);
|
NDD_DLL_API NDT_Status ND_Library_StdErr_Set_I( FILE *);
|
||||||
NDD_DLL_API NDT_Status ND_Library_Stderr_Set_C( FILE *Out);
|
NDD_DLL_API NDT_Status ND_Library_StdErr_Set_C( FILE *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -476,8 +492,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Open_C( NDT_Root **, NDT_Index_Nb, NDT_In
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (O) Root: pointeur sur la racine de la structure de données */
|
/* (O) Root: pointeur sur la racine de la structure de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Close_I( NDT_Root *Root);
|
NDD_DLL_API NDT_Status ND_DataStruct_Close_I( NDT_Root *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Close_C( NDT_Root *Root);
|
NDD_DLL_API NDT_Status ND_DataStruct_Close_C( NDT_Root *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -486,8 +502,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Close_C( NDT_Root *Root);
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (O) Root: pointeur sur la racine de la structure de données */
|
/* (O) Root: pointeur sur la racine de la structure de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Flush_I( NDT_Root *Root);
|
NDD_DLL_API NDT_Status ND_DataStruct_Flush_I( NDT_Root *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Flush_C( NDT_Root *Root);
|
NDD_DLL_API NDT_Status ND_DataStruct_Flush_C( NDT_Root *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -501,8 +517,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Flush_C( NDT_Root *Root);
|
|||||||
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
||||||
/* (I) Out : flux de sortie du rapport */
|
/* (I) Out : flux de sortie du rapport */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Check_I( NDT_Root *Root, int *Nb_Detected, int *Nb_Corrected, FILE *Out);
|
NDD_DLL_API NDT_Status ND_DataStruct_Check_I( NDT_Root *, int *, int *, FILE *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Check_C( NDT_Root *Root, int *Nb_Detected, int *Nb_Corrected, FILE *Out);
|
NDD_DLL_API NDT_Status ND_DataStruct_Check_C( NDT_Root *, int *, int *, FILE *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -513,8 +529,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Check_C( NDT_Root *Root, int *Nb_Detecte
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_I( NDT_Root *Root);
|
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_I( NDT_Root *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_C( NDT_Root *Root);
|
NDD_DLL_API NDT_Status ND_DataStruct_Reorg_C( NDT_Root *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -537,10 +553,10 @@ NDD_DLL_API NDT_Status ND_DataStruct_Convert_C( NDT_Root *, NDT_Index_Type *)
|
|||||||
/* (I) Command: Commande à exécuter sur chaque noeud traversé */
|
/* (I) Command: Commande à exécuter sur chaque noeud traversé */
|
||||||
/* (I) Data: pointeur de données utilisateur */
|
/* (I) Data: pointeur de données utilisateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *, NDT_Command Command, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VI( NDT_Root *, NDT_Command, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *, NDT_Command Command, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_VC( NDT_Root *, NDT_Command, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_I( NDT_Root *, NDT_Command Command, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_I( NDT_Root *, NDT_Command, ...);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_C( NDT_Root *, NDT_Command Command, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Traverse_C( NDT_Root *, NDT_Command, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -550,8 +566,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Traverse_C( NDT_Root *, NDT_Command Comm
|
|||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/* (I) Out : flux de sortie */
|
/* (I) Out : flux de sortie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_I( FILE *, NDT_Root *Root, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_I( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_C( FILE *, NDT_Root *Root, NDT_Recursive_Mode Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -561,8 +577,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Info_Print_C( FILE *, NDT_Root *Root, ND
|
|||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/* (I) Value: pointeur sur la valeur à ajouter */
|
/* (I) Value: pointeur sur la valeur à ajouter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_I( NDT_Root *Root, void *Value);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_I( NDT_Root *, void *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_C( NDT_Root *Root, void *Value);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_C( NDT_Root *, void *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -573,8 +589,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Value_Add_C( NDT_Root *Root, void *Value
|
|||||||
/* (I) Reference_Value : pointeur sur la valeur de référence */
|
/* (I) Reference_Value : pointeur sur la valeur de référence */
|
||||||
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprimée */
|
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprimée */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_I( NDT_Root *Root, void *Value);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_I( NDT_Root *, void *);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_C( NDT_Root *Root, void *Value);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_C( NDT_Root *, void *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -585,8 +601,8 @@ NDD_DLL_API NDT_Status ND_DataStruct_Value_Remove_C( NDT_Root *Root, void *Va
|
|||||||
/* (I) Out : flux de sortie */
|
/* (I) Out : flux de sortie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_VI( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_VI( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_I( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_I( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -599,10 +615,10 @@ NDD_DLL_API NDT_Status ND_DataStruct_Value_Print_C( FILE *, NDT_Root *, NDT_R
|
|||||||
/* (I) Data : pointeur de données */
|
/* (I) Data : pointeur de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VI( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VI( void **, NDT_Root *, void *, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VC( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, va_list);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_VC( void **, NDT_Root *, void *, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_I( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_I( void **, NDT_Root *, void *, ...);
|
||||||
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_C( void **Value_Ptr_Ptr, NDT_Root *Root_Ptr, void *Ref_Value_Ptr, ...);
|
NDD_DLL_API NDT_Status ND_DataStruct_Value_Find_C( void **, NDT_Root *, void *, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -651,8 +667,8 @@ NDD_DLL_API NDT_Status ND_Index_Flush_C( NDT_Root *, NDT_Index_Id);
|
|||||||
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
/* (O) Nb_Corrected : pointeur sur le nombre d'erreurs */
|
||||||
/* (I) Out : flux de sortie du rapport */
|
/* (I) Out : flux de sortie du rapport */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Check_I( NDT_Root *Root, NDT_Index_Id, int *, int *, FILE *);
|
NDD_DLL_API NDT_Status ND_Index_Check_I( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Check_C( NDT_Root *Root, NDT_Index_Id, int *, int *, FILE *);
|
NDD_DLL_API NDT_Status ND_Index_Check_C( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -662,8 +678,8 @@ NDD_DLL_API NDT_Status ND_Index_Check_C( NDT_Root *Root, NDT_Index_Id, int *,
|
|||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/* (I) Target_Type: type de structure cible */
|
/* (I) Target_Type: type de structure cible */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Convert_I ( NDT_Root *, NDT_Index_Id Index_Id, NDT_Index_Type);
|
NDD_DLL_API NDT_Status ND_Index_Convert_I ( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Convert_C ( NDT_Root *, NDT_Index_Id Index_Id, NDT_Index_Type);
|
NDD_DLL_API NDT_Status ND_Index_Convert_C ( NDT_Root *, NDT_Index_Id, NDT_Index_Type);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -689,8 +705,8 @@ NDD_DLL_API NDT_Status ND_Index_Reorg_C( NDT_Root *, NDT_Index_Id);
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_VI( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_VI( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_VC( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_VC( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_I( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_I( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Traverse_C( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Index_Traverse_C( NDT_Root *, NDT_Index_Id, NDT_Command, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -713,8 +729,8 @@ NDD_DLL_API NDT_Status ND_Index_Info_Print_C( FILE *, NDT_Root *, NDT_Index_I
|
|||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/* (I) Value: pointeur sur la valeur à ajouter */
|
/* (I) Value: pointeur sur la valeur à ajouter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Add_I( NDT_Root *Root, NDT_Index_Id, void *Value);
|
NDD_DLL_API NDT_Status ND_Index_Value_Add_I( NDT_Root *, NDT_Index_Id, void *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Add_C( NDT_Root *Root, NDT_Index_Id, void *Value);
|
NDD_DLL_API NDT_Status ND_Index_Value_Add_C( NDT_Root *, NDT_Index_Id, void *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -725,8 +741,8 @@ NDD_DLL_API NDT_Status ND_Index_Value_Add_C( NDT_Root *Root, NDT_Index_Id, voi
|
|||||||
/* (I) Reference_Value : pointeur sur la valeur de référence */
|
/* (I) Reference_Value : pointeur sur la valeur de référence */
|
||||||
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprimée */
|
/* (I) Removed_Value : adresse d'un pointeur sur la valeur supprimée */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Remove_I( NDT_Root *Root, NDT_Index_Id, void *Value);
|
NDD_DLL_API NDT_Status ND_Index_Value_Remove_I( NDT_Root *, NDT_Index_Id, void *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Remove_C( NDT_Root *Root, NDT_Index_Id, void *Value);
|
NDD_DLL_API NDT_Status ND_Index_Value_Remove_C( NDT_Root *, NDT_Index_Id, void *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -737,8 +753,8 @@ NDD_DLL_API NDT_Status ND_Index_Value_Remove_C( NDT_Root *Root, NDT_Index_Id,
|
|||||||
/* (I) Out : flux de sortie */
|
/* (I) Out : flux de sortie */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Print_VI( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_VI( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Print_I( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_I( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Value_Print_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
NDD_DLL_API NDT_Status ND_Index_Value_Print_C( FILE *, NDT_Root *, NDT_Index_Id, NDT_Recursive_Mode, NDT_Recursive_Depth, NDT_Recursive_Offset, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -748,8 +764,8 @@ NDD_DLL_API NDT_Status ND_Index_Value_Print_C( FILE *, NDT_Root *, NDT_Index_
|
|||||||
/* (I) Root: pointeur sur la racine de la structure de données */
|
/* (I) Root: pointeur sur la racine de la structure de données */
|
||||||
/* (I) Node: pointeur sur le noeud à ajouter */
|
/* (I) Node: pointeur sur le noeud à ajouter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Add_I( NDT_Root * Root, NDT_Index_Id Index_Id, NDT_Node * Node );
|
NDD_DLL_API NDT_Status ND_Index_Node_Add_I( NDT_Root *, NDT_Index_Id, NDT_Node *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Add_C( NDT_Root * Root, NDT_Index_Id Index_Id, NDT_Node * Node );
|
NDD_DLL_API NDT_Status ND_Index_Node_Add_C( NDT_Root *, NDT_Index_Id, NDT_Node *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -758,8 +774,8 @@ NDD_DLL_API NDT_Status ND_Index_Node_Add_C( NDT_Root * Root, NDT_Index_Id Inde
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Node: pointeur sur le noeud à supprimer de la structure de données */
|
/* (I) Node: pointeur sur le noeud à supprimer de la structure de données */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Remove_I( NDT_Node * Node);
|
NDD_DLL_API NDT_Status ND_Index_Node_Remove_I( NDT_Node *);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Remove_C( NDT_Node * Node);
|
NDD_DLL_API NDT_Status ND_Index_Node_Remove_C( NDT_Node *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -817,8 +833,8 @@ NDD_DLL_API NDT_Status ND_Index_Node_Previous_Get_C( NDT_Node **, NDT_Node *)
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_VI( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_VI( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_VC( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_VC( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_I( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_I( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Index_Node_Find_C( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
NDD_DLL_API NDT_Status ND_Index_Node_Find_C( NDT_Node **, NDT_Root *, NDT_Index_Id, void *, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -863,8 +879,8 @@ NDD_DLL_API NDT_Status ND_Value_Free_C( NDT_Root *, void *);
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_VI( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_VI( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_VC( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_VC( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_I( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_I( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
||||||
NDD_DLL_API NDT_Status ND_Manager_Exec_C( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
NDD_DLL_API NDT_Status ND_Manager_Exec_C( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -876,8 +892,8 @@ NDD_DLL_API NDT_Status ND_Manager_Exec_C( NDT_Root *, NDT_Index_Id, NDT_Node
|
|||||||
/* (I) Size : taille de la zone à allouer */
|
/* (I) Size : taille de la zone à allouer */
|
||||||
/* (I) Data : pointeur de données utiles à l'allocateur */
|
/* (I) Data : pointeur de données utiles à l'allocateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Allocator_Exec_I( NDT_Allocator *, void **, size_t, void *);
|
NDD_DLL_API NDT_Status ND_Allocator_Exec_I( void **, size_t, NDT_Allocator_Name, NDT_Allocator *, void *);
|
||||||
NDD_DLL_API NDT_Status ND_Allocator_Exec_C( NDT_Allocator *, void **, size_t, void *);
|
NDD_DLL_API NDT_Status ND_Allocator_Exec_C( void **, size_t, NDT_Allocator_Name, NDT_Allocator *, void *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -885,16 +901,17 @@ NDD_DLL_API NDT_Status ND_Allocator_Exec_C( NDT_Allocator *, void **, size_t,
|
|||||||
/* Exécution d'une fonction de désallocation le dont nom est passé en paramètre */
|
/* Exécution d'une fonction de désallocation le dont nom est passé en paramètre */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Function : nom de la fonction à exécuter */
|
/* (I) Function : nom de la fonction à exécuter */
|
||||||
|
/* (I) Function : nom de la fonction à exécuter */
|
||||||
/* (I) Ptr : adresse de la zone à désallouer */
|
/* (I) Ptr : adresse de la zone à désallouer */
|
||||||
/* (I) Data : pointeur de données utiles au désallocateur */
|
/* (I) Data : pointeur de données utiles au désallocateur */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDD_DLL_API NDT_Status ND_Desallocator_Exec_I( NDT_Desallocator *, void *, void *);
|
NDD_DLL_API NDT_Status ND_Desallocator_Exec_I( void *, NDT_Desallocator_Name, NDT_Desallocator *, void *);
|
||||||
NDD_DLL_API NDT_Status ND_Desallocator_Exec_C( NDT_Desallocator *, void *, void *);
|
NDD_DLL_API NDT_Status ND_Desallocator_Exec_C( void *, NDT_Desallocator_Name, NDT_Desallocator *, void *);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
30
lib/Makefile
30
lib/Makefile
@@ -1,18 +1,22 @@
|
|||||||
|
SRC := libnode.c
|
||||||
|
TARGETS := libnode.a libnode.so
|
||||||
|
FILE_LIB := libnode.a libnode.so
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include ../Makefile.var
|
||||||
|
include ../Makefile.rule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DEP += libnode.h ../include/node.h Makefile
|
||||||
|
INCLUDE += -I . -I ../include
|
||||||
|
|
||||||
ifdef _LIBVER_SUPPORT
|
ifdef _LIBVER_SUPPORT
|
||||||
INCLUDE_VER = ../../libver/ver.h
|
DEP += ../../libver/ver.h
|
||||||
LIB_VER = -I ../../libver
|
INCLUDE += -I ../../libver/lib
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: libnode.a libnode.so
|
|
||||||
|
|
||||||
libnode.o: libnode.c node.h libnode.h $(INCLUDE_VER) Makefile
|
|
||||||
gcc -c -g -o libnode.o -I . $(LIB_VER) libnode.c
|
|
||||||
|
|
||||||
libnode.a: libnode.o
|
libnode.o : libnode.c $(DEP)
|
||||||
ar -r libnode.a libnode.o
|
|
||||||
|
|
||||||
libnode.so: libnode.o
|
|
||||||
ld -shared -o libnode.so libnode.o
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f libnode.o libnode.a libnode.so
|
|
||||||
|
|||||||
2667
lib/libnode.c
2667
lib/libnode.c
File diff suppressed because it is too large
Load Diff
@@ -38,11 +38,12 @@ RSC=rc.exe
|
|||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Release"
|
# PROP Output_Dir ""
|
||||||
# PROP Intermediate_Dir "Release"
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c
|
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBNODE_EXPORTS" /YX /FD /c
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||||
@@ -52,13 +53,13 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /machine:I386
|
||||||
# Begin Custom Build - Creating static library libnode_a.lib...
|
# Begin Custom Build - Creating static library libnode_a.lib...
|
||||||
InputPath=.\Release\libnode.dll
|
InputPath=.\libnode.dll
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
|
|
||||||
"Release\libnode_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"libnode_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
lib /nologo /out:Release\libnode_a.lib Release\*.obj
|
lib /nologo /out:libnode_a.lib Release\*.obj
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
@@ -71,7 +72,7 @@ SOURCE="$(InputPath)"
|
|||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Debug"
|
# PROP Output_Dir ""
|
||||||
# PROP Intermediate_Dir "Debug"
|
# PROP Intermediate_Dir "Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
@@ -87,14 +88,14 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"libnoded.dll" /pdbtype:sept
|
||||||
# SUBTRACT LINK32 /map
|
# SUBTRACT LINK32 /map
|
||||||
# Begin Custom Build - Creating static library libnode_a.lib...
|
# Begin Custom Build - Creating static library libnoded_a.lib...
|
||||||
InputPath=.\Debug\libnode.dll
|
InputPath=.\libnoded.dll
|
||||||
SOURCE="$(InputPath)"
|
SOURCE="$(InputPath)"
|
||||||
|
|
||||||
"Debug\libnode_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"libnoded_a.lib" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
lib /nologo /out:Debug\libnode_a.lib Debug\*.obj
|
lib /nologo /out:libnoded_a.lib Debug\*.obj
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
@@ -125,7 +126,7 @@ SOURCE=.\libnode.h
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\node.h
|
SOURCE=..\include\node.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Resource Files"
|
# Begin Group "Resource Files"
|
||||||
|
|||||||
211
lib/libnode.h
211
lib/libnode.h
@@ -1,19 +1,48 @@
|
|||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $RCSfile: libnode.h,v $ */
|
/* $RCSfile: libnode.h,v $ */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* $Revision: 2.1 $ */
|
/* $Revision: 2.8 $ */
|
||||||
/* $Name: $ */
|
/* $Name: $ */
|
||||||
/* $Date: 2002/02/27 16:05:15 $ */
|
/* $Date: 2005/01/11 20:57:04 $ */
|
||||||
/* $Author: agibert $ */
|
/* $Author: agibert $ */
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
/* This file is part of LibNode */
|
||||||
|
/* */
|
||||||
|
/* LibNode is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU Lesser General Public Licence as published by */
|
||||||
|
/* the Free Software Foundation; either version 2.1 of the License, or */
|
||||||
|
/* (at your option) any later version. */
|
||||||
|
/* */
|
||||||
|
/* LibNode is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU Lesser General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU Lesser General Public License */
|
||||||
|
/* along with LibNode; if not, write to the Free Software */
|
||||||
|
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
//#include <dlfcn.h>
|
#include <setjmp.h>
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Utilisation des API de la LIBNODE sans vérification des arguments */
|
||||||
|
|
||||||
|
#define ND_MODE 1
|
||||||
|
|
||||||
#include <node.h>
|
#include <node.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -23,39 +52,69 @@
|
|||||||
|
|
||||||
|
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
|
|
||||||
# define NDD_PRINTF_PTR_PREFIX ""
|
# define NDD_PRINTF_PTR_PREFIX ""
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
# define NDD_PRINTF_PTR_PREFIX "0x"
|
# define NDD_PRINTF_PTR_PREFIX "0x"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define NDD_HUGE_LONG (long)0xFFFFFFL
|
#define NDD_HUGE_LONG ( long) 0xFFFFFFL
|
||||||
|
|
||||||
/* Sortie standard des messages d'erreur */
|
|
||||||
|
|
||||||
FILE * ND_stderr;
|
|
||||||
|
|
||||||
/* Table des symboles locale */
|
/* Table des symboles locale */
|
||||||
|
|
||||||
struct Symbol {
|
struct NDT_Symbol;
|
||||||
void * Ptr;
|
|
||||||
char * Name;
|
typedef struct NDT_Symbol
|
||||||
struct Symbol * Next;
|
{
|
||||||
} * Symbol_Table = NULL;
|
void *Ptr;
|
||||||
|
char *Name;
|
||||||
|
struct NDT_Symbol *Next;
|
||||||
|
} NDT_Symbol;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* LibNode Global Base Structure */
|
||||||
|
|
||||||
|
typedef struct NDT_Base
|
||||||
|
{
|
||||||
|
int Open_Status;
|
||||||
|
int Debug_Mode;
|
||||||
|
char Err_String[512];
|
||||||
|
FILE *Err_Stream;
|
||||||
|
int Sig_Trapped;
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
|
sigjmp_buf SigLongJmp_Env;
|
||||||
|
#else
|
||||||
|
jmp_buf SigLongJmp_Env;
|
||||||
|
#endif
|
||||||
|
NDT_Symbol *Symbol_First_Ptr;
|
||||||
|
void *DL_Ptr;
|
||||||
|
NDT_Index_Type OpenStruct_Index_Type[1];
|
||||||
|
NDT_Root *OpenStruct_Ptr;
|
||||||
|
} NDT_Base;
|
||||||
|
|
||||||
|
NDT_Base NDG_Base =
|
||||||
|
{
|
||||||
|
NDD_FALSE,
|
||||||
|
NDD_TRUE,
|
||||||
|
"",
|
||||||
|
(FILE *) -1,
|
||||||
|
0,
|
||||||
|
{0},
|
||||||
|
(NDT_Symbol *) NULL,
|
||||||
|
NULL,
|
||||||
|
{ NDD_INDEX_STATUS_OPENED | NDD_INDEX_TYPE_LIST | NDD_INDEX_SUBTYPE_FIFO},
|
||||||
|
(NDT_Root *) NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
NDT_Root * Tmp_Root;
|
|
||||||
|
|
||||||
//extern char * strdup (const char *);
|
|
||||||
//extern int sigrelse (int sig);
|
|
||||||
|
|
||||||
int Sig_Trapped;
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
@@ -68,17 +127,24 @@ int Sig_Trapped;
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) va_list Arguments : Liste d'arguments contextuels */
|
/* (I) va_list Arguments : Liste d'arguments contextuels */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status Default_Manager( NDT_Root *, NDT_Index_Id, NDT_Command, va_list);
|
NDT_Status ND_Default_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------*/
|
||||||
|
/* OpenStruct Manager */
|
||||||
|
/*------------------------------------------------------------------------------*/
|
||||||
|
/* (I) va_list Arguments : Liste d'arguments contextuels */
|
||||||
|
/*------------------------------------------------------------------------------*/
|
||||||
|
NDT_Status ND_OpenStruct_Manager( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Command, va_list);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Redéfinition de la fonction malloc() avec retour de type NDT_Status */
|
/* Redéfinition de la fonction malloc() avec retour de type NDT_Status */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Default_Allocator( size_t Size, void **ptr, void *User);
|
NDT_Status ND_Default_Allocator( void **, size_t, void *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Redéfinition de la fonction free() avec retour de type NDT_Status */
|
/* Redéfinition de la fonction free() avec retour de type NDT_Status */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Default_Desallocator( void *, void *);
|
NDT_Status ND_Default_Desallocator( void *, void *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Création d'un noeud */
|
/* Création d'un noeud */
|
||||||
@@ -86,7 +152,7 @@ NDT_Status ND_Default_Desallocator( void *, void *);
|
|||||||
/* (I) Root : adresse de la racine pour laquelle on crée un noeud */
|
/* (I) Root : adresse de la racine pour laquelle on crée un noeud */
|
||||||
/* (O) New_Node : adresse du pointeur sur le nouveau noeud */
|
/* (O) New_Node : adresse du pointeur sur le nouveau noeud */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Node_Alloc (NDT_Root * Root, NDT_Node ** New_Node);
|
NDT_Status ND_Node_Alloc( NDT_Root * Root, NDT_Node ** New_Node);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Destruction d'un noeud */
|
/* Destruction d'un noeud */
|
||||||
@@ -94,7 +160,19 @@ NDT_Status ND_Node_Alloc (NDT_Root * Root, NDT_Node ** New_Node);
|
|||||||
/* (I) Root : adresse de la racine dans laquelle on détruit un noeud */
|
/* (I) Root : adresse de la racine dans laquelle on détruit un noeud */
|
||||||
/* (I) Node : pointeur sur le noeud à détruire */
|
/* (I) Node : pointeur sur le noeud à détruire */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Node_Free (NDT_Root * Root, NDT_Node * Node);
|
NDT_Status ND_Node_Free( NDT_Root *, NDT_Node *);
|
||||||
|
|
||||||
|
/*------------------------------------------------------------------------------*/
|
||||||
|
/* Création d'une nouvelle structure de données */
|
||||||
|
/*------------------------------------------------------------------------------*/
|
||||||
|
/* (O) Root: adresse d'un pointeur sur la racine de la nouvelle structure */
|
||||||
|
/* (I) Type: type de la structure.de données (liste ou arbre binaire) */
|
||||||
|
/* (I) Allocator: pointeur vers la fonction d'allocation */
|
||||||
|
/* (I) Desallocator: pointeur vers la fonction de désallocation */
|
||||||
|
/* (I) Data : pointeur de données utiles à l'allocateur */
|
||||||
|
/* (I) Own_Value : indique si la structure est propriétaire de ses valeurs */
|
||||||
|
/*------------------------------------------------------------------------------*/
|
||||||
|
NDT_Status ND_Index_Clear( NDT_Root *, NDT_Index_Id);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Création de la racine d'une structure de données quelconque */
|
/* Création de la racine d'une structure de données quelconque */
|
||||||
@@ -112,7 +190,7 @@ NDT_Status ND_Node_Root_Alloc( NDT_Root **, NDT_Index_Nb, NDT_Index_Type[], ch
|
|||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Root : pointeur sur la racine à détruire */
|
/* (I) Root : pointeur sur la racine à détruire */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Node_Root_Free (NDT_Root * Root);
|
NDT_Status ND_Node_Root_Free( NDT_Root *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Ajout d'un noeud à une liste chaînée */
|
/* Ajout d'un noeud à une liste chaînée */
|
||||||
@@ -120,7 +198,7 @@ NDT_Status ND_Node_Root_Free (NDT_Root * Root);
|
|||||||
/* (I) Root : pointeur sur la racine de la liste */
|
/* (I) Root : pointeur sur la racine de la liste */
|
||||||
/* (I) New_Node : pointeur sur le noeud à ajouter */
|
/* (I) New_Node : pointeur sur le noeud à ajouter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_List_Node_Add (NDT_Root *, NDT_Index_Id, NDT_Node *);
|
NDT_Status ND_List_Node_Add( NDT_Root *, NDT_Index_Id, NDT_Node *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Ajout d'une nouvelle valeur à une liste */
|
/* Ajout d'une nouvelle valeur à une liste */
|
||||||
@@ -128,7 +206,7 @@ NDT_Status ND_List_Node_Add (NDT_Root *, NDT_Index_Id, NDT_Node *);
|
|||||||
/* (I) Root : pointeur sur la racine de la liste */
|
/* (I) Root : pointeur sur la racine de la liste */
|
||||||
/* (I) Value : pointeur sur la valeur à ajouter */
|
/* (I) Value : pointeur sur la valeur à ajouter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_List_Value_Add (NDT_Root *, NDT_Index_Id, void *);
|
NDT_Status ND_List_Value_Add( NDT_Root *, NDT_Index_Id, void *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Ajout d'un noeud à un arbre binaire */
|
/* Ajout d'un noeud à un arbre binaire */
|
||||||
@@ -136,31 +214,31 @@ NDT_Status ND_List_Value_Add (NDT_Root *, NDT_Index_Id, void *);
|
|||||||
/* (I) Root : pointeur sur la racine de l'arbre */
|
/* (I) Root : pointeur sur la racine de l'arbre */
|
||||||
/* (I) Value : pointeur sur la valeur à ajouter */
|
/* (I) Value : pointeur sur la valeur à ajouter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Tree_Value_Add (NDT_Root *, NDT_Index_Id, void *);
|
NDT_Status ND_Tree_Value_Add( NDT_Root *, NDT_Index_Id, void *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Supprime le noeud d'une liste */
|
/* Supprime le noeud d'une liste */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Node : pointeur sur le noeud à supprimer */
|
/* (I) Node : pointeur sur le noeud à supprimer */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_List_Node_Remove (NDT_Node *);
|
NDT_Status ND_List_Node_Remove( NDT_Node *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Conversion d'une structure en liste chaînée */
|
/* Conversion d'une structure en liste chaînée */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Root : pointeur sur la racine du la structure à convertir */
|
/* (I) Root : pointeur sur la racine du la structure à convertir */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_List_Make (NDT_Root *, NDT_Index_Id);
|
NDT_Status ND_List_Make( NDT_Root *, NDT_Index_Id);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Recherche une valeur dans une liste et retourne le noeud correspondant */
|
/* Recherche une valeur dans une liste et retourne le noeud correspondant */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Node * ND_List_Node_Find (NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDT_Node *ND_List_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Recherche un noeud dans un arbre et retourne le pointeur sur le noeud */
|
/* Recherche un noeud dans un arbre et retourne le pointeur sur le noeud */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Node *ND_Tree_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list);
|
NDT_Node *ND_Tree_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Conversion d'une structure en arbre binaire */
|
/* Conversion d'une structure en arbre binaire */
|
||||||
@@ -168,28 +246,28 @@ NDT_Node *ND_Tree_Node_Find( NDT_Root *, NDT_Index_Id, void *, va_list);
|
|||||||
/* (I) Root : pointeur sur la racine du la structure à convertir */
|
/* (I) Root : pointeur sur la racine du la structure à convertir */
|
||||||
/* (I) Type : type du futur arbre */
|
/* (I) Type : type du futur arbre */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Tree_Make (NDT_Root *, NDT_Index_Id);
|
NDT_Status ND_Tree_Make( NDT_Root *, NDT_Index_Id);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Equilibrage d'un arbre */
|
/* Equilibrage d'un arbre */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Root : pointeur sur la racine de l'arbre */
|
/* (I) Root : pointeur sur la racine de l'arbre */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Tree_Equalize (NDT_Root *, NDT_Index_Id);
|
NDT_Status ND_Tree_Equalize( NDT_Root *, NDT_Index_Id);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Retourne la profondeur de la plus grande branche à partir d'un noeud */
|
/* Retourne la profondeur de la plus grande branche à partir d'un noeud */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Node : pointeur sur le noeud */
|
/* (I) Node : pointeur sur le noeud */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
long ND_Tree_MaxDepth_Get (NDT_Node *Node);
|
long ND_Tree_MaxDepth_Get( NDT_Node *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Retourne la profondeur de la plus petite branche à partir d'un noeud */
|
/* Retourne la profondeur de la plus petite branche à partir d'un noeud */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Node : pointeur sur le noeud */
|
/* (I) Node : pointeur sur le noeud */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
long ND_Tree_MinDepth_Get (NDT_Node *Node);
|
long ND_Tree_MinDepth_Get( NDT_Node *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Ajout d'un noeud à un arbre binaire */
|
/* Ajout d'un noeud à un arbre binaire */
|
||||||
@@ -197,7 +275,7 @@ long ND_Tree_MinDepth_Get (NDT_Node *Node);
|
|||||||
/* (I) Root : pointeur sur la racine de l'arbre */
|
/* (I) Root : pointeur sur la racine de l'arbre */
|
||||||
/* (I) Node : pointeur sur le noeud à ajouter */
|
/* (I) Node : pointeur sur le noeud à ajouter */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Tree_Node_Add (NDT_Root *, NDT_Index_Id, NDT_Node *);
|
NDT_Status ND_Tree_Node_Add( NDT_Root *, NDT_Index_Id, NDT_Node *);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Ajoute tous les noeud d'une liste à un arbre */
|
/* Ajoute tous les noeud d'une liste à un arbre */
|
||||||
@@ -205,60 +283,65 @@ NDT_Status ND_Tree_Node_Add (NDT_Root *, NDT_Index_Id, NDT_Node *);
|
|||||||
/* (I) Tree_Root : pointeur sur la racine de l'arbre */
|
/* (I) Tree_Root : pointeur sur la racine de l'arbre */
|
||||||
/* (I) List_Root : pointeur sur la racine de la liste */
|
/* (I) List_Root : pointeur sur la racine de la liste */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_Tree_List_Add (NDT_Root *, NDT_Index_Id, NDT_Root *, NDT_Index_Id);
|
NDT_Status ND_Tree_List_Add( NDT_Root *, NDT_Index_Id, NDT_Root *, NDT_Index_Id);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Fonction de comparaison de noeuds (pour le quick sort) */
|
/* Fonction de comparaison de noeuds (pour le quick sort) */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
int ND_Node_Compare (void ** Node1, void ** Node2);
|
int ND_Node_Compare( void **, void **);
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Ordonne une liste chaînée selon l'algorithme du tri à bulle */
|
/* Ordonne une liste chaînée selon l'algorithme du tri à bulle */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* (I) Root : pointeur sur la racine de la liste à trier */
|
/* (I) Root : pointeur sur la racine de la liste à trier */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
NDT_Status ND_List_Sort (NDT_Root *, NDT_Index_Id);
|
NDT_Status ND_List_Sort( NDT_Root *, NDT_Index_Id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/* Fonctions et procédures privées de la librairie (bas niveau) */
|
/* PRIVATE FUNCTIONS */
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
/*------------------------------------------------------------------------------*/
|
/*------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
void ND_List_Check (NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
void ND_List_Check( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
||||||
|
|
||||||
void ND_List_Link_Check (NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
void ND_List_Link_Check( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
||||||
|
|
||||||
void ND_Value_Check (NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
void ND_Value_Check( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
||||||
|
|
||||||
void ND_Tree_Check (NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
void ND_Tree_Check( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
||||||
|
|
||||||
void ND_Tree_Link_Check (NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
void ND_Tree_Link_Check( NDT_Root *, NDT_Index_Id, int *, int *, FILE *);
|
||||||
|
|
||||||
NDT_Status ND_List_Recursive_Make (NDT_Node *, NDT_Root *, NDT_Index_Id);
|
NDT_Status ND_List_Recursive_Make( NDT_Node *, NDT_Root *, NDT_Index_Id);
|
||||||
|
|
||||||
NDT_Node * ND_Tree_Recursive_Make (long, long, NDT_Node *);
|
NDT_Node *ND_Tree_Recursive_Make( long, long, NDT_Node *);
|
||||||
|
|
||||||
void ND_Tree_Node_Recursive_Add( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Node **, long , NDT_Node *);
|
void ND_Tree_Node_Recursive_Add( NDT_Root *, NDT_Index_Id, NDT_Node *, NDT_Node **, long , NDT_Node *);
|
||||||
|
|
||||||
NDT_Node * ND_Tree_Node_First_Recursive_Get (NDT_Node * Node);
|
NDT_Node *ND_Tree_Node_First_Recursive_Get( NDT_Node *);
|
||||||
|
|
||||||
NDT_Node * ND_Tree_Node_Last_Recursive_Get (NDT_Node * Node);
|
NDT_Node *ND_Tree_Node_Last_Recursive_Get( NDT_Node *);
|
||||||
|
|
||||||
NDT_Node * ND_Tree_Node_Recursive_Find (NDT_Node * Node, void * Value, va_list);
|
NDT_Node *ND_Tree_Node_Recursive_Find( NDT_Node *, void *, va_list);
|
||||||
|
|
||||||
NDT_Node * ND_Tree_Parent_Next_Recursive_Get (NDT_Node * Node);
|
NDT_Node *ND_Tree_Parent_Next_Recursive_Get( NDT_Node *);
|
||||||
|
|
||||||
NDT_Node * ND_Tree_Parent_Previous_Recursive_Get (NDT_Node * Node);
|
NDT_Node *ND_Tree_Parent_Previous_Recursive_Get( NDT_Node *);
|
||||||
|
|
||||||
void ND_Tree_Recursive_Print (NDT_Node * Node, long Depth, FILE *);
|
void ND_Tree_Recursive_Print( NDT_Node *, long, FILE *);
|
||||||
|
|
||||||
void ND_Tree_Link_Recursive_Check (NDT_Node * Node, int *, int *, FILE *);
|
void ND_Tree_Link_Recursive_Check( NDT_Node *, int *, int *, FILE *);
|
||||||
|
|
||||||
void * ND_Symbol_Find (const char *);
|
NDT_Status ND_Symbol_Find( void **, const char *);
|
||||||
|
|
||||||
void ND_Error_Print (void);
|
void ND_Error_Print( void);
|
||||||
|
|
||||||
void ND_Signal_Trap (int);
|
void ND_Signal_Trap( int);
|
||||||
|
|
||||||
NDT_Status ND_Address_Check (void * Address);
|
NDT_Status ND_Address_Check( void *);
|
||||||
|
|||||||
@@ -73,9 +73,9 @@ BEGIN
|
|||||||
VALUE "Comments", "Memory list or tree node structures management library\0"
|
VALUE "Comments", "Memory list or tree node structures management library\0"
|
||||||
VALUE "CompanyName", "Rx3\0"
|
VALUE "CompanyName", "Rx3\0"
|
||||||
VALUE "FileDescription", "Node Library\0"
|
VALUE "FileDescription", "Node Library\0"
|
||||||
VALUE "FileVersion", "$Revision: 1.2 $\0"
|
VALUE "FileVersion", "$Revision: 1.3 $\0"
|
||||||
VALUE "InternalName", "libnode\0"
|
VALUE "InternalName", "libnode\0"
|
||||||
VALUE "LegalCopyright", "GNU General Public Licence (GPL) - 1993-2002\0"
|
VALUE "LegalCopyright", "GNU Lesser General Public Licence (LGPL) V 2.1\0"
|
||||||
VALUE "LegalTrademarks", "\0"
|
VALUE "LegalTrademarks", "\0"
|
||||||
VALUE "OriginalFilename", "libnode.dll\0"
|
VALUE "OriginalFilename", "libnode.dll\0"
|
||||||
VALUE "PrivateBuild", "\0"
|
VALUE "PrivateBuild", "\0"
|
||||||
|
|||||||
62
libnode.spec
Normal file
62
libnode.spec
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
Name: libnode
|
||||||
|
Version: 2.0.7
|
||||||
|
Release: 1
|
||||||
|
|
||||||
|
%define libnode_name %{name}-%{version}-%{release}
|
||||||
|
%define source %{libnode_name}.src.tgz
|
||||||
|
|
||||||
|
Summary: Manages generic list and/or tree node structures
|
||||||
|
Copyright: GPL
|
||||||
|
Group: Application/Utilitaires
|
||||||
|
Distribution: Rx3 OpenSource
|
||||||
|
Vendor: Rx3
|
||||||
|
Packager: Arnaud G. Gibert <arnaud@rx3.net>
|
||||||
|
|
||||||
|
Source: ftp://ftp.rx3.org/pub/%{source}
|
||||||
|
Url: http://www.rx3.org/dvp/libnode/download/
|
||||||
|
BuildRoot: %{_tmppath}/%{libnode_name}-buildroot
|
||||||
|
AutoReqProv: no
|
||||||
|
|
||||||
|
%description
|
||||||
|
Manages generic list and/or tree node structures.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
/usr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
rm -rf %{libnode_name}
|
||||||
|
tar -xzvvf /usr/src/RPM/SOURCES/%{source}
|
||||||
|
cd %{libnode_name}
|
||||||
|
make clean
|
||||||
|
make all
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd %{libnode_name}
|
||||||
|
make install ROOT=$RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{libnode_name}
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jan 19 2005 Arnaud G. Gibert <arnaud@rx3.net> 2.0.7-1
|
||||||
|
- Update to 2.0.7 release.
|
||||||
|
|
||||||
|
* Tue Aug 24 2004 Arnaud G. Gibert <arnaud@rx3.net> 2.0.6-1
|
||||||
|
- Update to 2.0.6 release.
|
||||||
|
|
||||||
|
* Tue Jul 15 2003 Arnaud G. Gibert <arnaud@rx3.net> - 2.0.5-1
|
||||||
|
- Add release in libnode dir name support.
|
||||||
|
|
||||||
|
* Tue Jul 15 2003 Marc Regimbeau <marc.regimbeau@flomaco.net> - 2.0.4-2
|
||||||
|
- Initial release of this spec file.
|
||||||
@@ -1,17 +1,54 @@
|
|||||||
|
SRC := ndbench.c
|
||||||
|
TARGETS := ndbench ndbench-c ndbench-static ndbench-static-c
|
||||||
|
FILE_BIN := ndbench ndbench-c ndbench-static ndbench-static-c
|
||||||
|
FILE_LIB := *.ndb
|
||||||
|
FILE_DOC := ndbench.xls
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include ../Makefile.var
|
||||||
|
include ../Makefile.rule
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DEP_STATIC += ../lib/libnode.a
|
||||||
|
DEP_DYNAMIC += ../lib/libnode.so
|
||||||
|
INCLUDE += -I . -I ../include
|
||||||
|
LIBDIR += -L . -L ../lib
|
||||||
|
LIB_STATIC += ../lib/libnode.a -ldl
|
||||||
|
LIB_DYNAMIC += -lnode -ldl
|
||||||
|
CFLAGS += -rdynamic
|
||||||
|
|
||||||
ifdef _LIBVER_SUPPORT
|
ifdef _LIBVER_SUPPORT
|
||||||
DEP_VER_STATIC = ../../libver/ver.h ../../libver/libver.a
|
DEP_STATIC += ../../libver/ver.h ../../libver/libver.a
|
||||||
DEP_VER_DYNAMIC = ../../libver/ver.h ../../libver/libver.so
|
DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so
|
||||||
LIB_VER_STATIC = -I ../../libver ../../libver/libver.a
|
INCLUDE += -I ../../libver/lib
|
||||||
LIB_VER_DYNAMIC = -I ../../libver -L ../../libver -lver
|
LIBDIR += -L ../../libver/lib
|
||||||
|
|
||||||
|
ifeq ($(OSTYPE),linux-gnu)
|
||||||
|
LIB_STATIC += ../../libver/lib/libver.a
|
||||||
|
LIB_DYNAMIC += -lver
|
||||||
|
else
|
||||||
|
LIB_STATIC += ../../libver/lib/libver.a
|
||||||
|
LIB_DYNAMIC += -lver
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -D_LIBVER_SUPPORT
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: ndbench ndbench-static
|
ND_CHECK_FLAGS = -DND_MODE=0
|
||||||
|
ND_NOCHECK_FLAGS = -DND_MODE=1
|
||||||
|
|
||||||
ndbench-static: ndbench.c $(DEP_VER_STATIC) ../lib/node.h ../lib/libnode.a Makefile
|
|
||||||
gcc -g -o ndbench-static -I ../lib ndbench.c -ldl $(LIB_VER_STATIC) ../lib/libnode.a
|
|
||||||
|
|
||||||
ndbench: ndbench.c $(DEP_VER_DYNAMIC) ../lib/node.h ../lib/libnode.so Makefile
|
|
||||||
gcc -g -o ndbench -ldl $(LIB_VER_DYNAMIC) -I ../lib -L ../lib -lnode ndbench.c
|
|
||||||
|
|
||||||
clean:
|
ndbench: ndbench.c $(DEP_DYNAMIC)
|
||||||
rm -f ndbench ndbench-static
|
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
|
||||||
|
|
||||||
|
ndbench-c: ndbench.c $(DEP_DYNAMIC)
|
||||||
|
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
|
||||||
|
|
||||||
|
ndbench-static: ndbench.c $(DEP_STATIC)
|
||||||
|
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
|
||||||
|
|
||||||
|
ndbench-static-c: ndbench.c $(DEP_STATIC)
|
||||||
|
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
|
||||||
|
|||||||
905
util/ndbench.c
905
util/ndbench.c
File diff suppressed because it is too large
Load Diff
@@ -37,11 +37,12 @@ RSC=rc.exe
|
|||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 0
|
# PROP Use_Debug_Libraries 0
|
||||||
# PROP Output_Dir "Release"
|
# PROP Output_Dir ""
|
||||||
# PROP Intermediate_Dir "Release"
|
# PROP Intermediate_Dir "Release"
|
||||||
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||||
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
# ADD BASE RSC /l 0x809 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x809 /d "NDEBUG"
|
# ADD RSC /l 0x809 /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -49,7 +50,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /incremental:yes /machine:I386
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "ndbench - Win32 Debug"
|
!ELSEIF "$(CFG)" == "ndbench - Win32 Debug"
|
||||||
|
|
||||||
@@ -60,7 +61,7 @@ LINK32=link.exe
|
|||||||
# PROP BASE Target_Dir ""
|
# PROP BASE Target_Dir ""
|
||||||
# PROP Use_MFC 0
|
# PROP Use_MFC 0
|
||||||
# PROP Use_Debug_Libraries 1
|
# PROP Use_Debug_Libraries 1
|
||||||
# PROP Output_Dir "Debug"
|
# PROP Output_Dir ""
|
||||||
# PROP Intermediate_Dir "Debug"
|
# PROP Intermediate_Dir "Debug"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
@@ -73,8 +74,8 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnode.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libnoded.lib /nologo /subsystem:console /debug /machine:I386 /out:"ndbenchd.exe" /pdbtype:sept
|
||||||
# SUBTRACT LINK32 /pdb:none
|
# SUBTRACT LINK32 /profile /pdb:none
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
|||||||
10
util/test-10.ndb
Normal file
10
util/test-10.ndb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Lib_Open 0
|
||||||
|
DS_Open
|
||||||
|
Index_List_Open 0-0
|
||||||
|
DS_Value_Add 1-10 0
|
||||||
|
DS_Value_Find 1-10
|
||||||
|
Index_List_To_Tree 0-0
|
||||||
|
DS_Value_Find 1-10
|
||||||
|
DS_Check
|
||||||
|
DS_Close
|
||||||
|
Lib_Close
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
Lib_Open 0
|
||||||
DS_Open
|
DS_Open
|
||||||
Index_List_Open 0-0
|
Index_List_Open 0-0
|
||||||
DS_Value_Add 1-100000 0
|
DS_Value_Add 1-100000 0
|
||||||
@@ -6,3 +7,4 @@ Index_List_To_Tree 0-0
|
|||||||
DS_Value_Find 1-100000
|
DS_Value_Find 1-100000
|
||||||
DS_Check
|
DS_Check
|
||||||
DS_Close
|
DS_Close
|
||||||
|
Lib_Close
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
Lib_Open 0
|
||||||
DS_Open
|
DS_Open
|
||||||
Index_List_Open 0-0
|
Index_List_Open 0-0
|
||||||
DS_Value_Add 1-10000 0
|
DS_Value_Add 1-10000 0
|
||||||
@@ -6,3 +7,4 @@ Index_List_To_Tree 0-0
|
|||||||
DS_Value_Find 1-10000
|
DS_Value_Find 1-10000
|
||||||
DS_Check
|
DS_Check
|
||||||
DS_Close
|
DS_Close
|
||||||
|
Lib_Close
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
Lib_Open 0
|
||||||
DS_Open
|
DS_Open
|
||||||
Index_List_Open 0-0
|
Index_List_Open 0-0
|
||||||
DS_Value_Add 1-1000000 0
|
DS_Value_Add 1-1000000 0
|
||||||
@@ -6,3 +7,4 @@ Index_List_To_Tree 0-0
|
|||||||
DS_Value_Find 1-1000000
|
DS_Value_Find 1-1000000
|
||||||
DS_Check
|
DS_Check
|
||||||
DS_Close
|
DS_Close
|
||||||
|
Lib_Close
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
Batch_Run test-error.ndb
|
||||||
|
Batch_Run test-10.ndb
|
||||||
Batch_Run test-10K.ndb
|
Batch_Run test-10K.ndb
|
||||||
Batch_Run test-100K.ndb
|
Batch_Run test-100K.ndb
|
||||||
Batch_Run test-1M.ndb
|
Batch_Run test-1M.ndb
|
||||||
|
|||||||
15
util/test-error.ndb
Normal file
15
util/test-error.ndb
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
DS_Open
|
||||||
|
Lib_Open 0
|
||||||
|
DS_Open
|
||||||
|
Index_List_Open 0-0
|
||||||
|
DS_Value_Add 1-10 0
|
||||||
|
Lib_Close
|
||||||
|
Lib_Open 1
|
||||||
|
DS_Open
|
||||||
|
Index_List_Open 0-0
|
||||||
|
DS_Value_Add 1-10 0
|
||||||
|
Index_Value_Break 0-0 0
|
||||||
|
Index_Value_Break 0-0 1
|
||||||
|
Index_Value_Break 0-0 2
|
||||||
|
DS_Check
|
||||||
|
Lib_Close
|
||||||
Reference in New Issue
Block a user