oxref-1.00.06/CLASSES 0000644 0001750 0001750 00000001076 12633541675 013025 0 ustar frank frank # This file contains the names of all subdirectories containing sources to
# compile. Each directory should be specified on a line of its own. Initial
# blanks are ok. Compilation is 1-level deep.
# If a parser or scanner is used, (see icmconfig's USE_PARSER and USE_SCANNER
# defines) then those directories are automatically included (although they
# could be included here as well)
# Lines starting with # or with // are ignored, as are empty lines.
# sources in the current (i.e., this) directory are also compiled.
storage
store
xrefdata
objdump
# pattern
# arg
oxref-1.00.06/INSTALL 0000644 0001750 0001750 00000007463 12633541675 013044 0 ustar frank frank To install oxref by hand instead of using a binary distribution perform
the following steps:
0. oxref and its construction depends, in addition to the normally
standard available system software on specific software and versions
which is documented in the file `required'.
(If you compile the bobcat library yourself, note that oxref does
not use the SSL, Milter and Xpointer classes; they may --as far as
oxref is concerned-- be left out of the library by running
'./build light')
1. It is expected you use icmake for the package construction. For this a
top-level script (build) and support scripts in the ./icmake/
directory are available. By default, the 'build' script echoes the
commands it executes to the standard output stream. By specifying the
option -q (e.g., ./build -q ...) this is prevented, significantly
reducing the output generated by 'build'.
2. Inspect the values of the variables in the file INSTALL.im Modify these
when necessary.
3. Run
./build program [strip]
to compile oxref. The argument `strip' is optional and strips
symbolic information from the final executable.
4. If you installed Yodl then you can create the documentation:
./build man
builds the man-page.
5. Before installing the components of oxref, consider defining the
environment variable OXREF, defining its value as the (preferably
absolute) filename of a file on which installed files and directories
are logged.
Defining the OXREF environment variable as ~/.oxref usually
works well.
6. Run (probably as root)
./build install 'what' 'base'
to install. Here, 'what' specifies what you want to install.
Specify:
x, to install all components,
or specify a combination of:
b (binary program),
d (standard documentation),
m (man-pages)
E.g., use
./build install bm 'base'
if you only want to be able to run oxref, and want its man-page to
be installed below 'base'.
./build install's last argument 'base' is optional: the base directory
below which the requested files are installed. This base directory is
prepended to the paths #defined in the INSTALL.im file. If 'base' is
not specified, then INSTALL.im's #defined paths are used as-is.
When requesting non-existing elements (e.g., './build install x' was
requested, but the man-pages weren't constructed) then these
non-existing elements are silently ignored by the installation
process.
If the environment variable OXREF was defined when issuing the
`./build install ...' command then a log of all installed files is
written to the file indicated by the OXREF environment variable
(see also the next item).
Defining the OXREF environment variable as ~/.oxref usually
works well.
7. Uninstalling previously installed components of oxref is easy
if the environment variable OXREF was defined before issuing the
`./build install ...' command. In that case, run the command
./build uninstall logfile
where 'logfile' is the file that was written by ./build install.
Modified files and non-empty directories are not removed, but the
logfile itself is removed following the uninstallation.
8. Following the installation nothing in the directory tree which contains
this file (i.e., INSTALL) is required for the proper functioning of
oxref, so consider removing it. If you only want to remove
left-over files from the build-process, just run
./build distclean
oxref-1.00.06/INSTALL.im 0000644 0001750 0001750 00000002143 12633541675 013436 0 ustar frank frank // Specify the name of the program created by this project:
#define PROGRAM "oxref"
// the compiler to use.
#define CXX "g++"
// the compiler options to use.
#define CXXFLAGS "--std=c++14 -Wall -O2 -fdiagnostics-color=never"
// flags passed to the linker
#define LDFLAGS ""
#define CPOPTS
// COMPONENTS TO INSTALL
// =====================
// For an operational non-Debian installation, you probably must be
// `root'.
// If necessary, adapt DOC, HDR, LIB and MAN (below) to your situation.
// The provided locations are used by Debian Linux.
// With 'build install' you can dynamically specify a location to prepend
// to the locations configured here, and select which components you want
// to install
// ONLY USE ABSOLUTE DIRECTORY NAMES:
// the final program
#define BINARY "/usr/bin/"${PROGRAM}
// the directory where the standard documentation is stored
#define DOC "/usr/share/doc/"${PROGRAM}
// the directory whre the manual page is stored
#define MAN "/usr/share/man/man1"
oxref-1.00.06/LICENSE 0000644 0001750 0001750 00000104513 12635514365 013010 0 ustar frank frank GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
oxref-1.00.06/VERSION 0000644 0001750 0001750 00000000157 12635514261 013045 0 ustar frank frank #define AUTHOR "Frank B. Brokken (f.b.brokken@rug.nl)"
#define VERSION "1.00.06"
#define YEARS "2012-2015"
oxref-1.00.06/VERSION.h 0000644 0001750 0001750 00000000104 12633541675 013272 0 ustar frank frank #include "VERSION"
SUBST(_CurVers_)(VERSION)
SUBST(_CurYrs_)(YEARS)
oxref-1.00.06/build 0000755 0001750 0001750 00000007337 12633541675 013040 0 ustar frank frank #!/usr/bin/icmake -qt/tmp/bisonc++
#define LOGENV "OXREF"
#include "icmconf"
string
g_logPath = getenv(LOGENV)[1],
g_cwd = chdir(""); // initial working directory, ends in /
int g_echo = ON;
#include "icmake/cuteoln"
#include "icmake/backtick"
#include "icmake/setopt"
#include "icmake/run"
#include "icmake/md"
#include "icmake/findall"
#include "icmake/loginstall"
#include "icmake/logzip"
#include "icmake/logfile"
#include "icmake/uninstall"
#include "icmake/pathfile"
#include "icmake/precompileheaders"
#include "icmake/special"
#include "icmake/clean"
#include "icmake/manpage"
#include "icmake/install"
#include "icmake/github"
void main(int argc, list argv)
{
string option;
string strip;
int idx;
for (idx = listlen(argv); idx--; )
{
if (argv[idx] == "-q")
{
g_echo = OFF;
argv -= (list)"-q";
}
else if (argv[idx] == "-P")
{
g_gch = 0;
argv -= (list)"-P";
}
}
echo(g_echo);
option = argv[1];
if (option == "clean")
clean(0);
if (option == "distclean")
clean(1);
if (option != "")
special();
if (option == "install")
install(argv[2], argv[3]);
if (option == "uninstall")
uninstall(argv[2]);
if (option == "github")
github();
if (option == "man")
manpage();
if (option == "library")
{
precompileHeaders();
system("icmbuild library");
exit(0);
}
if (argv[2] == "strip")
strip = "strip";
if (option == "program")
{
precompileHeaders();
system("icmbuild program " + strip);
exit(0);
}
if (option == "oxref")
{
precompileHeaders();
system("icmbuild program " + strip);
run("tmp/bin/binary -fxs tmp/lib" LIBRARY ".a > " PROGRAM ".xref");
exit(0);
}
if (option == "scanner")
{
chdir("scanner");
system("flexc++ lexer");
chdir("..");
system("icmbuild program " + strip);
exit(0);
}
printf("Usage: build [-q -P] what\n"
"Where\n"
" [-q]: run quietly, do not show executed commands\n"
" [-P]: do not use precompiled headers\n"
"`what' is one of:\n"
" clean - clean up remnants of previous "
"compilations\n"
" distclean - clean + fully remove tmp/\n"
" library - build " PROGRAM "'s library\n"
" man - build the man-page (requires Yodl)\n"
" program [strip] - build " PROGRAM " (optionally strip the\n"
" executable)\n"
" oxref [strip] - same a `program', also builds xref file\n"
" using oxref\n"
" install selection [base] - to install the software in the \n"
" locations defined in the INSTALL.im file,\n"
" optionally below base\n"
" selection can be\n"
" x, to install all components,\n"
" or a combination of:\n"
" b (binary program),\n"
" d (documentation),\n"
" m (man-pages)\n"
" uninstall logfile - remove files and empty directories listed\n"
" in the file 'logfile'\n"
" github - prepare github's gh-pages update\n"
" (internal use only)\n"
"\n"
);
exit(0);
}
oxref-1.00.06/changelog 0000644 0001750 0001750 00000006301 12635514351 013644 0 ustar frank frank oxref (1.00.06)
* Updated entries in the 'required' file.
-- Frank B. Brokken Sun, 20 Dec 2015 13:02:43 +0100
oxref (1.00.05)
* Updated the icmake build scripts to icmake 8.00.04
-- Frank B. Brokken Mon, 14 Dec 2015 14:18:32 +0100
oxref (1.00.04)
* Kevin Brodsky observed that the installation scripts used 'chdir' rather
than 'cd'. Fixed in this release.
* Kevin Brodsky also observed that the combined size of all precompiled
headers might exceed some disks capacities. The option -P was added to the
./build script to prevent the use of precompiled headers.
-- Frank B. Brokken Mon, 05 Oct 2015 21:11:58 +0200
oxref (1.00.03)
* Standardized the (de)installation procedures
-- Frank B. Brokken Sat, 03 Oct 2015 11:11:25 +0200
oxref (1.00.02)
* Fixed compilation errors that emerged with g++-5, reported by Matthias
Klose.
* Added the file 'required' to the source distribution summarizing the
required software for building oxref.
-- Frank B. Brokken Thu, 12 Feb 2015 18:13:30 +0100
oxref (1.00.01)
* Since oxref's been around for over a year without encountering any
serious problems, its version was bumped to slightly over 1.00.
* Oxref no longer depends on bobcat's A2x and X2a classes
* Oxref's no longer uses (deprecated) FBB::Errno exceptions. Instead,
FBB::Exception exceptions are now used.
* 'build oxref' uses the newly built tmp/bin/binary (= oxref) program to
create its cross-reference listing.
-- Frank B. Brokken Thu, 26 Dec 2013 12:33:38 +0100
oxref (0.91.00)
* oxref now returns 0 when called with the -h or -v flags
* catching FBB::Errno in main.cc is superfluous: removed.
-- Frank B. Brokken Fri, 25 Jan 2013 10:38:42 +0100
oxref (0.90.11)
* The following #defines in INSTALL.im can be overruled by defining
identically named environment variables:
CXX defines the name of the compiler to use. By default `g++'
CXXFLAGS the options passed to the compiler.
By default `-Wall --std=c++0x -O2 -g'
LDFLAGS the options passed to the linker. By default no options are
passed to the linker.
-- Frank B. Brokken Wed, 18 Jul 2012 15:19:38 +0200
oxref (0.90.10)
* Depends on Bobcat 3.00.02
* Removed superfluous header (undoing the needless 0.90.04 modification).
-- Frank B. Brokken Thu, 10 May 2012 14:02:07 +0200
oxref (0.90.04)
* Added missing header
-- Frank B. Brokken Wed, 09 May 2012 13:45:58 +0200
oxref (0.90.03)
* Fixed an out-of check placed newline insertion
-- Frank B. Brokken Mon, 09 Jan 2012 21:35:03 +0100
oxref (0.90.01)
* Replaced FnWrap* calls by lambda functions
* `build' script now recognizes CXXFLAGS and LDFLAGS for, resp. g++ and ld
flags. Default values are in INSTALL.im, as before.
-- Frank B. Brokken Fri, 24 Jun 2011 21:15:18 +0200
oxref (0.90.00)
* Initial release
-- Frank B. Brokken Wed, 16 Feb 2011 11:50:25 +0100
oxref-1.00.06/documentation/ 0000755 0001750 0001750 00000000000 12633541675 014652 5 ustar frank frank oxref-1.00.06/documentation/man/ 0000755 0001750 0001750 00000000000 12635514305 015415 5 ustar frank frank oxref-1.00.06/documentation/man/oxref.yo 0000644 0001750 0001750 00000021160 12633541675 017121 0 ustar frank frank NOUSERMACRO(oxref function)
includefile(../../release.yo)
htmlbodyopt(text)(#27408B)
htmlbodyopt(bgcolor)(#FFFAF0)
whenhtml(mailto(Frank B. Brokken: f.b.brokken@rug.nl))
DEFINEMACRO(lsoption)(3)(\
bf(--ARG1)=tt(ARG3) (bf(-ARG2))\
)
DEFINEMACRO(laoption)(2)(\
bf(--ARG1)=tt(ARG2)\
)
DEFINEMACRO(loption)(1)(\
bf(--ARG1)\
)
DEFINEMACRO(soption)(1)(\
bf(-ARG1)\
)
DELETEMACRO(tt)
DEFINEMACRO(tt)(1)(em(ARG1))
COMMENT( man-request, section, date, distribution file, general name)
manpage(oxref)(1)(_CurYrs_)(oxref._CurVers_.tar.gz)
(oxref - cross reference utility)
COMMENT( man-request, larger title )
manpagename(oxref)(cross reference utility for multiple languages)
COMMENT( all other: add after () )
manpagesynopsis()
bf(oxref) [OPTIONS] tt(arguments) nl()
[OPTIONS] - see the bf(OPTIONS) section below nl()
arguments - object files and/or libraries to process nl()
The cross reference listing is written to the standard output stram.
manpagedescription()
The program bf(oxref) generates a cross reference listing of symbols
defined in non-stripped object files and/or libraries.
A cross reference listing shows the functions using certain symbols
(functions, data). This is useful information during program development and
debugging phases. E.g., assuming that the signature; the pre-conditions or the
post-conditions of a function must be changed it is important to know from what
function(s) the function-to-modify is called to verify that the changes to the
modified function do not break its calling functions.
The generated cross reference listing starts with a header showing information
about the program, a time stamp and the arguments passed to tt(oxref). E.g.,
verb(
oxref by Frank B. Brokken (f.b.brokken@rug.nl)
oxref V0.90.00 2011
CREATED Wed, 16 Feb 2011 15:21:03 +0000
CROSS REFERENCE FOR: --select define liboxref.a
----------------------------------------------------------------------
)
manpagesection(RETURN VALUE)
bf(Oxref) returns 0 to the operating system unless an error occurs or
bf(oxref)'s version or usage info is shown or requested. In those cases 1 is
returned
manpageoptions()
If available, single letter options are listed between parentheses
following their associated long-option variants. Single letter options require
arguments if their associated long options require arguments as well.
itemization(
it() lsoption(arg)(a)(mode)nl()
Mode specifies the way the output is abbreviated:nl()
bf(count) - function parameters are suppressed; instead the number of
arguments required by a function is shown in its parameter list. Example:
verb(
usage(1)
)
instead of
verb(
usage(std::string const&)
)
bf(first) - only show the first word of parameters. Example:
verb(
insertDefined(unsigned, std::ostream&, std::vector&)
)
instead of
verb(
insertDefined(unsigned int, std::ostream&, std::vector > const&)
)
bf() - where tt() is a positive integral number (5 is used
if tt() is less than 5). tt() specifies the maximum length of
parameter names. If parameter names need to be truncated, an ellipsis replaces
the truncated characters.
Example using tt(-a 12):
verb(
insertDefined(unsigned int, std::ostream&, std::vect...&)
)
instead of
verb(
insertDefined(unsigned int, std::ostream&, std::vector > const&)
)
it() loption(full-symbol) soption(f)nl()
The full names of the symbols are shown, in addition to the plain
symbol names. Full names include class names and/or namespace
identifiers. Example:
verb(
insertDefined(unsigned int, std::ostream&, std::vector > const&)
Full name: Store::insertDefined(unsigned int, std::ostream&,
std::vector > const&)
)
it() loption(help) (soption(h))nl()
Basic usage information is written to the standard error stream.
it() loption(object-files) (soption(o))nl()
Include the name of object files containing the symbols in the
cross reference listing
it() laoption(select)(name)nl()
Only display the cross-reference of tt(name), where tt(name)
is the (case sensitive) initial substring of a symbol
it() laoption(select-pattern)(regex)nl()
Only display the cross-reference of symbols matching the regular
expression tt(regex), where tt(regex) is a regular expression matching
the bf(regex)(7) specification, including the extensions offered by
the bf(pattern)(3bobcat) bf(Pattern) class. Case sensitive matching is
used here, too.
it() loption(source-files) (soption(s))nl()
Include the name of source files containing the symbols in the
cross reference listing
it() loption(xref-source-files) (soption(x))nl()
Include the name of source files containing the used symbols in
the cross reference listing
it() loption(version) (soption(v))nl()
tt(Oxref)'s version number is written to the standard error stream.
)
manpagesection(EXAMPLES)
The examples show how tt(oxref) was called, followed by a representative
example of a cross-reference listing for a symbol. tt(Oxref)'s own cross
reference listing was used:
verb(
called as: oxref liboxref
define(std::string const&, bool)
Used By:
Store::setFunction(std::string const&)
Store::setObject(std::string const&)
Store::setSource(std::string const&)
--------------------
called as: oxref -foxs liboxref
define(std::string const&, bool)
Full name: Store::define(std::string const&, bool)
Source: define.cc (1define.o)
Used By:
setfunction.cc: Store::setFunction(std::string const&)
setobject.cc: Store::setObject(std::string const&)
setsource.cc: Store::setSource(std::string const&)
)
manpagebugs()
This is the initial release version of tt(oxref).
manpagesection(ABOUT)
In theory, creating cross reference listings is a complex matter as it
requires a full syntax analysis of the sources defining a program. Especially
with complex languages like bf(C++) this is a difficult hurdle to pass.
Looking for `cross reference programs' using a search engine returns
remarkably few hits. LXR is a promising cross referencing program (see
lurl(http://lxr.linux.no/)), but it requires the use of data base packages,
making it somewhat complex to use. Other links refer to cross-reference
programs for textual documents, not programs.
The complexity of developing a program generating a
cross reference listing has baffled me for a long time. Eventually I realized
that in practice the essential information has already been generated by the
compiler, when it compiles our source files. So why do it all again?
Once a program has been compiled one or (usually) more object files are
available. The linker uses tables of defined and external symbols embedded
in the object files to connect the various functions. If all requirements can
be satisfied the linker is able to create a running program.
Programs like bf(nm)(1) and bf(objdump)(1) can be used to produce human
readable output from the information embedded in object files. tt(Oxref) reads
this information and organizes it, creating a cross reference listing.
Since all compilable program languages generate identically organized
object files (or maybe better: generate object files that can be interpreted
by bf(objdump)(1)), tt(oxref) can broadly be applied. As long as
bf(objdump)(1) produces sensible output tt(oxref) should be able to generate a
cross reference listing.
tt(Oxref)'s name consists of two syllables: tt(o) and tt(xref). The tt(o)
represents the program bf(objdump)(1), called from tt(oxref) as a child
program. The important part is of course the cross-referencing of
symbols. Like the common abbreviation of em(rail-road crossing), em(rail-road
xing), cross referencing is abbreviated to tt(xref). Hence tt(oxref).
Of course, nearly everybody will read tt(oxref) as
tt(ox-ref). Fortunately, here too we're on familiar ground: Bison, Cow, Gnu,
Yacc: all are bovine animals. To that important list tt(oxref) adds the Ox.
manpagefiles()
An example of tt(oxref)'s own cross reference listing is provided (on
Debian systems) in the file
verb(
/usr/share/doc/oxref/oxref.xref.gz
)
manpageseealso()
bf(nm)(1), bf(objdump)(1), bf(pattern)(3bobcat), bf(regex)(7)
manpageauthor()
Frank B. Brokken (f.b.brokken@rug.nl).
oxref-1.00.06/icmake/ 0000755 0001750 0001750 00000000000 12633541675 013232 5 ustar frank frank oxref-1.00.06/icmake/install.org 0000644 0001750 0001750 00000001150 12633541675 015406 0 ustar frank frank if (what == "man")
{
where = setWhere(where, MAN);
printf(" INSTALLING the manual page at `", where, "'\n");
run("gzip -9 < tmp/man/" PROGRAM ".1 > " + where + "/" PROGRAM ".1.gz");
exit(0);
}
if (what == "std")
{
where = setWhere(where, STD);
printf(" INSTALLING the changelog at `", where, "\n");
run("gzip -9 < changelog > " + where + "/changelog.gz");
printf(" INSTALLING the html-manual page at `", where, "\n");
run("cp tmp/manhtml/" PROGRAM "man.html " + where);
exit(0);
}
exit(0);
}
oxref-1.00.06/icmake/setopt 0000644 0001750 0001750 00000000341 12633541675 014471 0 ustar frank frank string setOpt(string install_im, string envvar)
{
list optvar;
string ret;
optvar = getenv(envvar);
if (optvar[0] == "1")
ret = optvar[1];
else
ret = install_im;
return ret;
}
oxref-1.00.06/icmake/loginstall 0000644 0001750 0001750 00000001565 12633541675 015334 0 ustar frank frank // source and dest, absolute or reachable from g_cwd, should exist.
// files and links in source matching dest (if empty: all) are copied to dest
// and are logged in g_log
// Before they are logged, dest is created
void logInstall(string src, string pattern, string dest)
{
list entries;
int idx;
chdir(g_cwd);
md(dest);
src += "/";
dest += "/";
if (listlen(makelist(O_DIR, src)) == 0)
{
printf("Warning: ", src, " not found: can't install ", src, pattern,
" at ", dest, "\n");
return;
}
entries = findAll("f", src, pattern);
for (idx = listlen(entries); idx--; )
run("cp " + src + entries[idx] + " " + dest);
chdir(g_cwd);
entries = findAll("l", src, pattern);
for (idx = listlen(entries); idx--; )
run("cp " CPOPTS " " + src + entries[idx] + " " + dest);
}
oxref-1.00.06/icmake/logzip 0000644 0001750 0001750 00000001656 12633541675 014471 0 ustar frank frank // names may be a series of files in src, not a wildcard.
// if it's empty then all files in src are used.
// the files are gzipped and logged in dest.
// src and dest do not have to end in /
void logZip(string src, string names, string dest)
{
list files;
int idx;
string file;
chdir(g_cwd);
md(dest);
dest += "/";
if (src != "")
{
if (listlen(makelist(O_DIR, src)) == 0)
{
printf("Warning: ", src, " not found: can't install ", src, names,
" at ", dest, "\n");
return;
}
chdir(src);
}
if (names == "")
files = makelist("*");
else
files = strtok(names, " ");
for (idx = listlen(files); idx--; )
{
file = files[idx];
run("gzip -n -9 < " + file + " > " + file + ".gz");
}
run("tar cf - *.gz | (cd " + g_cwd + "; cd " + dest + "; tar xf -)");
run("rm *.gz");
}
oxref-1.00.06/icmake/clean 0000644 0001750 0001750 00000001140 12633541675 014233 0 ustar frank frank void clean(int dist)
{
run("rm -rf "
"build-stamp configure-stamp "
"options/SKEL "
"tmp/*.o" +
" o */o release.yo tmp/lib*.a "
"parser/grammar.output"
);
if (dist)
run("rm -rf tmp *.ih.gch */*.ih.gch");
chdir("documentation");
run("rm -rf "
"man/*.1 "
"man/*.3* "
"man/*.html "
"manual/manual-stamp "
"manual/*.html "
"manual/invoking/usage "
"manual/invoking/usage.txt "
"usage/usage "
);
exit(0);
}
oxref-1.00.06/icmake/logfile 0000644 0001750 0001750 00000000257 12633541675 014602 0 ustar frank frank void logFile(string srcdir, string src, string destdir, string dest)
{
chdir(g_cwd);
md(destdir);
run("cp " + srcdir + "/" + src + " " + destdir + "/" + dest);
}
oxref-1.00.06/icmake/findall 0000644 0001750 0001750 00000001074 12633541675 014570 0 ustar frank frank // assuming we're in g_cwd, all entries of type 'type' matching source/pattern
// are returned w/o final \n
list findAll(string type, string source, string pattern)
{
string cmd;
list entries;
list ret;
int idx;
chdir(source);
cmd = "find ./ -mindepth 1 -maxdepth 1 -type " + type;
if (pattern != "")
pattern = "-name '" + pattern + "'";
entries = backtick(cmd + " " + pattern + " -printf \"%f\\n\"");
for (idx = listlen(entries); idx--; )
ret += (list)cutEoln(entries[idx]);
chdir(g_cwd);
return ret;
}
oxref-1.00.06/icmake/manpage 0000644 0001750 0001750 00000000455 12633541675 014571 0 ustar frank frank #define MANPAGE "../../tmp/man/" ${PROGRAM} ".1"
#define MANHTML "../../tmp/manhtml/" ${PROGRAM} "man.html"
void manpage()
{
md("tmp/man tmp/manhtml");
chdir("documentation/man");
run("yodl2man -o " MANPAGE " " PROGRAM);
run("yodl2html -o " MANHTML " " PROGRAM);
exit(0);
}
oxref-1.00.06/icmake/cuteoln 0000644 0001750 0001750 00000000233 12633541675 014624 0 ustar frank frank string cutEoln(string text)
{
int len;
len = strlen(text) - 1;
if (text[len] == "\n")
text = substr(text, 0, len);
return text;
}
oxref-1.00.06/icmake/uninstall 0000644 0001750 0001750 00000000456 12633541675 015173 0 ustar frank frank void uninstall(string logfile)
{
int idx;
list entry;
string dir;
list line;
if (!exists(logfile))
{
printf("installation log file " + logfile + " not found\n");
exit(0);
}
run("icmake/remove " + logfile + " " + (string)g_echo);
exit(0);
}
oxref-1.00.06/icmake/pathfile 0000644 0001750 0001750 00000000552 12633541675 014753 0 ustar frank frank list path_file(string path)
{
list ret;
int len;
int idx;
for (len = strlen(path), idx = len; idx--; )
{
if (path[idx] == "/")
{
ret =
(list)substr(path, 0, idx) + (list)substr(path, idx + 1, len);
return ret;
}
}
ret = (list)"" + (list)path;
return ret;
}
oxref-1.00.06/icmake/github 0000644 0001750 0001750 00000000221 12633541675 014432 0 ustar frank frank void github()
{
run("cp -r release.yo tmp/manhtml/oxrefman.html ../../wip");
run("cp changelog ../../wip/changelog.txt");
exit(0);
}
oxref-1.00.06/icmake/md 0000644 0001750 0001750 00000000740 12633541675 013556 0 ustar frank frank // md: target should be a series of blank-delimited directories to be created
// If an element is a whildcard, the directory will always be created,
// using mkdir -p.
//
// uses: run()
void md(string target)
{
int idx;
list paths;
string dir;
if (!exists(target))
run("mkdir -p " + target);
else if (((int)stat(target)[0] & S_IFDIR) == 0)
{
printf(target + " exists, but is not a directory\n");
exit(1);
}
}
oxref-1.00.06/icmake/log 0000755 0001750 0001750 00000000632 12633541675 013742 0 ustar frank frank #!/bin/bash
find tmp/install -type f -exec md5sum "{}" \; |
sed 's|tmp/install|'$1'|' > $2
find tmp/install -type l -exec printf "link %s\n" "{}" \; |
sed 's|tmp/install|'$1'|' >> $2
find tmp/install -type d -exec printf "dir %s\n" "{}" \; |
sed 's|tmp/install|'$1'|' >> $2
oxref-1.00.06/icmake/remove 0000755 0001750 0001750 00000001170 12633541675 014454 0 ustar frank frank #!/bin/bash
g_echo=$2
rm_f()
{
[ $g_echo -ne 0 ] && echo rm $1
rm -f $1
}
rm_dir()
{
[ $g_echo -ne 0 ] && echo rmdir $1
rmdir --ignore-fail-on-non-empty -p $1
}
IFS="
"
for line in `cat $1`
do
field1=`echo $line | awk '{printf $1}'`
field2=`echo $line | awk '{printf $2}'`
if [ $field1 == "link" ] ; then
rm_f $field2
elif [ $field1 == "dir" ] ; then
rm_dir $field2
elif [ -e "$field2" ] ; then
if [ "$field1" != "`md5sum $field2 | awk '{printf $1}'`" ] ; then
echo $field2 changed, not removed
else
rm_f $field2
fi
fi
done
rm_f $1
oxref-1.00.06/icmake/precompileheaders 0000644 0001750 0001750 00000001336 12633541675 016653 0 ustar frank frank string g_compiler;
int g_gch = 1;
void _precompile(string class)
{
string classIH;
classIH = class + ".ih";
if (classIH younger class + ".ih.gch")
run(g_compiler + " -x c++-header " + classIH);
}
void precompileHeaders()
{
int idx;
list classes;
string class;
if (!g_gch)
return;
classes = makelist(O_SUBDIR, "*");
g_compiler = setOpt(CXX, "CXX") + " " +
setOpt(CXXFLAGS, "CXXFLAGS") + " ";
_precompile("main"); // precompile the main program .ih file
for (idx = listlen(classes); idx--; )
{
class = classes[idx];
chdir(class);
_precompile(class);
chdir(g_cwd);
}
}
oxref-1.00.06/icmake/special 0000644 0001750 0001750 00000000713 12633541675 014576 0 ustar frank frank //string g_skel;
void special()
{
// g_skel = setOpt(SKEL, "SKEL");
//
// if ("INSTALL.im" newer "options/SKEL")
// run("echo \"#define _Skel_ \\\"" + g_skel + "\\\"\" > options/SKEL");
if (! exists("release.yo") || "VERSION" newer "release.yo")
{
system("touch version.cc");
run("gcc -E VERSION.h | grep -v '#' | sed 's/\\\"//g' > "
"release.yo");
}
}
oxref-1.00.06/icmake/run 0000644 0001750 0001750 00000000064 12633541675 013761 0 ustar frank frank void run(string cmd)
{
system(P_CHECK, cmd);
}
oxref-1.00.06/icmake/install 0000644 0001750 0001750 00000003170 12633541675 014624 0 ustar frank frank
void install(string request, string dest)
{
string target;
int components = 0;
list pathsplit;
string base;
base = "tmp/install/";
md(base);
if (request == "x")
components = 63;
else
{
if (strfind(request, "b") != -1)
components |= 2;
if (strfind(request, "d") != -1)
components |= 4;
if (strfind(request, "m") != -1)
components |= 8;
}
if (components & 2)
{
target = base + BINARY;
pathsplit = path_file(target);
printf(" installing the executable `", target, "'\n");
logFile("tmp/bin", "binary", pathsplit[0], pathsplit[1]);
}
if (components & (4 | 8))
{
target = base + DOC "/";
if (components & 4)
{
printf(" installing changelog at `", target, "\n");
logZip("", "changelog", target );
}
if (components & 8)
{
printf(" installing the html-manual pages at `", target, "\n");
logInstall("tmp/manhtml", "", target);
}
}
if (components & 8)
{
target = base + MAN "/";
printf(" installing the manual pages below `", target, "'\n");
logZip("tmp/man", "oxref.1", target);
}
chdir(g_cwd);
if (dest == "")
dest = "/";
else
md(dest);
dest = cutEoln(backtick("realpath " + dest)[0]);
if (g_logPath != "")
backtick("icmake/log " + dest + " " + g_logPath);
run("tar cf - -Ctmp/install . | tar xf - -C" + dest);
printf("\n Installation completed\n");
exit(0);
}
oxref-1.00.06/icmake/backtick 0000644 0001750 0001750 00000000160 12633541675 014725 0 ustar frank frank list backtick(string arg)
{
list ret;
echo(OFF);
ret = `arg`;
echo(g_echo);
return ret;
}
oxref-1.00.06/icmconf 0000644 0001750 0001750 00000001561 12633541675 013345 0 ustar frank frank #include "INSTALL.im"
#define MAIN "oxref.cc"
#define ADD_LIBRARIES "bobcat"
#define ADD_LIBRARY_PATHS ""
#define SCANNER_DIR ""
#define PARSER_DIR ""
#define REFRESH
#define LIBRARY "modules"
#define SHAREDREQ ""
//#define CLS
//#define USE_ALL "a"
#define SOURCES "*.cc"
#define SCANGEN "flexc++"
#define SCANFLAGS ""
#define SCANSPEC "lexer"
//#define SCANFILES ""
#define SCANOUT "lex.cc"
#define PARSGEN "bisonc++"
#define PARSFLAGS "-V"
#define PARSSPEC "grammar"
#define PARSFILES "inc/*"
#define PARSOUT "parse.cc"
#define USE_ECHO ON
#define TMP_DIR "tmp"
#define OBJ_EXT ".o"
#define USE_VERSION
#define DEFCOM "program"
oxref-1.00.06/main.ih 0000644 0001750 0001750 00000000646 12633541675 013255 0 ustar frank frank #include
#include
#include
#include
#include
#include
#include
#include "storage/storage.h"
#include "objdump/objdump.h"
namespace Icmbuild
{
extern char version[];
extern char years[];
extern char author[];
};
void usage(std::string const &progname);
using namespace std;
using namespace FBB;
using namespace Icmbuild;
oxref-1.00.06/objdump/ 0000755 0001750 0001750 00000000000 12633541675 013441 5 ustar frank frank oxref-1.00.06/objdump/prefixinc.cc 0000644 0001750 0001750 00000000765 12633541675 015747 0 ustar frank frank #include "objdump.ih"
ObjDump::const_iterator &ObjDump::const_iterator::operator++()
{
if (d_iterate)
d_iterate = std::getline(*d_process, d_line).good();
return *this;
}
/*
begin: initialize to true
end: initialize to false
while (begin != end) // if d_iterate is true: reassign by
// getline(*d_process, ...), then compare both
// d_iterate-s,
{
cout << *begin;
++begin;
}
*/
oxref-1.00.06/objdump/objdump.h 0000644 0001750 0001750 00000003200 12633541675 015245 0 ustar frank frank #ifndef INCLUDED_OBJDUMP_
#define INCLUDED_OBJDUMP_
#include
#include
class ObjDump
{
FBB::Process d_process;
public:
class const_iterator;
const_iterator begin();
const_iterator end();
class const_iterator:
public std::iterator
{
friend const_iterator ObjDump::begin();
friend const_iterator ObjDump::end();
FBB::Process *d_process;
mutable bool d_iterate;
mutable std::string d_line;
const_iterator(FBB::Process *process, bool iterate);
public:
const_iterator &operator++();
bool operator==(const_iterator const &other) const;
bool operator!=(const_iterator const &other) const;
std::string const &operator*() const;
std::string const *operator->() const;
};
ObjDump();
void start();
};
inline void ObjDump::start()
{
d_process.start();
}
inline ObjDump::const_iterator ObjDump::begin()
{
return const_iterator(&d_process, true);
}
inline ObjDump::const_iterator ObjDump::end()
{
return const_iterator(&d_process, false);
}
inline bool ObjDump::const_iterator::operator!=(const_iterator const &rhs)
const
{
return not (*this == rhs);
}
inline std::string const &ObjDump::const_iterator::operator*() const
{
return d_line;
}
inline std::string const *ObjDump::const_iterator::operator->() const
{
return &d_line;
}
#endif
oxref-1.00.06/objdump/constiterator1.cc 0000644 0001750 0001750 00000000245 12633541675 016732 0 ustar frank frank #include "objdump.ih"
ObjDump::const_iterator::const_iterator(Process *process, bool iterate)
:
d_process(process),
d_iterate(iterate)
{
++*this;
}
oxref-1.00.06/objdump/objdump1.cc 0000644 0001750 0001750 00000000666 12633541675 015501 0 ustar frank frank #include "objdump.ih"
ObjDump::ObjDump()
:
d_process(Process::COUT)
{
Arg &arg = Arg::instance();
string odump;
if (!arg.option(&odump, "objdump"))
odump = "/usr/bin/objdump -C -t";
d_process.setCommand(odump);
for_each(
arg.argPointers(), arg.argPointers() + arg.nArgs(),
[&](string const &arg)
{
d_process += " ";
d_process += arg;
}
);
}
oxref-1.00.06/objdump/objdump.ih 0000644 0001750 0001750 00000000211 12633541675 015415 0 ustar frank frank #include "objdump.h"
#include
#include
#include
using namespace std;
using namespace FBB;
oxref-1.00.06/objdump/operatorequal.cc 0000644 0001750 0001750 00000000260 12633541675 016631 0 ustar frank frank #include "objdump.ih"
bool ObjDump::const_iterator::operator==(const_iterator const &other) const
{
return d_iterate == other.d_iterate && d_process == other.d_process;
}
oxref-1.00.06/oxref.cc 0000644 0001750 0001750 00000003420 12633541675 013432 0 ustar frank frank #include "main.ih"
namespace
{
Arg::LongOption longOptions[] =
{
{"arg", 'a'},
{"help", 'h'},
{"objdump", Arg::Required},
{"object-files", 'o'},
{"source-files", 's'},
{"full-symbol", 'f'},
{"select-pattern", Arg::Required},
{"select", Arg::Required},
{"xref-source-files", 'x'},
{"version", 'v'},
};
Arg::LongOption const *const longEnd =
longOptions +
sizeof(longOptions) / sizeof(Arg::LongOption);
}
int main(int argc, char **argv)
try
{
Arg &arg = Arg::initialize("a:fhosvx", longOptions, longEnd, argc, argv);
arg.versionHelp(usage, version, 1);
ObjDump odump;
Storage storage;
odump.start(); // generate objdump's output
// insert into Storage
copy(odump.begin(), odump.end(), back_inserter(storage));
// display the results
cout <<
arg.basename() << " by " << Icmbuild::author << '\n' <<
arg.basename() << " V" << Icmbuild::version << ' ' <<
Icmbuild::years << "\n"
"\n"
"CREATED " << DateTime().rfc2822() << "\n"
"CROSS REFERENCE FOR: ";
copy(argv + 1, argv + argc, ostream_iterator(cout, " "));
cout << '\n' <<
setfill('-') << setw(70) << '-' << setfill(' ') << "\n"
"\n" <<
storage << '\n';
}
catch (std::exception const &e)
{
cout << e.what() << '\n';
return 1;
}
catch (int x)
{
return Arg::instance().option("hv") ? 0 : x;
}
catch (...)
{
cout << "Caught unaccounted for exception\n";
return 1;
}
oxref-1.00.06/oxref.xref 0000644 0001750 0001750 00000030740 12633541675 014016 0 ustar frank frank binary by Frank B. Brokken (f.b.brokken@rug.nl)
binary V1.00.05 2012-2015
CREATED Mon, 14 Dec 2015 13:22:04 +0000
CROSS REFERENCE FOR: -fxs tmp/libmodules.a
----------------------------------------------------------------------
author
Full name: Icmbuild::author
Source: version.cc
Used By:
usage.cc: usage(std::__cxx11::basic_string, std::allocator > const&)
calledFrom(unsigned int)
Full name: XrefData::calledFrom(unsigned int)
Source: calledfrom.cc
Used By:
undefined.cc: Store::undefined(std::__cxx11::basic_string, std::allocator > const&)
ctor()
Full name: XrefData::ctor()
Source: ctor.cc
Used By:
xrefdata2.cc: XrefData::XrefData(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, bool, std::__cxx11::basic_string, std::allocator > const&)
xrefdata3.cc: XrefData::XrefData(std::__cxx11::basic_string, std::allocator > const&)
define(std::__cxx11::basic_string, std::allocator > const&, bool)
Full name: Store::define(std::__cxx11::basic_string, std::allocator > const&, bool)
Source: define.cc
Used By:
setfunction.cc: Store::setFunction(std::__cxx11::basic_string, std::allocator > const&)
setobject.cc: Store::setObject(std::__cxx11::basic_string, std::allocator > const&)
setsource.cc: Store::setSource(std::__cxx11::basic_string, std::allocator > const&)
defined(std::ostream&) const
Full name: XrefData::defined(std::ostream&) const
Source: defined.cc
Used By:
insertdefined.cc: Store::insertDefined(unsigned int, std::ostream&, std::vector > const&)
eraseParam(unsigned int)
Full name: XrefData::eraseParam(unsigned int)
Source: eraseparam.cc
Used By:
keepfirst.cc: XrefData::keepFirst(unsigned int)
eraseParam(unsigned int, unsigned int)
Full name: XrefData::eraseParam(unsigned int, unsigned int)
Source: eraseparam2.cc
Used By:
reducelen.cc: XrefData::reduceLen(unsigned int, unsigned int)
function(std::__cxx11::basic_string, std::allocator > const&)
Full name: Storage::function(std::__cxx11::basic_string, std::allocator > const&)
Source: function.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
hasSymbol(std::__cxx11::basic_string, std::allocator > const&) const
Full name: XrefData::hasSymbol(std::__cxx11::basic_string, std::allocator > const&) const
Source: hassymbol.cc
Used By:
define.cc: Store::define(std::__cxx11::basic_string, std::allocator > const&, bool)
undefined.cc: Store::undefined(std::__cxx11::basic_string, std::allocator > const&)
insert(std::ostream&, std::__cxx11::basic_string, std::allocator > const&, bool) const
Full name: Store::insert(std::ostream&, std::__cxx11::basic_string, std::allocator > const&, bool) const
Source: insert.cc
Used By:
insertinto.cc: Store::insertInto(std::ostream&) const
insertDefined(unsigned int, std::ostream&, std::vector > const&)
Full name: Store::insertDefined(unsigned int, std::ostream&, std::vector > const&)
Source: insertdefined.cc
Used By:
insert.cc: Store::insert(std::ostream&, std::__cxx11::basic_string, std::allocator > const&, bool) const
insertinto.cc: Store::insertInto(std::ostream&) const
isDefined(std::__cxx11::basic_string, std::allocator > const&) const
Full name: XrefData::isDefined(std::__cxx11::basic_string, std::allocator > const&) const
Source: isdefined.cc
Used By:
define.cc: Store::define(std::__cxx11::basic_string, std::allocator > const&, bool)
keepFirst(unsigned int)
Full name: XrefData::keepFirst(unsigned int)
Source: keepfirst.cc
Used By:
setcooked.cc: XrefData::setCooked()
object(std::__cxx11::basic_string, std::allocator > const&)
Full name: Storage::object(std::__cxx11::basic_string, std::allocator > const&)
Source: object.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
objFile(std::__cxx11::basic_string, std::allocator > const&)
Full name: Storage::objFile(std::__cxx11::basic_string, std::allocator > const&)
Source: objfile.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
operator++()
Full name: ObjDump::const_iterator::operator++()
Source: prefixinc.cc
Used By:
constiterator1.cc: ObjDump::const_iterator::const_iterator(FBB::Process*, bool)
reduceLen(unsigned int, unsigned int)
Full name: XrefData::reduceLen(unsigned int, unsigned int)
Source: reducelen.cc
Used By:
setcooked.cc: XrefData::setCooked()
reduceToCount(unsigned int, unsigned int)
Full name: XrefData::reduceToCount(unsigned int, unsigned int)
Source: reducetocount.cc
Used By:
setcooked.cc: XrefData::setCooked()
s_abs
Full name: Storage::s_abs
Source: data.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
s_g_F
Full name: Storage::s_g_F
Source: data.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
s_g_O
Full name: Storage::s_g_O
Source: data.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
s_objFile
Full name: Storage::s_objFile
Source: data.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
s_reject
Full name: Storage::s_reject
Source: data.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
s_UND
Full name: Storage::s_UND
Source: data.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
setCooked()
Full name: XrefData::setCooked()
Source: setcooked.cc
Used By:
ctor.cc: XrefData::ctor()
setFunction(std::__cxx11::basic_string, std::allocator > const&)
Full name: Store::setFunction(std::__cxx11::basic_string, std::allocator > const&)
Source: setfunction.cc
Used By:
function.cc: Storage::function(std::__cxx11::basic_string, std::allocator > const&)
setLocation(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)
Full name: XrefData::setLocation(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&)
Source: setlocation.cc
Used By:
define.cc: Store::define(std::__cxx11::basic_string, std::allocator > const&, bool)
setObject(std::__cxx11::basic_string, std::allocator > const&)
Full name: Store::setObject(std::__cxx11::basic_string, std::allocator > const&)
Source: setobject.cc
Used By:
object.cc: Storage::object(std::__cxx11::basic_string, std::allocator > const&)
setObjfile(std::__cxx11::basic_string, std::allocator > const&)
Full name: Store::setObjfile(std::__cxx11::basic_string, std::allocator > const&)
Source: setobjfile.cc
Used By:
objfile.cc: Storage::objFile(std::__cxx11::basic_string, std::allocator > const&)
setSource(std::__cxx11::basic_string, std::allocator > const&)
Full name: Store::setSource(std::__cxx11::basic_string, std::allocator > const&)
Source: setsource.cc
Used By:
sourcefile.cc: Storage::sourceFile(std::__cxx11::basic_string, std::allocator > const&)
skipTemplate(unsigned int) const
Full name: XrefData::skipTemplate(unsigned int) const
Source: skiptemplate.cc
Used By:
eraseparam.cc: XrefData::eraseParam(unsigned int)
eraseparam2.cc: XrefData::eraseParam(unsigned int, unsigned int)
reducetocount.cc: XrefData::reduceToCount(unsigned int, unsigned int)
sourceFile(std::__cxx11::basic_string, std::allocator > const&)
Full name: Storage::sourceFile(std::__cxx11::basic_string, std::allocator > const&)
Source: sourcefile.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
Store()
Full name: Store::Store()
Source: store1.cc
Used By:
storage1.cc: Storage::Storage()
undefined(std::__cxx11::basic_string, std::allocator > const&)
Full name: Store::undefined(std::__cxx11::basic_string, std::allocator > const&)
Source: undefined.cc
Used By:
undefined.cc: Storage::undefined(std::__cxx11::basic_string, std::allocator > const&)
undefined(std::__cxx11::basic_string, std::allocator > const&)
Full name: Storage::undefined(std::__cxx11::basic_string, std::allocator > const&)
Source: undefined.cc
Used By:
pushback.cc: Storage::push_back(std::__cxx11::basic_string, std::allocator > const&)
usedBy(unsigned int, std::ostream&, std::vector > const&)
Full name: Store::usedBy(unsigned int, std::ostream&, std::vector > const&)
Source: usedby.cc
Used By:
insertdefined.cc: Store::insertDefined(unsigned int, std::ostream&, std::vector > const&)
version
Full name: Icmbuild::version
Source: version.cc
Used By:
usage.cc: usage(std::__cxx11::basic_string, std::allocator > const&)
XrefData(std::__cxx11::basic_string, std::allocator > const&)
Full name: XrefData::XrefData(std::__cxx11::basic_string, std::allocator > const&)
Source: xrefdata3.cc
Used By:
undefined.cc: Store::undefined(std::__cxx11::basic_string, std::allocator > const&)
XrefData(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, bool, std::__cxx11::basic_string, std::allocator > const&)
Full name: XrefData::XrefData(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, bool, std::__cxx11::basic_string, std::allocator > const&)
Source: xrefdata2.cc
Used By:
define.cc: Store::define(std::__cxx11::basic_string, std::allocator > const&, bool)
years
Full name: Icmbuild::years
Source: version.cc
Used By:
usage.cc: usage(std::__cxx11::basic_string, std::allocator > const&)
oxref-1.00.06/required 0000644 0001750 0001750 00000000625 12635514173 013542 0 ustar frank frank This file lists non-standard software only. Thus, standard utilities like cp,
mv, sed, etc, etc, are not explicitly mentioned. Neither is the gcc compiler
explicitly mentioned, but a fairly recent one is assumed.
Required software for building Oxref
------------------------------------
Build-Depends:
libbobcat-dev (>= 4.01.03)
icmake (>= 8.00.04)
yodl (>= 3.06.0)
oxref-1.00.06/storage/ 0000755 0001750 0001750 00000000000 12633541675 013445 5 ustar frank frank oxref-1.00.06/storage/storage.h 0000644 0001750 0001750 00000002043 12633541675 015261 0 ustar frank frank #ifndef INCLUDED_STORAGE_
#define INCLUDED_STORAGE_
#include
#include
#include
#include "../store/store.h"
class Storage
{
friend std::ostream &operator<<(std::ostream &out,
Storage const &storage);
static FBB::Pattern s_reject;
static FBB::Pattern s_objFile;
static FBB::Pattern s_abs;
static FBB::Pattern s_UND;
static FBB::Pattern s_g_F;
static FBB::Pattern s_g_O;
Store d_store;
public:
typedef std::string value_type;
typedef value_type const &const_reference;
Storage();
void push_back(std::string const &line);
private:
void function(std::string const &symbol);
void objFile(std::string const &fname);
void sourceFile(std::string const &fname);
void undefined(std::string const &symbol);
void object(std::string const &symbol);
};
inline std::ostream &operator<<(std::ostream &out, Storage const &storage)
{
return out << storage.d_store;
}
#endif
oxref-1.00.06/storage/function.cc 0000644 0001750 0001750 00000000243 12633541675 015600 0 ustar frank frank #include "storage.ih"
void Storage::function(std::string const &symbol)
{
// Note: symbols may multiply appear in objfiles
d_store.setFunction(symbol);
}
oxref-1.00.06/storage/storage.ih 0000644 0001750 0001750 00000003201 12633541675 015427 0 ustar frank frank #include "storage.h"
#include
using namespace std;
using namespace FBB;
// "/bin/grep -E -v '"
// "[[:space:]]_"
// "|"
// "archive"
// "|"
// "[[:space:]]\\.data"
// "|"
// "[[:space:]]\\.bss"
// "|"
// "[[:space:]]std::"
// "|"
// "[[:space:]]w[[:space:]]"
// "|"
// "__"
// "|"
// "[[:space:]]d[[:space:]]"
// "|"
// "SYMBOL[[:space:]]TABLE:"
// "|"
// "typeinfo[[:space:]]for"
// "|"
// "[[:space:]]l[[:space:]]+F[[:space:]]\\.text"
// "'");
//
// Pattern pattern(
//// " .data"
//// "|"
// "^\\s*$"
// "|"
// "^In archive"
// "|"
// " .bss"
// "|"
// " std::"
// "|"
// "__"
// "|"
// " _"
// "|"
// " d "
// "|"
// " w "
// "|"
// " l\\s+F\\s\\.text"
// "|"
// "SYMBOL TABLE:"
// "|"
// "operator delete\\(void\\*\\)"
// "|"
// "typeinfo for ",
// false); // case sensitive OFF
//
//
//
// {
// if (not(pattern << line))
// cout << line << endl;
// }
oxref-1.00.06/storage/objfile.cc 0000644 0001750 0001750 00000000153 12633541675 015365 0 ustar frank frank #include "storage.ih"
void Storage::objFile(std::string const &fname)
{
d_store.setObjfile(fname);
}
oxref-1.00.06/storage/data.cc 0000644 0001750 0001750 00000001433 12633541675 014666 0 ustar frank frank #include "storage.ih"
Pattern Storage::s_reject
(
"^.*\\*UND\\*\\s+\\d+\\s+_"
"|"
"vtable for"
"|"
"typeinfo for"
"|"
"virtual thunk to"
);
Pattern Storage::s_objFile("^(.*):\\s+file format");
Pattern Storage::s_abs("^.*\\*ABS\\*\\s+[[:alnum:]]+\\s(.*)");
// 00000000 *UND* 00000000 std::ios_base::Init::Init()
Pattern Storage::s_UND("^[[:alnum:]]+\\s+\\*UND\\*\\s+[[:alnum:]]+\\s(.*)");
// 00000090 g F .text 0000047f main
// 00000090 g F .text 00000165 usage(std::string const&)
Pattern Storage::s_g_F(
"^[[:alnum:]]+\\s+g\\s+F\\s+\\S+\\s+[[:alnum:]]+\\s(.*)");
// 00000000 g O .data 00000008 Icmbuild::version
Pattern Storage::s_g_O(
"^[[:alnum:]]+\\s+g\\s+O\\s+\\S+\\s+[[:alnum:]]+\\s(.*)");
oxref-1.00.06/storage/pushback.cc 0000644 0001750 0001750 00000000625 12633541675 015557 0 ustar frank frank #include "storage.ih"
void Storage::push_back(string const &line)
{
if (s_reject << line)
return;
if (s_objFile << line)
objFile(s_objFile[1]);
else if (s_abs << line)
sourceFile(s_abs[1]);
else if (s_UND << line)
undefined(s_UND[1]);
else if (s_g_F << line)
function(s_g_F[1]);
else if (s_g_O << line)
object(s_g_O[1]);
}
oxref-1.00.06/storage/object.cc 0000644 0001750 0001750 00000000152 12633541675 015220 0 ustar frank frank #include "storage.ih"
void Storage::object(std::string const &symbol)
{
d_store.setObject(symbol);
}
oxref-1.00.06/storage/storage1.cc 0000644 0001750 0001750 00000000055 12633541675 015501 0 ustar frank frank #include "storage.ih"
Storage::Storage()
{}
oxref-1.00.06/storage/undefined.cc 0000644 0001750 0001750 00000000233 12633541675 015713 0 ustar frank frank #include "storage.ih"
void Storage::undefined(std::string const &symbol)
{
//cout << "UNDEF'D: " << symbol << '\n';
d_store.undefined(symbol);
}
oxref-1.00.06/storage/sourcefile.cc 0000644 0001750 0001750 00000000300 12633541675 016105 0 ustar frank frank #include "storage.ih"
void Storage::sourceFile(std::string const &fname)
{
//d_sourceFile = fname;
//cout << "SOURCE FILE: " << d_sourceFile << '\n';
d_store.setSource(fname);
}
oxref-1.00.06/store/ 0000755 0001750 0001750 00000000000 12633541675 013135 5 ustar frank frank oxref-1.00.06/store/setsource.cc 0000644 0001750 0001750 00000000372 12633541675 015462 0 ustar frank frank #include "store.ih"
void Store::setSource(std::string const &fname)
{
d_sourceFile = fname;
// cout << "Sourcefile: " << d_sourceFile << '\n';
d_currentIdx = d_xrefData.size();
define("GLOBALS " + fname + " " + d_objFile, false);
}
oxref-1.00.06/store/setfunction.cc 0000644 0001750 0001750 00000000226 12633541675 016005 0 ustar frank frank #include "store.ih"
void Store::setFunction(string const &symbol)
{
d_symbol = symbol;
define(symbol, true); // true: define a function
}
oxref-1.00.06/store/usedby.cc 0000644 0001750 0001750 00000000414 12633541675 014736 0 ustar frank frank #include "store.ih"
void Store::usedBy(size_t idx, std::ostream &out, XrefVector const &xref)
{
XrefData const &ref = xref[idx];
out << " ";
if (Arg::instance().option('x'))
out << ref.sourceFile() << ": ";
out << ref.symbol() << '\n';
}
oxref-1.00.06/store/insert.cc 0000644 0001750 0001750 00000001736 12633541675 014757 0 ustar frank frank #include "store.ih"
void Store::insert(ostream &out, string const &name, bool doSelect) const
{
auto iter = d_defIdx.begin();
auto end = d_defIdx.end();
Pattern namePattern;
if (not doSelect)
namePattern.setPattern(name);
while (true)
{
iter = doSelect ?
find_if(
iter, end,
[&](size_t idx)
{
return string(d_xrefData[idx].name()).find(name)
== 0;
}
)
:
find_if(
iter, end,
[&](size_t idx)
{
return namePattern << d_xrefData[idx].symbol();
}
);
if (iter == end)
break;
insertDefined(*iter, out, d_xrefData);
++iter;
}
}
oxref-1.00.06/store/store1.cc 0000644 0001750 0001750 00000000053 12633541675 014657 0 ustar frank frank #include "store.ih"
Store::Store()
//:
{}
oxref-1.00.06/store/setobject.cc 0000644 0001750 0001750 00000000225 12633541675 015425 0 ustar frank frank #include "store.ih"
void Store::setObject(string const &symbol)
{
d_symbol = symbol;
define(symbol, false); // false: define an object
}
oxref-1.00.06/store/insertdefined.cc 0000644 0001750 0001750 00000000630 12633541675 016266 0 ustar frank frank #include "store.ih"
void Store::insertDefined(size_t idx, ostream &out, XrefVector const &xref)
{
XrefData const &ref = xref[idx];
auto begin = ref.usedBy().begin();
auto end = ref.usedBy().end();
if (begin != end)
{
ref.defined(out);
out << " Used By:\n";
for (auto idx: ranger(begin, end))
usedBy(idx, out, xref);
out << '\n';
}
}
oxref-1.00.06/store/store.ih 0000644 0001750 0001750 00000000306 12633541675 014612 0 ustar frank frank #include "store.h"
#include
#include
#include
#include
#include
#include
using namespace std;
using namespace FBB;
oxref-1.00.06/store/store.h 0000644 0001750 0001750 00000003007 12633541675 014442 0 ustar frank frank #ifndef INCLUDED_STORE_
#define INCLUDED_STORE_
#include
#include
#include
#include "../xrefdata/xrefdata.h"
namespace FBB
{
class Pattern;
}
class Store
{
friend std::ostream &operator<<(std::ostream &out, Store const &store);
size_t d_currentIdx;
std::string d_sourceFile;
std::string d_objFile;
std::string d_symbol;
typedef std::vector XrefVector;
XrefVector d_xrefData;
mutable std::vector d_defIdx; // indices of defined
// functions/objects
public:
Store();
void setSource(std::string const &fname);
void setObjfile(std::string const &fname);
void setFunction(std::string const &function);
void setObject(std::string const &object);
void undefined(std::string const &symbol);
private:
void define(std::string const &symbol, bool isFunction);
std::ostream &insertInto(std::ostream &out) const;
void insert(std::ostream &out, std::string const &name,
bool doSelect) const;
static void insertDefined(size_t idx, std::ostream &out,
XrefVector const &xref);
static void usedBy(size_t idx, std::ostream &out,
XrefVector const &xref);
};
inline std::ostream &operator<<(std::ostream &out, Store const &store)
{
return store.insertInto(out);
}
#endif
oxref-1.00.06/store/undefined.cc 0000644 0001750 0001750 00000002141 12633541675 015403 0 ustar frank frank #include "store.ih"
// 00000000 *UND* 00000000 std::ios_base::Init::Init()
// ---------------------------
void Store::undefined(std::string const &symbol)
{
// find 'symbol' in d_xrefData.
// If not yet available add it to xrefData.
// Determine the symbol's index in xrefData
// The function currently handled has a currentIdx and from that index
// the current *UND* symbol is called.
auto iter = find_if(
d_xrefData.begin(), d_xrefData.end(),
[&](XrefData const &xrefData)
{
return xrefData.hasSymbol(symbol);
}
);
// FnWrap::unary(XrefData::hasSymbol, symbol));
size_t index = iter - d_xrefData.begin(); // index of this symbol
if (iter == d_xrefData.end()) // symbol not yet defined
{
index = d_xrefData.size();
d_xrefData.push_back(XrefData(symbol)); // define the symbol
}
d_xrefData[index].calledFrom(d_currentIdx);
}
oxref-1.00.06/store/insertinto.cc 0000644 0001750 0001750 00000001340 12633541675 015640 0 ustar frank frank #include "store.ih"
std::ostream &Store::insertInto(std::ostream &out) const
{
Arg &arg = Arg::instance();
bool doSelect;
string entity;
if
(
(doSelect = arg.option(&entity, "select"))
||
arg.option(&entity, "select-pattern")
)
insert(out, entity, doSelect);
else
{
sort(
d_defIdx.begin(), d_defIdx.end(),
[&](size_t left, size_t right)
{
return
strcasecmp(d_xrefData[left].name(),
d_xrefData[right].name()) < 0;
}
);
for (auto idx: d_defIdx)
insertDefined(idx, out, d_xrefData);
}
return out;
}
oxref-1.00.06/store/setobjfile.cc 0000644 0001750 0001750 00000000141 12633541675 015566 0 ustar frank frank #include "store.ih"
void Store::setObjfile(std::string const &fname)
{
d_objFile = fname;
}
oxref-1.00.06/store/define.cc 0000644 0001750 0001750 00000002617 12633541675 014704 0 ustar frank frank #include "store.ih"
void Store::define(std::string const &symbol, bool isFunction)
{
auto iter = find_if(
d_xrefData.begin(), d_xrefData.end(),
[&](XrefData const &data)
{
return data.isDefined(symbol);
}
);
if (iter != d_xrefData.end())
return; // symbol already defined
iter = find_if(
d_xrefData.begin(), d_xrefData.end(),
[&](XrefData const &xrefData)
{
return xrefData.hasSymbol(symbol);
}
);
size_t currentIdx;
if (iter != d_xrefData.end())
{
currentIdx = iter - d_xrefData.begin();
d_xrefData[currentIdx].setLocation(d_sourceFile, d_objFile);
d_defIdx.push_back(currentIdx);
}
else
{
// new symbol: defined at index currentIdx,
// any *UND* elements are for function currentIdx
// if not a function, then d_currentIdx isn't
// used with *UND* elements
d_defIdx.push_back(currentIdx = d_xrefData.size());
d_xrefData.push_back(
XrefData(d_sourceFile, d_objFile, isFunction, symbol)
);
}
if (isFunction)
d_currentIdx = currentIdx;
}
oxref-1.00.06/usage.cc 0000644 0001750 0001750 00000004263 12633541675 013421 0 ustar frank frank // usage.cc
#include "main.ih"
void usage(std::string const &progname)
{
cout << '\n' <<
progname << " by " << Icmbuild::author << '\n' <<
progname << " V" << Icmbuild::version << " " << Icmbuild::years << "\n"
"\n"
"Usage: " << progname << " [options] args\n"
"Where:\n"
" [options] - optional arguments (short options between parentheses):\n"
" --arg (-a) ...\n"
" count - display function argument counts only\n"
" first - only display the first word of the parameter "
"types\n"
" - restrict parameter types to the first "
"characters\n"
" --full-symbol (-f) - display the full symbol names (e.g.,\n"
" including class name prefixes)\n"
" --help (-h) - provide this help\n"
" --object-files (-o) - display the object file names\n"
" --select name - only display the cross-reference of "
"`name',\n"
" where `name' is the (initial substring "
"of an)\n"
" entity's name.\n"
" --select-pattern regex - only display the cross-reference of "
"`regex',\n"
" where `regex' is a regular expression\n"
" against which (full) symbols are "
"matched\n"
" --source-files (-s) - display the source file names\n"
" --xref-source-files (-x)- display the source file names in the \n"
" cross-reference lists\n"
" --version (-v) - show version information and terminate\n"
"\n"
" args - non-stripped .o or libraries whose symbols must be\n"
" cross-referenced.\n"
"\n";
}
oxref-1.00.06/version.cc 0000644 0001750 0001750 00000000273 12635514305 013767 0 ustar frank frank // version.cc
#include "main.ih"
#include "VERSION"
namespace Icmbuild
{
char version[] = VERSION;
char years[] = YEARS;
char author[] = AUTHOR;
}
oxref-1.00.06/xrefdata/ 0000755 0001750 0001750 00000000000 12633541675 013577 5 ustar frank frank oxref-1.00.06/xrefdata/ctor.cc 0000644 0001750 0001750 00000001207 12633541675 015055 0 ustar frank frank #include "xrefdata.ih"
void XrefData::ctor()
{
Arg &arg = Arg::instance();
d_source = arg.option('s');
d_object = arg.option('o');
d_fullSymbol = arg.option('f');
d_nameIndex = d_refName.find('('); // find 1st opening '('
if (d_nameIndex == string::npos) // not found: search fm the end
d_nameIndex = d_refName.length();
d_nameIndex = d_refName.rfind(':', d_nameIndex); // find SRO
d_nameIndex =
d_nameIndex == string::npos ? // none found: use full d_refName
0
:
d_nameIndex + 1; // else: d_refName starts beyond :
setCooked();
}
oxref-1.00.06/xrefdata/skiptemplate.cc 0000644 0001750 0001750 00000000755 12633541675 016617 0 ustar frank frank #include "xrefdata.ih"
size_t XrefData::skipTemplate(size_t begin) const
{
size_t level = 1;
while (true)
{
begin = d_cooked.find_first_of("<>", begin);
if (begin == string::npos)
throw Exception() <<
"skipTemplate: invalid template spec. in " << d_cooked;
if (d_cooked[begin] == '<')
++level;
else
--level;
if (level == 0)
return begin;
++begin;
}
}
oxref-1.00.06/xrefdata/calledfrom.cc 0000644 0001750 0001750 00000000161 12633541675 016214 0 ustar frank frank #include "xrefdata.ih"
void XrefData::calledFrom(size_t currentIdx)
{
d_calledFrom.push_back(currentIdx);
}
oxref-1.00.06/xrefdata/xrefdata.h 0000644 0001750 0001750 00000004431 12633541675 015550 0 ustar frank frank #ifndef INCLUDED_XREFDATA_
#define INCLUDED_XREFDATA_
#include
#include
#include
class XrefData
{
std::string d_sourceFile; // defined, unless empty
std::string d_objFile;
bool d_isFunction; // true: function, false: object
std::string d_refName; // full name of object or function
std::string d_cooked; // name as processed by -a
size_t d_nameIndex; // index where the proper name (after
// its class/namespace) starts
std::vector d_calledFrom;
bool d_source;
bool d_object;
bool d_fullSymbol;
public:
XrefData();
XrefData(std::string const &sourceFile,
std::string const &objFile,
bool isFunction, std::string const &symbol);
XrefData(std::string const &symbol);
void setLocation(std::string const &sourceFile,
std::string const &objFile);
bool isDefined(std::string const &symbol) const;
bool hasSymbol(std::string const &symbol) const;
void calledFrom(size_t currentIdx);
void defined(std::ostream &out) const;
std::string const &symbol() const;// returns d_cooked
char const *name() const; // returns d_cooked[d_nameIndex]
std::string const &sourceFile() const;
std::vector const &usedBy() const;
private:
void ctor();
void setCooked();
void keepFirst(size_t openParIdx);
void reduceLen(size_t openParIdx, size_t len);
void reduceToCount(size_t openParIdx, size_t end);
size_t skipTemplate(size_t begin) const; // index of 1st '<'
// returns idx of last '>'
size_t eraseParam(size_t begin); // returns , or ) position
size_t eraseParam(size_t begin, size_t len);
};
inline std::vector const &XrefData::usedBy() const
{
return d_calledFrom;
}
inline char const *XrefData::name() const
{
return d_cooked.c_str() + d_nameIndex;
}
inline std::string const &XrefData::sourceFile() const
{
return d_sourceFile;
}
inline std::string const &XrefData::symbol() const
{
return d_cooked;
}
#endif
oxref-1.00.06/xrefdata/setcooked.cc 0000644 0001750 0001750 00000001347 12633541675 016073 0 ustar frank frank #include "xrefdata.ih"
void XrefData::setCooked()
{
d_cooked = d_refName;
size_t begin = d_cooked.find('(', d_nameIndex);
size_t end = d_cooked.rfind(')');
if (begin == string::npos || end == string::npos) // no parentheses ???
return; // so be it...
Arg &arg = Arg::instance();
string option;
if (not arg.option(&option, 'a'))
return; // no -a option
if (option == "count")
reduceToCount(begin, end);
else if (option == "first")
keepFirst(begin);
else
{
size_t len = stoul(option);
if (len < 5)
len = 5;
reduceLen(begin, len);
}
}
oxref-1.00.06/xrefdata/defined.cc 0000644 0001750 0001750 00000000556 12633541675 015512 0 ustar frank frank #include "xrefdata.ih"
void XrefData::defined(std::ostream &out) const
{
out << name() << '\n';
if (d_fullSymbol)
out << " Full name: " << symbol() << '\n';
if (d_source)
out << " Source: " << d_sourceFile << ' ';
if (d_object)
out << '(' << d_objFile << ')';
if (d_source || d_object)
out << '\n';
}
oxref-1.00.06/xrefdata/xrefdata2.cc 0000644 0001750 0001750 00000000423 12633541675 015765 0 ustar frank frank #include "xrefdata.ih"
XrefData::XrefData(string const &sourceFile, string const &objFile,
bool isFunction, string const &symbol)
:
d_sourceFile(sourceFile),
d_objFile(objFile),
d_isFunction(isFunction),
d_refName(symbol)
{
ctor();
}
oxref-1.00.06/xrefdata/setlocation.cc 0000644 0001750 0001750 00000000240 12633541675 016426 0 ustar frank frank #include "xrefdata.ih"
void XrefData::setLocation(string const &sourceFile, string const &objFile)
{
d_sourceFile = sourceFile;
d_objFile = objFile;
}
oxref-1.00.06/xrefdata/reducetocount.cc 0000644 0001750 0001750 00000001512 12633541675 016770 0 ustar frank frank #include "xrefdata.ih"
void XrefData::reduceToCount(size_t openParIdx, size_t end)
{
size_t nArgs = 0;
for (size_t begin = openParIdx + 1; begin != end; ++begin)
{
switch (d_cooked[begin])
{
case ' ': // ignore blanks
case '\t':
case ',': // skip over the comma's
break;
default: // skip argument
begin = d_cooked.find_first_of("<,)", begin);
if (begin == end)
--begin;
++nArgs;
break;
case '<':
begin = skipTemplate(begin);
break;
}
}
if (nArgs)
{
auto iter = d_cooked.begin();
d_cooked.replace(iter + openParIdx + 1, iter + end, to_string(nArgs));
}
}
oxref-1.00.06/xrefdata/xrefdata1.cc 0000644 0001750 0001750 00000000211 12633541675 015757 0 ustar frank frank #include "xrefdata.ih"
XrefData::XrefData()
:
d_isFunction(false),
d_nameIndex(0),
d_source(false),
d_object(false)
{}
oxref-1.00.06/xrefdata/hassymbol.cc 0000644 0001750 0001750 00000000172 12633541675 016107 0 ustar frank frank #include "xrefdata.ih"
bool XrefData::hasSymbol(string const &symbol) const
{
return d_refName == symbol;
}
oxref-1.00.06/xrefdata/keepfirst.cc 0000644 0001750 0001750 00000002221 12633541675 016077 0 ustar frank frank #include "xrefdata.ih"
void XrefData::keepFirst(size_t openParIdx)
{
//cout << d_cooked << "\n";
size_t begin = openParIdx;
while (d_cooked[begin] != ')')
{
++begin; // beyond the separator
if (d_cooked[begin] == ' ') // keep blank after sep.
++begin;
size_t next = d_cooked.find_first_not_of(" \t", begin); // erase extra
d_cooked.erase(begin, next - begin); // blanks
// find end of 1st word:
// < begins template
// , ends argument
// ) ends parlist
// blank ends 1st word
begin = d_cooked.find_first_of("*&<,) \t", begin);
begin = eraseParam(begin); // erase the param. from
// 'begin', return , or )
// position
}
}
oxref-1.00.06/xrefdata/xrefdata3.cc 0000644 0001750 0001750 00000000244 12633541675 015767 0 ustar frank frank #include "xrefdata.ih"
XrefData::XrefData(string const &symbol)
:
d_isFunction(false), // actually: not yet known
d_refName(symbol)
{
ctor();
}
oxref-1.00.06/xrefdata/reducelen.cc 0000644 0001750 0001750 00000001312 12633541675 016051 0 ustar frank frank #include "xrefdata.ih"
void XrefData::reduceLen(size_t openParIdx, size_t len)
{
size_t begin = openParIdx;
while (d_cooked[begin] != ')')
{
++begin; // beyond the separator
if (d_cooked[begin] == ' ') // keep blank after sep.
++begin;
size_t next = d_cooked.find_first_not_of(" \t", begin); // erase extra
d_cooked.erase(begin, next - begin); // blanks
begin = eraseParam(begin, len); // erase the param. from
// 'begin', return , or )
// position
}
}
oxref-1.00.06/xrefdata/xrefdata.ih 0000644 0001750 0001750 00000000212 12633541675 015712 0 ustar frank frank #include "xrefdata.h"
#include
#include
#include
using namespace std;
using namespace FBB;
oxref-1.00.06/xrefdata/eraseparam.cc 0000644 0001750 0001750 00000000565 12633541675 016234 0 ustar frank frank #include "xrefdata.ih"
size_t XrefData::eraseParam(size_t begin)
{
size_t next = begin;
while (true)
{
next = d_cooked.find_first_of("*&<,)", next);
if (d_cooked[next] != '<')
break;
next = skipTemplate(next + 1) + 1;
}
d_cooked.erase(begin, next - begin);
return d_cooked.find_first_of(",)", begin);
}
oxref-1.00.06/xrefdata/eraseparam2.cc 0000644 0001750 0001750 00000000775 12633541675 016321 0 ustar frank frank #include "xrefdata.ih"
size_t XrefData::eraseParam(size_t begin, size_t len)
{
size_t next = begin;
while (true)
{
next = d_cooked.find_first_of("*&<,)", next);
if (d_cooked[next] != '<')
break;
next = skipTemplate(next + 1) + 1;
}
if (next - begin > len)
{
d_cooked.erase(begin + len, next - begin - len);
begin += len;
d_cooked.replace(begin - 3, 3, "...", 3);
}
return d_cooked.find_first_of(",)", begin);
}
oxref-1.00.06/xrefdata/isdefined.cc 0000644 0001750 0001750 00000000226 12633541675 016040 0 ustar frank frank #include "xrefdata.ih"
bool XrefData::isDefined(string const &symbol) const
{
return not d_sourceFile.empty() && d_refName == symbol;
}