nspluginwrapper-0.9.91.1

Taken from Wayback machine.
This commit is contained in:
David Benjamin 2011-03-05 22:41:13 -05:00
commit 498fa50f29
115 changed files with 55340 additions and 0 deletions

340
COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

750
ChangeLog Normal file
View File

@ -0,0 +1,750 @@
2006-12-27 00:41 Gwenole Beauchesne <gb.public@free.fr>
* src/debug.h: Include <stdarg.h>.
2006-12-27 00:31 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-27 00:30 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-26 10:45 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-26 10:40 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: Fix make changelog (again).
2006-12-26 10:39 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-26 10:38 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-26 10:36 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-26 10:34 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, nspluginwrapper.spec: 0.9.91.1
2006-12-26 10:33 Gwenole Beauchesne <gb.public@free.fr>
* src/debug.c, src/debug.h, src/utils.c, src/utils.h: Move logging
functions to debug.c.
2006-12-25 07:46 Gwenole Beauchesne <gb.public@free.fr>
* src/debug.c, src/utils.c, src/utils.h: NPW_LOG applies to all
outputs, not only the debug ones.
2006-12-25 00:00 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-24 23:58 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
* NEWS, README: Updates for new release.
2006-12-24 23:51 Gwenole Beauchesne <gb.public@free.fr>
* tests/test-plugins.html: Add Tcl & Squeak plugins demos.
2006-12-24 23:11 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c, src/npw-wrapper.c: Actually, NPP_NewStream()
can alter the notifyData pointer.
2006-12-24 23:05 Gwenole Beauchesne <gb.public@free.fr>
* src/npruntime.c: Missed migrations to npw_perror().
2006-12-24 18:53 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.c: Fix marshaling of NP_NOTIFY_DATA, don't use
id_create() from plugin-side as
this is a browser-side specific function. Simply pass the
notifyData pointer.
2006-12-24 15:59 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.c, src/npw-rpc.h, src/npw-viewer.c,
src/npw-wrapper.c: Handle notifyData as plugin-side opaque
pointers, i.e. browser-side doesn't
need to know what they represent so they can be single IDs
there. Shorten
NPP_NewStream() to have stype as output only (not for input,
it's initialized
in the plug-in side prior to calling the plugin NPP_NewStream()).
2006-12-24 12:37 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: Split RPC / NPAPI level routines.
2006-12-24 11:47 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c, src/npw-wrapper.c: Always return a value for
NP{P,N}_GetValue().
2006-12-24 11:03 Gwenole Beauchesne <gb.public@free.fr>
* src/rpc.c: Fix buffered RPC transactions.
2006-12-24 10:14 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c, src/npw-wrapper.c: Propagate NPSavedData data
to the plugin, though Firefox doesn't handle this.
It may work with Mozilla or Konqueror though.
2006-12-24 08:17 Gwenole Beauchesne <gb.public@free.fr>
* src/npruntime.c, src/npw-viewer.c, src/npw-wrapper.c, src/rpc.c,
src/rpc.h, src/utils.c, src/utils.h: Improve error messages.
2006-12-24 07:23 Gwenole Beauchesne <gb.public@free.fr>
* src/npruntime.c, src/npw-viewer.c, src/npw-wrapper.c: Mark
g_rpc_connection as hidden until it is made PluginInstance
specific.
2006-12-24 00:09 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Fix NPP_New() for null arguments.
2006-12-24 00:08 Gwenole Beauchesne <gb.public@free.fr>
* src/rpc.c: Fix marshaling of empty strings (not null).
2006-12-23 19:01 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, src/npw-rpc.c, src/rpc.c: Fix marshaling of arrays of data
passed by value (NPIdentifiers for the VLC
plug-in). Adjust message descriptors to reflect proper array
base type.
2006-12-23 15:03 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Fix NPN_GetStringIdentifiers().
2006-12-23 11:55 Gwenole Beauchesne <gb.public@free.fr>
* NEWS: Updates.
2006-12-23 08:38 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: id_init() now returns a boolean value.
* src/npw-config.c: Fix mkdir -p as NetBSD can generate EISDIR if
a directory already exists.
2006-12-23 08:32 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-config.c: Avoid use of <alloca.h>, thus alloca(). Use
ISO C VLA instead.
2006-12-22 08:18 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
* src/npw-viewer.c: Delay execution of NPN_PostURL{,Notify}()
functions.
2006-12-22 07:56 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
* src/npw-wrapper.c: Fix regression in NPN_GetValue(), a NULL
instance is allowed.
2006-12-22 07:21 Gwenole Beauchesne <gb.public@free.fr>
* README: Updates.
2006-12-22 07:05 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl.
2006-12-22 07:02 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Reject Flash Player 9 beta 1.
2006-12-22 06:48 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Allow user to disable npruntime with the
NPW_DISABLE_NPRUNTIME env var.
2006-12-22 00:32 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: Fix generation of devel/release svndate in tarball's
nspluginwrapper.spec.
2006-12-22 00:12 Gwenole Beauchesne <gb.public@free.fr>
* configure: Allow for a different installation root with
--pkglibdir=ROOT.
2006-12-22 00:00 Gwenole Beauchesne <gb.public@free.fr>
* src/npruntime-impl.h, src/npruntime.c, src/npw-viewer.c,
src/npw-wrapper.c: Add dummy npruntime functions for browsers
that don't support that API.
Always return NPERR_MODULE_LOAD_FAILED_ERROR in NP_Initialize()
on error.
2006-12-21 18:47 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: Simplify ChangeLog commit string.
2006-12-21 18:43 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl the 21_Dec
* NEWS, nspluginwrapper.spec: 0.9.91
2006-12-21 18:34 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, src/npruntime-impl.h, src/npruntime.c, src/npw-rpc.c,
src/npw-rpc.h, src/npw-viewer.c, src/npw-wrapper.c: Add
npruntime support.
2006-12-21 18:28 Gwenole Beauchesne <gb.public@free.fr>
* src/utils.c, src/utils.h: Add ID lookup by value.
2006-12-21 17:56 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c, src/npw-wrapper.c: Fix NPN_GetValue() to
return a value even on error.
2006-12-21 17:42 Gwenole Beauchesne <gb.public@free.fr>
* src/utils.c: Fix typo.
2006-12-20 23:36 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: Fix ChangeLog generation (strip off-project path
components).
2006-12-20 23:35 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl the 21_Dec
2006-12-20 10:49 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: Update for new snapshot.
2006-12-20 10:40 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl the 20_déc
* Makefile: Add missing files for tarball generation.
2006-12-20 10:28 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, nspluginwrapper.spec, src/npw-config.c:
Improve support for development snapshots.
2006-12-20 07:16 Gwenole Beauchesne <gb.public@free.fr>
* TODO: Add note about communication stream to be flushed on error.
* src/npw-rpc.h, src/npw-viewer.c, src/npw-wrapper.c: Implement
NPN_RequestRead().
2006-12-20 07:14 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.c, src/npw-rpc.h: Handle NPByteRange objects.
2006-12-20 07:12 Gwenole Beauchesne <gb.public@free.fr>
* src/rpc.h: Add RPC_ERROR_MESSAGE_ARGUMENT_INVALID.
2006-12-19 08:47 Gwenole Beauchesne <gb.public@free.fr>
* src/debug.c, src/npw-rpc.c, src/npw-viewer.c: Use the new
rpc_method_invoke_delayed() method.
2006-12-19 08:46 Gwenole Beauchesne <gb.public@free.fr>
* TODO, src/rpc.c, src/rpc.h: Add a means to delay calls until
incoming requests are processed.
2006-12-19 08:41 Gwenole Beauchesne <gb.public@free.fr>
* src/sysdeps.h: Fix NPW_COMPONENT_NAME definitions.
2006-12-18 10:33 Gwenole Beauchesne <gb.public@free.fr>
* npapi/nspr/prcpucfg.h: Fix ppc64 host support (32-bit types were
mis-defined).
2006-12-18 08:01 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, src/cxxabi-compat.cpp, src/npw-viewer.c:
Merge more complete libg++ compat code from Mozilla
(__pure_virtual).
2006-12-17 21:56 Gwenole Beauchesne <gb.public@free.fr>
* configure, src/rpc.c, src/rpc.h: Add support for 64-bit integers
and double values.
2006-12-17 17:16 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c, src/npw-wrapper.c: Use new NPP and NPStream
marshalers. Use NPERR_OUT_OF_MEMORY_ERROR where
necessary instead of RPC_ERROR_NO_MEMORY. Use a single
instance_id for NPP
instances, but note their IDs are allocated in the browser-side
only.
2006-12-17 16:58 Gwenole Beauchesne <gb.public@free.fr>
* src/utils.c, src/utils.h: Re-work ID accessors to match
GHashTable ones better.
2006-12-17 16:54 Gwenole Beauchesne <gb.public@free.fr>
* TODO: Updates.
2006-12-17 16:38 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.c, src/npw-rpc.h: Marshal NPP instances & NPStream
objects, based on their generated ID.
2006-12-17 16:34 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, src/sysdeps.h: Define specific
BUILD_{XPCOM,WRAPPER,VIEWER} macros.
2006-12-15 16:54 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: Generated by svn2cl the 15_déc
2006-12-15 16:52 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-config.c: Create user Mozilla plugin dir if it doesn't
exist yet.
2006-12-15 10:41 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: Fix bi-arch build on ppc64.
2006-12-15 10:23 Gwenole Beauchesne <gb.public@free.fr>
* configure: Fix ppc64 / ppc32 support.
2006-12-15 10:14 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-config.c: Force ELF_CLASS redefinition.
2006-12-13 09:52 Gwenole Beauchesne <gb.public@free.fr>
* tests/test-plugins.html: Add tests for mplayer plug-in.
2006-12-13 09:51 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, src/libxpcom.c: Add dummy XPCOM library.
2006-12-12 23:41 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.c, src/npw-rpc.h, src/npw-viewer.c,
src/npw-wrapper.c: Add XEMBED support.
2006-12-11 23:43 Gwenole Beauchesne <gb.public@free.fr>
* tests/test-plugins.html: Add VRML Samples page.
2006-11-30 00:05 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Initial fix for focus problems.
2006-11-29 22:24 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: Allocate a PlugInstance to hold private data
in the wrapper plugin too.
2006-11-27 22:40 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.sh: Expand PATH for RealPlayer package on NetBSD
(reaplay executable).
2006-11-27 22:39 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, src/npw-config.c: NetBSD 3.1 host support.
Auto-detect Linux/i386 plugins installed there.
2006-11-27 10:00 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-config.c, src/sysdeps.h: Don't try to update old-style
npwrapper.so plugin.
2006-11-27 07:00 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: Improve plugin description.
2006-11-27 06:54 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Print help if plugin path is not specified.
2006-11-27 06:44 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-config.c: Only skip target ARCH that is not available,
don't pair it with target OS. Also
skip viewers that match host OS/ARCH pairs.
2006-11-27 00:11 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: Drop runtime subpackage. Update for 0.9.91
(ABI change).
2006-11-27 00:10 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, src/npw-config.c: Lowercase OS defines.
2006-11-26 23:49 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, src/npw-config.c, src/npw-viewer.sh,
src/npw-wrapper.c, src/sysdeps.h: Move files to
NPW_LIBDIR/ARCH/OS directory where appropriate. This is necessary
to differentiate the viewers per ARCH/OS as there is no reliable
way to detect
an ELF object is for a specific OS (is e_ident[EI_OSABI] is not
filled in).
i.e. is_compatible_plugin() will actually execute npviewer
--test. Also fix
wrapped plugin installation so that it doesn't generate empty
files on failure.
2006-11-26 17:26 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c, src/npw-wrapper.c: Improve arguments handling,
this should fix processing of GTK arguments.
2006-11-25 15:52 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, src/npw-config.c: Fix build on Linux.
2006-11-25 15:40 Gwenole Beauchesne <gb.public@free.fr>
* configure, src/npw-config.c: Auto-detect Linux plugins on
FreeBSD platforms.
2006-11-25 12:51 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure: Only build the viewer on Linux platforms.
2006-11-25 10:38 Gwenole Beauchesne <gb.public@free.fr>
* src/sysdeps.h: Define _XOPEN_SOURCE to 600 to use POSIX
1003.1-2001 (with C99 elements)
2006-11-25 10:31 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-config.c: Embed necessary ELF definitions.
2006-11-25 09:55 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure: Detect X11 base dir, -ldl is a Linux
specific library.
2006-11-25 09:51 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: strcasecmp() is in <strings.h>
2006-11-19 23:28 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-config.c: Re-add 64-bit plugin paths, they are necessary
to get correct upgrades.
FIXME: probably split into "host" and "target" plugin dirs?
2006-11-19 23:08 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: Fix biarch/no-biarch builds.
2006-11-19 23:04 Gwenole Beauchesne <gb.public@free.fr>
* configure, nspluginwrapper.spec: Default to biarch builds on
x86-64. Make sure to report prerelease versions
so that to have a different version tag for upgrades to work.
2006-11-19 22:58 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: Update project URL.
2006-11-19 22:34 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, lsb-build/stub_libs/libc_nonshared.c,
src/sysdeps.h: Add checks for
__attribute__((visibility("hidden"))) and .{init,fini}_array
support.
2006-11-19 22:32 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: Make changelog. Clean lsb-build objdir. Cleanups.
2006-11-19 17:43 Gwenole Beauchesne <gb.public@free.fr>
* README: Document simplified build on x86-64 (LSB Desktop stubs).
2006-11-19 17:24 Gwenole Beauchesne <gb.public@free.fr>
* configure, src/npw-config.c: Update SUSE firefox paths. Add
Debian/Ubuntu and Gentoo plugins path. Remove
lib64 paths from mozilla since it's unlikely we need to wrap
64-bit plugins.
2006-11-19 15:17 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, lsb-build, lsb-build/headers,
lsb-build/headers/atk-1.0, lsb-build/headers/atk-1.0/atk,
lsb-build/headers/atk-1.0/atk/atk-enum-types.h,
lsb-build/headers/atk-1.0/atk/atk.h,
lsb-build/headers/core_filelist,
lsb-build/headers/desktop_filelist, lsb-build/headers/dlfcn.h,
lsb-build/headers/errno.h, lsb-build/headers/fcntl.h,
lsb-build/headers/fontconfig,
lsb-build/headers/fontconfig/fcfreetype.h,
lsb-build/headers/fontconfig/fcprivate.h,
lsb-build/headers/fontconfig/fontconfig.h,
lsb-build/headers/glib-2.0, lsb-build/headers/glib-2.0/glib,
lsb-build/headers/glib-2.0/glib-object.h,
lsb-build/headers/glib-2.0/glib.h,
lsb-build/headers/glib-2.0/glib/gprintf.h,
lsb-build/headers/glib-2.0/glib/gstdio.h,
lsb-build/headers/glib-2.0/gmodule.h,
lsb-build/headers/glib-2.0/gobject,
lsb-build/headers/glib-2.0/gobject/gvaluecollector.h,
lsb-build/headers/gtk-2.0, lsb-build/headers/gtk-2.0/gdk,
lsb-build/headers/gtk-2.0/gdk-pixbuf,
lsb-build/headers/gtk-2.0/gdk-pixbuf-xlib,
lsb-build/headers/gtk-2.0/gdk-pixbuf-xlib/gdk-pixbuf-xlib.h,
lsb-build/headers/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h,
lsb-build/headers/gtk-2.0/gdk-pixbuf/gdk-pixdata.h,
lsb-build/headers/gtk-2.0/gdk/gdk.h,
lsb-build/headers/gtk-2.0/gdk/gdkkeysyms.h,
lsb-build/headers/gtk-2.0/gdk/gdkx.h,
lsb-build/headers/gtk-2.0/gtk,
lsb-build/headers/gtk-2.0/gtk/gtk.h, lsb-build/headers/limits.h,
lsb-build/headers/pango-1.0, lsb-build/headers/pango-1.0/pango,
lsb-build/headers/pango-1.0/pango/pango-utils.h,
lsb-build/headers/pango-1.0/pango/pango.h,
lsb-build/headers/pango-1.0/pango/pangofc-decoder.h,
lsb-build/headers/pango-1.0/pango/pangofc-fontmap.h,
lsb-build/headers/pango-1.0/pango/pangoft2.h,
lsb-build/headers/pango-1.0/pango/pangoxft.h,
lsb-build/headers/stddef.h, lsb-build/headers/stdio.h,
lsb-build/headers/stdlib.h, lsb-build/headers/string.h,
lsb-build/headers/sys, lsb-build/headers/sys/resource.h,
lsb-build/headers/sys/select.h, lsb-build/headers/sys/time.h,
lsb-build/headers/sys/types.h, lsb-build/headers/sys/wait.h,
lsb-build/headers/time.h, lsb-build/headers/unistd.h,
lsb-build/headers/wctype.h, lsb-build/stub_libs,
lsb-build/stub_libs/LibNameMap.txt,
lsb-build/stub_libs/core_filelist,
lsb-build/stub_libs/core_static_filelist,
lsb-build/stub_libs/desktop_filelist,
lsb-build/stub_libs/libX11.Version,
lsb-build/stub_libs/libX11.c,
lsb-build/stub_libs/libXext.Version,
lsb-build/stub_libs/libXext.c,
lsb-build/stub_libs/libXt.Version, lsb-build/stub_libs/libXt.c,
lsb-build/stub_libs/libc_main.Version,
lsb-build/stub_libs/libc_main.c,
lsb-build/stub_libs/libc_nonshared.c,
lsb-build/stub_libs/libdl.Version, lsb-build/stub_libs/libdl.c,
lsb-build/stub_libs/libgcc_s.Version,
lsb-build/stub_libs/libgcc_s.c,
lsb-build/stub_libs/libgdk-x11-2.0.Version,
lsb-build/stub_libs/libgdk-x11-2.0.c,
lsb-build/stub_libs/libglib-2.0.Version,
lsb-build/stub_libs/libglib-2.0.c,
lsb-build/stub_libs/libgobject-2.0.Version,
lsb-build/stub_libs/libgobject-2.0.c,
lsb-build/stub_libs/libgthread-2.0.Version,
lsb-build/stub_libs/libgthread-2.0.c,
lsb-build/stub_libs/libgtk-x11-2.0.Version,
lsb-build/stub_libs/libgtk-x11-2.0.c,
lsb-build/stub_libs/libpthread.Version,
lsb-build/stub_libs/libpthread.c, src/utils.c: Import (minimal)
LSB Desktop build environment so that to help non-multiarch
capable x86-64 distributions to build the 32-bit viewer.
2006-11-17 16:47 Gwenole Beauchesne <gb.public@free.fr>
* configure, src/npw-config.c, src/sysdeps.h: bswap_*() functions
were only used in npw-config.c
2006-11-17 15:41 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog: updates
2006-11-17 15:40 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, nspluginwrapper.spec: 0.9.90.4
2006-11-17 15:38 Gwenole Beauchesne <gb.public@free.fr>
* README: Document --with-biarch, minor updates.
2006-11-17 09:58 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: update to use %_with_biarch directly
2006-11-17 08:01 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c, src/npw-wrapper.c, src/utils.c, src/utils.h:
Use optimized hash tables from GLib.
2006-11-16 06:07 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Only print message with dimensions are still
null...
2006-11-15 12:52 Gwenole Beauchesne <gb.public@free.fr>
* ChangeLog, Makefile: Add missing files for tarball generation.
* NEWS, nspluginwrapper.spec: 0.9.90.4
2006-11-15 11:16 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Fixup NPWindow size hints. Flash Player
doesn't like null dimensions and
Konqueror is actually passing that through
NPP_SetWindow()->NPWindow.
2006-11-15 11:13 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: Add support for Konqueror (not GTK based
toolkit)
2006-11-15 10:35 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Avoid an NPWindow->ws_info double free.
Comment implementation choices.
2006-11-15 10:31 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.h: Warning fixes (use uint8_t[] for NPPrintData
buffer)
2006-11-15 08:05 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.c, src/npw-rpc.h, src/npw-viewer.c,
src/npw-wrapper.c: Add printing support (implement NPP_Print)
2006-11-14 21:16 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.c, src/npw-rpc.h, src/npw-viewer.c,
src/npw-wrapper.c: Use dedicated marshaler for NPWindow & NPRect
structures. Rework NPP_SetWindow
to support NULL window arguments. Don't realize the top_widget,
only the form.
2006-11-13 22:07 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: use g_source_add_poll
2006-11-13 08:10 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-wrapper.c: _Exit(255) after a failed fork()+execv()
(original patch by Darryl L. Miles)
2006-11-12 22:08 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, src/npw-viewer.c, src/npw-viewer.map: use a version
script for RP8 compatibility glue (export __pure_virtual)
2006-11-12 20:41 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: fix XEvent polling, don't use deprecated gtk
polling routine, use g_source
polling functions
2006-11-12 20:06 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: use RP8 hack while building 32-bit viewer on x86_64
2006-11-11 17:03 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: Remove useless (and actually problematic)
XInitThreads() call
2006-11-11 16:40 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, nspluginwrapper.spec: install
nspluginwrapper symlink
2006-11-11 15:21 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: headers cleanup
2006-11-11 15:18 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-viewer.c: use XtResizeWidget() to resize the plugin
window
2006-11-11 09:46 Gwenole Beauchesne <gb.public@free.fr>
* src/npw-rpc.h, src/npw-viewer.c, src/npw-wrapper.c: Implement
NPN_PostURL() and NPN_PostURLNotify()
2006-11-08 08:11 Gwenole Beauchesne <gb.public@free.fr>
* Makefile, configure, nspluginwrapper.spec: handle bi-arch builds
(original patch by Darryl L. Miles)
2006-11-08 06:38 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: don't override compile flags, the default
should be good enough and
distribution-specific packages are expected to be better
2006-11-08 06:37 Gwenole Beauchesne <gb.public@free.fr>
* configure: there is no C++ in nspluginwrapper
2006-10-27 04:36 Gwenole Beauchesne <gb.public@free.fr>
* Makefile: fix make uninstall target (reported by stranche)
2006-09-25 22:42 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: use plain make command not the %make macro
(Thibaut Cousin)
2006-09-24 16:11 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, nspluginwrapper.spec, src/npw-viewer.c: fix acrobat reader
7 plugin
2006-09-24 16:07 Gwenole Beauchesne <gb.public@free.fr>
* nspluginwrapper.spec: add specfile %changelog missed in initial
tarball
2006-09-24 16:06 Gwenole Beauchesne <gb.public@free.fr>
* NEWS, nspluginwrapper.spec, src/debug.c, src/npw-viewer.c,
src/npw-wrapper.c, src/rpc.c, src/rpc.h: use a bidirectional
communication channel
2006-09-24 15:49 Gwenole Beauchesne <gb.public@free.fr>
* gwenole, gwenole/projects, gwenole/projects/nspluginwrapper,
gwenole/projects/nspluginwrapper/branches,
gwenole/projects/nspluginwrapper/tags, ., COPYING, Makefile,
NEWS, README, TODO, configure, npapi, npapi/jni.h,
npapi/jni_md.h, npapi/jri.h, npapi/jri_md.h, npapi/jritypes.h,
npapi/npapi.h, npapi/npruntime.h, npapi/nptypes.h,
npapi/npupp.h, npapi/nspr, npapi/nspr/obsolete,
npapi/nspr/obsolete/protypes.h, npapi/nspr/prcpucfg.h,
npapi/nspr/prtypes.h, nspluginwrapper.spec, src, src/debug.c,
src/debug.h, src/npw-config.c, src/npw-rpc.c, src/npw-rpc.h,
src/npw-viewer.c, src/npw-viewer.sh, src/npw-wrapper.c,
src/rpc.c, src/rpc.h, src/sysdeps.h, src/utils.c, src/utils.h,
tests, tests/test-plugins.html, utils, utils/getdeps.sh,
utils/mkruntime.sh, utils/npw-shadow.c, utils/repackage.sh,
utils/xtrace.c: initial import

322
Makefile Normal file
View File

@ -0,0 +1,322 @@
#!/bin/sh
#
# nspluginwrapper Makefile (C) 2005-2006 Gwenole Beauchesne
#
-include config.mak
CFLAGS += -Wall
ifeq ($(SRC_PATH),)
SRC_PATH = .
endif
PACKAGE = nspluginwrapper
ifeq ($(VERSION),)
VERSION := $(shell sed < $(SRC_PATH)/$(PACKAGE).spec -n '/^\%define version[ ]*/s///p')
endif
ifeq ($(RELEASE),)
RELEASE := $(shell sed < $(SRC_PATH)/$(PACKAGE).spec -n '/^\%define release[ ]*/s///p')
endif
ifeq ($(SVNDATE),)
SVNDATE := $(shell sed < $(SRC_PATH)/$(PACKAGE).spec -n '/^\%define svndate[ ]*/s///p')
endif
ifeq ($(SVNDATE),)
SVNDATE := $(shell date '+%Y%m%d')
endif
ifeq ($(SNAPSHOT),)
SNAPSHOT := $(shell echo "$(RELEASE)" | grep "^0")
ifeq ($(SNAPSHOT),$(RELEASE))
SNAPSHOT := 1
endif
endif
ifeq ($(SNAPSHOT),1)
VERSION_SUFFIX = -$(SVNDATE)
endif
ifneq ($(DONT_STRIP), yes)
STRIP_OPT = -s
endif
ifneq (,$(findstring $(OS),linux))
libdl_LDFLAGS = -ldl
endif
X_CFLAGS = -I$(x11prefix)/include
X_LDFLAGS = -L$(x11prefix)/$(lib64) -lX11 -lXt
ifeq ($(OS),netbsd)
X_LDFLAGS += -Wl,--rpath,$(x11prefix)/$(lib64)
endif
ARCH_32 = $(ARCH)
ifeq ($(biarch), yes)
ARCH_32 = $(TARGET_ARCH)
LSB_LIBS = $(LSB_OBJ_DIR)/libc.so $(LSB_OBJ_DIR)/libgcc_s_32.so
LSB_LIBS += $(LSB_CORE_STUBS:%=$(LSB_OBJ_DIR)/%.so)
LSB_LIBS += $(LSB_CORE_STATIC_STUBS:%=$(LSB_OBJ_DIR)/%.a)
LSB_LIBS += $(LSB_DESKTOP_STUBS:%=$(LSB_OBJ_DIR)/%.so)
endif
LSB_TOP_DIR = $(SRC_PATH)/lsb-build
LSB_INC_DIR = $(LSB_TOP_DIR)/headers
LSB_SRC_DIR = $(LSB_TOP_DIR)/stub_libs
LSB_OBJ_DIR = lsb-build-$(ARCH_32)
LSB_CORE_STUBS = $(shell cat $(LSB_SRC_DIR)/core_filelist)
LSB_CORE_STATIC_STUBS = $(shell cat $(LSB_SRC_DIR)/core_static_filelist)
LSB_DESKTOP_STUBS = $(shell cat $(LSB_SRC_DIR)/desktop_filelist)
ifeq (i386,$(TARGET_ARCH))
TARGET_ELF_ARCH = elf32-i386
endif
ifeq (ppc,$(TARGET_ARCH))
TARGET_ELF_ARCH = elf32-powerpc
endif
MOZILLA_CFLAGS = -I$(SRC_PATH)/npapi -I$(SRC_PATH)/npapi/nspr
npwrapper_LIBRARY = npwrapper.so
npwrapper_RAWSRCS = npw-wrapper.c npw-rpc.c rpc.c debug.c utils.c npruntime.c
npwrapper_SOURCES = $(npwrapper_RAWSRCS:%.c=$(SRC_PATH)/src/%.c)
npwrapper_OBJECTS = $(npwrapper_RAWSRCS:%.c=npwrapper-%.os)
npwrapper_CFLAGS = $(CFLAGS) $(X_CFLAGS) $(MOZILLA_CFLAGS) $(GLIB_CFLAGS)
npwrapper_LDFLAGS = $(X_LDFLAGS) -lpthread
npwrapper_LDFLAGS += $(GLIB_LDFLAGS)
npviewer_PROGRAM = npviewer.bin
npviewer_RAWSRCS = npw-viewer.c npw-rpc.c rpc.c debug.c utils.c npruntime.c
npviewer_SOURCES = $(npviewer_RAWSRCS:%.c=$(SRC_PATH)/src/%.c)
npviewer_OBJECTS = $(npviewer_RAWSRCS:%.c=npviewer-%.o)
ifeq ($(biarch),yes)
npviewer_CFLAGS = $(CFLAGS_32)
npviewer_CFLAGS += -I$(LSB_INC_DIR)
npviewer_CFLAGS += -I$(LSB_INC_DIR)/glib-2.0
npviewer_CFLAGS += -I$(LSB_INC_DIR)/gtk-2.0
npviewer_LDFLAGS = $(LDFLAGS_32) -L$(LSB_OBJ_DIR)
npviewer_LDFLAGS += -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -ldl -lglib-2.0 -lX11 -lXt
else
npviewer_CFLAGS += $(GTK_CFLAGS)
npviewer_LDFLAGS = $(GTK_LDFLAGS) $(X_LDFLAGS)
endif
npviewer_CFLAGS += $(MOZILLA_CFLAGS)
npviewer_LDFLAGS += $(libdl_LDFLAGS) -lpthread
ifeq ($(TARGET_ARCH),i386)
npviewer_MAPFILE = $(SRC_PATH)/src/npw-viewer.map
endif
ifneq ($(npviewer_MAPFILE),)
npviewer_LDFLAGS += -Wl,--export-dynamic
npviewer_LDFLAGS += -Wl,--version-script,$(npviewer_MAPFILE)
endif
ifeq ($(OS):$(TARGET_ARCH),linux:i386)
npviewer_SOURCES += $(SRC_PATH)/src/cxxabi-compat.cpp
npviewer_OBJECTS += npviewer-cxxabi-compat.o
npviewer_LDFLAGS += -lsupc++
endif
libxpcom_LIBRARY = libxpcom.so
libxpcom_RAWSRCS = libxpcom.c debug.c
libxpcom_SOURCES = $(libxpcom_RAWSRCS:%.c=$(SRC_PATH)/src/%.c)
libxpcom_OBJECTS = $(libxpcom_RAWSRCS:%.c=libxpcom-%.o)
libxpcom_CFLAGS = -fPIC
npconfig_PROGRAM = npconfig
npconfig_RAWSRCS = npw-config.c
npconfig_SOURCES = $(npconfig_RAWSRCS:%.c=$(SRC_PATH)/src/%.c)
npconfig_OBJECTS = $(npconfig_RAWSRCS:%.c=npconfig-%.o)
npconfig_LDFLAGS = $(libdl_LDFLAGS)
ifeq ($(OS),netbsd)
# We will try to dlopen() the native plugin library. If that lib is
# linked against libpthread, then so must our program too.
# XXX use the ELF decoder for native plugins too?
npconfig_LDFLAGS += -lpthread
endif
nploader_PROGRAM = npviewer
nploader_RAWSRCS = npw-viewer.sh
nploader_SOURCES = $(nploader_RAWSRCS:%.sh=$(SRC_PATH)/src/%.sh)
CPPFLAGS = -I. -I$(SRC_PATH)
TARGETS = $(npconfig_PROGRAM)
TARGETS += $(nploader_PROGRAM)
TARGETS += $(npwrapper_LIBRARY)
ifeq ($(build_viewer),yes)
TARGETS += $(npviewer_PROGRAM)
TARGETS += $(libxpcom_LIBRARY)
endif
archivedir = files/
SRCARCHIVE = $(PACKAGE)-$(VERSION)$(VERSION_SUFFIX).tar
FILES = configure Makefile nspluginwrapper.spec
FILES += README NEWS TODO COPYING ChangeLog
FILES += $(wildcard utils/*.sh)
FILES += $(wildcard utils/*.c)
FILES += $(wildcard src/*.c)
FILES += $(wildcard src/*.cpp)
FILES += $(wildcard src/*.h)
FILES += $(wildcard src/*.sh)
FILES += $(wildcard src/*.map)
FILES += $(wildcard tests/*.html)
FILES += $(wildcard npapi/*.h npapi/nspr/*.h npapi/nspr/obsolete/*.h)
FILES += $(LSB_TOP_DIR)/headers/core_filelist
FILES += $(addprefix $(LSB_TOP_DIR)/headers/,$(shell cat $(LSB_TOP_DIR)/headers/core_filelist))
FILES += $(LSB_TOP_DIR)/headers/desktop_filelist
FILES += $(addprefix $(LSB_TOP_DIR)/headers/,$(shell cat $(LSB_TOP_DIR)/headers/desktop_filelist))
FILES += $(LSB_SRC_DIR)/LibNameMap.txt
FILES += $(LSB_SRC_DIR)/core_filelist
FILES += $(LSB_SRC_DIR)/core_static_filelist
FILES += $(LSB_SRC_DIR)/desktop_filelist
FILES += $(patsubst %,$(LSB_SRC_DIR)/%.c,$(LSB_CORE_STUBS))
FILES += $(patsubst %,$(LSB_SRC_DIR)/%.Version,$(LSB_CORE_STUBS))
FILES += $(patsubst %,$(LSB_SRC_DIR)/%.c,$(LSB_CORE_STATIC_STUBS))
FILES += $(patsubst %,$(LSB_SRC_DIR)/%.c,$(LSB_DESKTOP_STUBS))
FILES += $(patsubst %,$(LSB_SRC_DIR)/%.Version,$(LSB_DESKTOP_STUBS))
all: $(TARGETS)
clean:
rm -f $(TARGETS) *.o *.os
rm -rf $(LSB_OBJ_DIR)
distclean: clean
rm -f config-host.* config.*
uninstall: uninstall.wrapper uninstall.viewer uninstall.libxpcom uninstall.loader uninstall.config uninstall.mkruntime uninstall.dirs
uninstall.dirs:
rmdir $(DESTDIR)$(pkglibdir)/noarch
rmdir $(DESTDIR)$(pkglibdir)/$(ARCH)/$(OS)
rmdir $(DESTDIR)$(pkglibdir)/$(ARCH)
ifneq ($(ARCH),$(ARCH_32))
rmdir $(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)
rmdir $(DESTDIR)$(pkglibdir)/$(ARCH_32)
endif
uninstall.wrapper:
rm -f $(DESTDIR)$(pkglibdir)/$(ARCH)/$(OS)/$(npwrapper_LIBRARY)
uninstall.viewer:
rm -f $(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)/$(npviewer_PROGRAM)
rm -f $(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)/$(npviewer_PROGRAM:%.bin=%)
uninstall.libxpcom:
rm -f $(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)/$(libxpcom_LIBRARY)
uninstall.loader:
rm -f $(DESTDIR)$(pkglibdir)/noarch/$(nploader_PROGRAM)
uninstall.config:
rm -f $(DESTDIR)$(bindir)/nspluginwrapper
rm -f $(DESTDIR)$(pkglibdir)/$(ARCH)/$(OS)/$(npconfig_PROGRAM)
uninstall.mkruntime:
rm -f $(DESTDIR)$(pkglibdir)/noarch/mkruntime
install: install.dirs install.wrapper install.viewer install.libxpcom install.loader install.config install.mkruntime
install.dirs:
mkdir -p $(DESTDIR)$(pkglibdir)/noarch
mkdir -p $(DESTDIR)$(pkglibdir)/$(ARCH)
mkdir -p $(DESTDIR)$(pkglibdir)/$(ARCH)/$(OS)
ifneq ($(ARCH),$(ARCH_32))
mkdir -p $(DESTDIR)$(pkglibdir)/$(ARCH_32)
mkdir -p $(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)
endif
install.wrapper: $(npwrapper_LIBRARY)
install -m 755 $(STRIP_OPT) $(npwrapper_LIBRARY) $(DESTDIR)$(pkglibdir)/$(ARCH)/$(OS)/$(npwrapper_LIBRARY)
ifeq ($(build_viewer),yes)
install.viewer: install.viewer.bin install.viewer.glue
install.libxpcom: do.install.libxpcom
else
install.viewer:
install.libxpcom:
endif
install.viewer.bin: $(npviewer_PROGRAM)
install -m 755 $(STRIP_OPT) $(npviewer_PROGRAM) $(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)/$(npviewer_PROGRAM)
install.viewer.glue::
p=$(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)/$(npviewer_PROGRAM:%.bin=%); \
echo "#!/bin/sh" > $$p; \
echo "TARGET_OS=$(TARGET_OS)" >> $$p; \
echo "TARGET_ARCH=$(TARGET_ARCH)" >> $$p; \
echo ". $(pkglibdir)/noarch/$(nploader_PROGRAM)" >> $$p; \
chmod 755 $$p
do.install.libxpcom: $(libxpcom_LIBRARY)
install -m 755 $(STRIP_OPT) $(libxpcom_LIBRARY) $(DESTDIR)$(pkglibdir)/$(ARCH_32)/$(TARGET_OS)/$(libxpcom_LIBRARY)
install.config: $(npconfig_PROGRAM)
install -m 755 $(STRIP_OPT) $(npconfig_PROGRAM) $(DESTDIR)$(pkglibdir)/$(ARCH)/$(OS)/$(npconfig_PROGRAM)
mkdir -p $(DESTDIR)$(bindir)
ln -s $(pkglibdir)/$(ARCH)/$(OS)/$(npconfig_PROGRAM) $(DESTDIR)$(bindir)/nspluginwrapper
install.loader: $(nploader_PROGRAM)
install -m 755 $(nploader_PROGRAM) $(DESTDIR)$(pkglibdir)/noarch/$(nploader_PROGRAM)
install.mkruntime: $(SRC_PATH)/utils/mkruntime.sh
install -m 755 $< $(DESTDIR)$(pkglibdir)/noarch/mkruntime
$(archivedir)::
[ -d $(archivedir) ] || mkdir $(archivedir) > /dev/null 2>&1
tarball:
$(MAKE) -C $(SRC_PATH) do_tarball
do_tarball: $(archivedir) $(archivedir)$(SRCARCHIVE).bz2
$(archivedir)$(SRCARCHIVE): $(archivedir) $(FILES)
BUILDDIR=`mktemp -d /tmp/buildXXXXXXXX` ; \
mkdir -p $$BUILDDIR/$(PACKAGE)-$(VERSION) ; \
(cd $(SRC_PATH) && tar c $(FILES)) | tar x -C $$BUILDDIR/$(PACKAGE)-$(VERSION) ; \
[ "$(SNAPSHOT)" = "1" ] && svndate_def="%" || svndate_def="#" ; \
sed -e "s/^[%#]define svndate.*/$${svndate_def}define svndate $(SVNDATE)/" \
< $(SRC_PATH)/nspluginwrapper.spec \
> $$BUILDDIR/$(PACKAGE)-$(VERSION)/nspluginwrapper.spec ; \
(cd $$BUILDDIR && tar cvf $(SRCARCHIVE) $(PACKAGE)-$(VERSION)) ; \
mv -f $$BUILDDIR/$(SRCARCHIVE) $(archivedir) ; \
rm -rf $$BUILDDIR
$(archivedir)$(SRCARCHIVE).bz2: $(archivedir)$(SRCARCHIVE)
bzip2 -9vf $(archivedir)$(SRCARCHIVE)
localrpm: $(archivedir)$(SRCARCHIVE).bz2
rpm -ta $<
changelog: ../common/authors.xml
svn_prefix=`svn info .|sed -n '/^URL *: .*\/svn\/\(.*\)$$/s//\1\//p'`; \
svn2cl --strip-prefix=$$svn_prefix --authors=../common/authors.xml || :
svn commit -m "Generated by svn2cl." ChangeLog
$(npwrapper_LIBRARY): $(npwrapper_OBJECTS)
$(CC) -o $@ -shared $(npwrapper_OBJECTS) $(npwrapper_LDFLAGS)
npwrapper-%.os: $(SRC_PATH)/src/%.c
$(CC) -o $@ -c $< -fPIC $(CPPFLAGS) $(npwrapper_CFLAGS) -DBUILD_WRAPPER
$(npviewer_PROGRAM): $(npviewer_OBJECTS) $(npviewer_MAPFILE) $(LSB_OBJ_DIR) $(LSB_LIBS)
$(CC) $(LDFLAGS_32) -o $@ $(npviewer_OBJECTS) $(npviewer_LDFLAGS)
npviewer-%.o: $(SRC_PATH)/src/%.c
$(CC) $(CFLAGS_32) -o $@ -c $< $(CPPFLAGS) $(npviewer_CFLAGS) -DBUILD_VIEWER
npviewer-%.o: $(SRC_PATH)/src/%.cpp
$(CXX) $(CFLAGS_32) -o $@ -c $< $(CPPFLAGS) $(npviewer_CFLAGS) -DBUILD_VIEWER
$(libxpcom_LIBRARY): $(libxpcom_OBJECTS) $(LSB_OBJ_DIR) $(LSB_LIBS)
$(CC) $(LDFLAGS_32) -shared -o $@ $(libxpcom_OBJECTS) $(libxpcom_LDFLAGS) -Wl,--soname,libxpcom.so
libxpcom-%.o: $(SRC_PATH)/src/%.c
$(CC) $(CFLAGS_32) -o $@ -c $< $(CPPFLAGS) $(libxpcom_CFLAGS) -DBUILD_XPCOM
$(npconfig_PROGRAM): $(npconfig_OBJECTS)
$(CC) -o $@ $(npconfig_OBJECTS) $(npconfig_LDFLAGS)
npconfig-%.o: $(SRC_PATH)/src/%.c
$(CC) -o $@ -c $< $(CPPFLAGS) $(CFLAGS)
$(nploader_PROGRAM): $(nploader_SOURCES)
sed -e "s|%NPW_LIBDIR%|$(pkglibdir)|" $< > $@
chmod 755 $@
$(LSB_OBJ_DIR)::
@[ -d $(LSB_OBJ_DIR) ] || mkdir $(LSB_OBJ_DIR) > /dev/null 2>&1
$(LSB_OBJ_DIR)/%.o: $(LSB_SRC_DIR)/%.c
$(CC) $(CFLAGS_32) -nostdinc -fno-builtin -I. -I$(LSB_INC_DIR) -c $< -o $@
$(LSB_OBJ_DIR)/%.a: $(LSB_OBJ_DIR)/%.o
$(AR) rc $@ $<
$(LSB_OBJ_DIR)/libc.so: $(LSB_OBJ_DIR)/libc_main.so $(LSB_OBJ_DIR)/libc_nonshared.a
@echo "OUTPUT_FORMAT($(TARGET_ELF_ARCH))" > $@
@echo "GROUP ( $(LSB_OBJ_DIR)/libc_main.so $(LSB_OBJ_DIR)/libc_nonshared.a )" >> $@
$(LSB_OBJ_DIR)/libgcc_s_32.so: $(LSB_OBJ_DIR)/libgcc_s.so
ln -s libgcc_s.so $@
$(LSB_OBJ_DIR)/%.so: $(LSB_OBJ_DIR)/%.o
$(CC) $(LDFLAGS_32) -nostdlib -shared $< -o $@ \
-Wl,--version-script,$(patsubst $(LSB_OBJ_DIR)/%.o,$(LSB_SRC_DIR)/%.Version,$<) \
-Wl,-soname,`grep "$(patsubst $(LSB_OBJ_DIR)/%.o,%,$<) " $(LSB_SRC_DIR)/LibNameMap.txt | cut -f2 -d' '`

38
NEWS Normal file
View File

@ -0,0 +1,38 @@
nspluginwrapper NEWS -- history of user-visible changes. 2006-12-26
Copyright (C) 2006 Gwenole Beauchesne
Version 0.9.91.1 (BETA) - 26.Dec.2006
* Fix NPRuntime bridge (VLC plugin)
* Fix Mozilla plugins dir creation on NetBSD and FreeBSD hosts
* Fix potential buffer overflow in RPC marshalers
* Handle empty args for plugin creation (flasharcade.com)
Version 0.9.91 (BETA) - 22.Dec.2006
* Add scripting support through the NPRuntime API
* Add XEMBED support for e.g. MPlayer plug-in
* Add support for NetBSD, FreeBSD and non-x86 Linux platforms
* Fix focus problems
* Fix some rare hangs
* Create Mozilla plugins dir if it does not exist yet
Version 0.9.90.4 (BETA) - 18.Nov.2006
* Robustify error condition (Darryl L. Miles)
* Reduce plugin load times
* Fix post data to a URL
* Add printing support
* Add Konqueror browser support
Version 0.9.90.3 (BETA) - 19.Sep.2006
* Fix acrobat reader 7 plugin
Version 0.9.90.2 (BETA) - 15.Sep.2006
* Use a bidirectional communication channel rather than two channels +
a "delayed" execution engine
Version 0.9.90.1 (BETA) - 05.Jun.2006
* Handle SuSE Linux Mozilla paths
* Don't use QEMU on IA-64 platforms
* Portability fixes to non-Linux platforms
Version 0.9.90 (BETA) - 25.Oct.2005
* First public beta that has decent Flash Player support

99
README Normal file
View File

@ -0,0 +1,99 @@
nspluginwrapper
A cross-platform NPAPI plugin viewer
Copyright (C) 2005-2006 Gwenole Beauchesne
License
-------
nspluginwrapper is available under the terms of the GNU General Public License.
See the file "COPYING" that is included in the distribution for details.
Overview
--------
nspluginwrapper consists in a proxy plugin and a viewer for NPAPI
compatible plugins. It makes it possible to use 32-bit x86 plugins
like Adobe Flash Player on other platforms like Linux/x86_64, *BSD and
even Linux/ppc.
Quick build notes
-----------------
To simplify the build of the 32-bit viewer, a minimal subset of LSB
Desktop 3.1 is included in this distribution. Hence, you only have
to proceed as follows:
$ ./configure
$ make
# make install
Or, if you prefer from a source package:
$ rpm --rebuild nspluginwrapper.src.rpm
Requirements and Installation
-----------------------------
A Mozilla based browser built with GTK 2 support is currently required
for proper operation. An alternative is Konqueror but it does not yet
support the npruntime scripting API.
On package installation, 32-bit plugins are automatically recognized
provided they are available in the /usr/lib/mozilla/plugins directory.
You can manually install/remove/update plugins with "nspluginwrapper".
usage: nspluginwrapper [flags] [command [plugin(s)]]
-h --help print this message
-a --auto set automatic mode for plugins discovery
-l --list list plugins currently installed
-u --update update plugin(s) currently installed
-i --install [FILE(S)] install plugin(s)
-r --remove [FILE(S)] remove plugin(s)
[plugin(s)] are full paths to actual plugin binaries (e.g. nppdf.so
for Acrobat Reader, libflashplayer.so for Flash).
Compatibility List
------------------
Please bear in mind this is *BETA* software.
The following plugins work reasonnably well:
- Acrobat Reader 5.0.9
- Acrobat Reader 7.0.1
- DejaVu Libre 3.5.14
- Flash Player 7.0
- Flash Player 9.0b2
- Linux J2K 0.0.2
- Mplayerplug-in 2.80
- Mplayerplug-in 3.25
- Real Player 8.0
- Real Player 10.0.5
- Tcl plugin 3.1
- Squeak VM plugin 3.7
Broken or partially working:
- Real Player 8.0
- Adobe SVG 3.01x88
History
-------
Please consult the file "NEWS" for the release history.
An auto-generated "ChangeLog" is also available in this distribution.
Author
------
Gwenole Beauchesne,
<gb.public@free.fr>

15
TODO Normal file
View File

@ -0,0 +1,15 @@
- Clean-ups
* Re-indent -gnu -br -brs
* Better split for RPC / NAPI level routines
* Empty communication stream on RPC error so that next request can work
- Write the testsuite
* RPC tests, basic types
* RPC tests, NPAPI types (including NPVariant)
* NPAPI plugins (compliance checks, error recovery, async requests)
- XPCOM support
* Parse XPT files?
* Mix native / marshaled components?
- Windows plugins support
* Import minimal GLib functions (hashes, etc.)
* Split toolkit specific code (npviewer-{x11,gtk,win}.c)
* Use winelib + override win32 socket to support AF_UNIX (Linux "native")

602
configure vendored Executable file
View File

@ -0,0 +1,602 @@
#!/bin/sh
#
# nspluginwrapper configure script (C) 2005-2006 Gwenole Beauchesne
# derived from qemu configure script, (C) 2003 Fabrice Bellard
#
PACKAGE=nspluginwrapper
# set temporary file name
if test ! -z "$TMPDIR" ; then
TMPDIR1="${TMPDIR}"
elif test ! -z "$TEMPDIR" ; then
TMPDIR1="${TEMPDIR}"
else
TMPDIR1="/tmp"
fi
TMPC="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.c"
TMPO="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.o"
TMPE="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}"
TMPS="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.S"
# default parameters
prefix="/usr"
lib32=""
lib64=""
biarch="guess"
build_viewer="guess"
cc="gcc -std=c99"
cxx="g++"
host_os=`uname -s | tr '[A-Z]' '[a-z]'`
host_cpu=`uname -m`
target_os="linux"
target_cpu="i386"
case "$host_cpu" in
i386|i486|i586|i686|i86pc|BePC)
host_cpu="i386"
;;
ia64)
host_cpu="ia64"
;;
"Power Macintosh"|ppc)
host_cpu="ppc"
;;
ppc64)
host_cpu="ppc64"
;;
sparc)
host_cpu="sparc"
;;
sparc64)
host_cpu="sparc64"
;;
x86_64|amd64)
host_cpu="x86_64"
;;
*)
host_cpu="unknown"
;;
esac
bigendian="no"
# find source path
# XXX: we assume an absolute path is given when launching configure,
# except in './configure' case.
source_path=${0%configure}
source_path=${source_path%/}
source_path_used="yes"
if test -z "$source_path" -o "$source_path" = "." ; then
source_path=`pwd`
source_path_used="no"
fi
for opt do
case "$opt" in
--prefix=*)
prefix=`echo $opt | cut -d '=' -f 2`
;;
--pkglibdir=*)
pkglibdir=`echo $opt | cut -d '=' -f 2`
;;
--target-os=*)
target_os=`echo $opt | cut -d '=' -f 2 | tr '[A-Z]' '[a-z]'`
;;
--target-cpu=*)
target_cpu=`echo $opt | cut -d '=' -f 2 | sed -e 's/^i.86$/i386/'`
;;
--with-biarch)
biarch="yes"
;;
--without-biarch)
biarch="no"
;;
--with-viewer)
build_viewer="yes"
;;
--without-viewer)
build_viewer="no"
;;
--with-lib32=*)
lib32=`echo $opt | cut -d '=' -f 2`
;;
--with-lib64=*)
lib64=`echo $opt | cut -d '=' -f 2`
;;
--with-cc=*)
cc=`echo $opt | cut -d '=' -f 2`
;;
--with-cxx=*)
cxx=`echo $opt | cut -d '=' -f 2`
;;
esac
done
# check for biarch build
if test "$biarch" = "guess"; then
case $host_cpu:$target_cpu in
x86_64:i386 | ppc64:ppc)
biarch="yes"
;;
*)
biarch="no"
;;
esac
fi
# check for viewer builds
if test "$build_viewer" = "guess"; then
build_viewer="no"
case $host_os in
linux)
if test "$host_cpu" = "$target_cpu" -o "$biarch" = "yes"; then
build_viewer="yes"
fi
;;
esac
fi
# check for libdir name
if test -z "$lib64"; then
case $host_os in
linux)
# test if the compiler is 64bit
echo 'int i;' > $TMPC
nspluginwrapper_64bit_output=no
if $cc -o $TMPO -c $TMPC; then
case `/usr/bin/file $TMPO` in
*"ELF 64"*)
nspluginwrapper_64bit_output=yes
;;
esac
fi
rm -f $TMPC $TMPO
;;
esac
case $host_cpu:$nspluginwrapper_64bit_output in
ppc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
lib64="lib64"
;;
*)
lib64="lib"
;;
esac
fi
if test -z "$lib32"; then
lib32="lib"
fi
# check for installation root
if test -z "$pkglibdir"; then
pkglibdir="$prefix/lib/$PACKAGE"
fi
# check for __attribute__((visibility())) support
cat > $TMPC << EOF
int foo __attribute__((visibility("hidden"))) = 1;
int bar __attribute__((visibility("protected"))) = 1;
EOF
has_visibility_attribute=no
if $cc -Werror -S $TMPC -o $TMPS >/dev/null 2>&1; then
if grep '\.hidden.*foo' $TMPS >/dev/null; then
if grep '\.protected.*bar' $TMPS >/dev/null; then
has_visibility_attribute=yes
fi
fi
fi
rm -f $TMPC $TMPS
# check for .init_array/.fini_array support
cat > $TMPC << EOF
static int x = -1;
int main(void) { return x; }
int foo(void) { x = 0; }
int (*fp)(void) __attribute__((section(".init_array"))) = foo;
EOF
has_initfini_array=no
if $cc -Werror $TMPC -o $TMPE >/dev/null 2>&1; then
if $TMPE; then
has_initfini_array=yes
fi
fi
rm -f $TMPC $TMPE
# check for compiler flag
check_cc_option() {
echo "int i;" > $TMPC
if $cc $* -c $TMPC -o $TMPO > /dev/null 2>&1; then
rm -f $TMPC $TMPO
return 0
fi
rm -f $TMPC
return 1
}
# check for CFLAGS
if test -z "$CFLAGS"; then
CFLAGS="-O2 -g"
if check_cc_option -mtune=generic $CFLAGS; then
CFLAGS="$CFLAGS -mtune=generic"
fi
fi
if test "$biarch" = "yes" -a -z "$CFLAGS_32"; then
CFLAGS_32="-m32 -O2 -g"
if check_cc_option -mtune=generic $CFLAGS_32; then
CFLAGS_32="$CFLAGS_32 -mtune=generic"
fi
fi
# check for pkg-config
pkgconfig=`which pkg-config`
if test -z "$pkgconfig"; then
echo "pkg-config not found"
exit 1
fi
# check for Glib 2.0 compile CFLAGS
if $pkgconfig --exists glib-2.0; then
GLIB_CFLAGS=`$pkgconfig --cflags glib-2.0`
GLIB_LDFLAGS=`$pkgconfig --libs glib-2.0`
else
echo "GLIB 2.0 environment not found"
exit 1
fi
cat > $TMPC << EOF
#include <glib.h>
int main(void) {
(void) g_main_pending();
return 0;
}
EOF
if ! $cc $CFLAGS $GLIB_CFLAGS $GLIB_LDFLAGS $TMPC -o $TMPE > /dev/null 2>&1; then
echo "GLIB 2.0 environment not usable"
rm -f $TMPC
exit 1
fi
rm -f $TMPC $TMPE
# check for GTK+ 2.0 compile CFLAGS
if $pkgconfig --exists gtk+-2.0; then
GTK_CFLAGS=`$pkgconfig --cflags gtk+-2.0`
GTK_LDFLAGS=`$pkgconfig --libs gtk+-2.0`
else
echo "GTK+ 2.0 environment not found"
exit 1
fi
cat > $TMPC << EOF
#include <gtk/gtk.h>
int main(void) {
gtk_main_quit();
return 0;
}
EOF
if ! $cc $CFLAGS $GTK_CFLAGS $GTK_LDFLAGS $TMPC -o $TMPE > /dev/null 2>&1; then
echo "GTK+ 2.0 environment not usable"
rm -f $TMPC
exit 1
fi
rm -f $TMPC $TMPE
# check for X11 base dir
x_base_dirs='
/usr
/usr/X11R6
/usr/local/X11R6'
for dir in $x_base_dirs; do
x_include_dir="$dir/include"
if test -f $x_include_dir/X11/Intrinsic.h; then
x_lib_dir="$dir/$lib64"
if test -f $x_lib_dir/libX11.so; then
x_base_dir=$dir
break
fi
fi
done
if test -z "$x_base_dir"; then
echo "X11 environment not found"
exit 1
fi
# big/little endian test
cat > $TMPC << EOF
#include <inttypes.h>
int main(int argc, char ** argv){
volatile uint32_t i=0x01234567;
return (*((uint8_t*)(&i))) == 0x67;
}
EOF
if $cc -o $TMPE $TMPC 2>/dev/null ; then
$TMPE && bigendian="yes"
else
echo "big/little test failed"
fi
rm -f $TMPO $TMPC $TMPE $TMPS
# floating point endian test
cat > $TMPC << EOF
/* This will not work unless sizeof(double) == 8. */
extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
/* This structure must have no internal padding. */
struct possibility {
char prefix[8];
double candidate;
char postfix[8];
};
#define C(cand) { "\nformat:", cand, ":tamrof\n" }
struct possibility table [] =
{
C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */
C( 3.53802595280598432000e+18), /* D__float - VAX */
C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */
C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */
C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
};
EOF
if $cc -o $TMPO -c $TMPC 2>/dev/null; then
od -c $TMPO |
sed 's/^[0-7]*[ ]*/ /
s/\*/./g
s/ \\n/*/g
s/ [0-9][0-9][0-9]/./g
s/ \\[^ ]/./g' |
tr -d '
' | tr -s '*' '
' | fold | sed '$a\
' > $TMPE
if grep 'format:.@IEEEF.:tamrof' $TMPE >/dev/null 2>&1; then
float_format='IEEE (big-endian)'
elif grep 'format:.I@@PFE.:tamrof' $TMPE >/dev/null 2>&1; then
float_format='IEEE (big-endian)'
elif grep 'format:.FEEEI@.:tamrof' $TMPE >/dev/null 2>&1; then
float_format='IEEE (little-endian)'
elif grep 'format:.EFP@@I.:tamrof' $TMPE >/dev/null 2>&1; then
float_format='IEEE (little-endian)'
elif grep 'format:.__floa.:tamrof' $TMPE >/dev/null 2>&1; then
float_format='VAX D-float'
elif grep 'format:..PDP-1.:tamrof' $TMPE >/dev/null 2>&1; then
float_format='PDP-10'
elif grep 'format:.BMHEXF.:tamrof' $TMPE >/dev/null 2>&1; then
float_format='IBM 370 hex'
else
echo "unknown floating point format"
exit 1
fi
fbigendian=
case $float_format in
'IEEE (big-endian)')
if test "$bigendian" = "no"; then
fbigendian=1
fi
;;
'IEEE (little-endian)')
if test "$bigendian" = "yes"; then
fbigendian=0
fi
;;
*)
echo "unsupported floating point format $float_format"
exit 1
;;
esac
else
echo "floating point endian test failed"
fi
rm -f $TMPO $TMPC $TMPE
# print configure help
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat << EOF
Usage: configure [options]
Options: [defaults in brackets after descriptions]
EOF
echo "Standard options:"
echo " --help print this message"
echo " --prefix=PREFIX install in PREFIX [$prefix]"
echo " --pkglibdir=ROOT install private files in ROOT [$pkglibdir]"
echo " --target-os=OS build plugin support for target OS [$target_os]"
echo " --target-cpu=CPU build plugin support for target CPU [$target_cpu]"
echo " --with-viewer build viewer [$build_viewer]"
echo ""
echo "Advanced options (experts only):"
echo " --source-path=PATH path of source code [$source_path]"
echo " --with-lib32=NAME use NAME as the 32-bit library dir name [$lib32]"
echo " --with-lib64=NAME use NAME as the 64-bit library dir name [$lib64]"
echo " --with-biarch build both 32-bit and 64-bit components at once"
echo " --with-cc=CC use C compiler CC [$cc]"
echo " --with-cxx=CXX use C++ compiler CXX [$cxx]"
echo ""
echo "NOTE: The object files are built at the place where configure is launched"
exit 1
fi
echo "Install prefix $prefix"
echo "nspluginwrapper root dir $pkglibdir"
echo "Bi-arch build $biarch"
echo "Build viewer $build_viewer"
echo "32-bit library dir name $lib32"
echo "64-bit library dir name $lib64"
echo "Source path $source_path"
echo "C compiler $cc"
echo "C++ compiler $cxx"
echo "host OS $host_os"
echo "host CPU $host_cpu"
echo "host big endian $bigendian"
echo "target OS $target_os"
echo "target CPU $target_cpu"
config_mak="config-host.mak"
echo "# Automatically generated by configure - do not modify" > $config_mak
config_h="config-host.h"
echo "/* Automatically generated by configure - do not modify */" > $config_h
echo "CC=$cc" >> $config_mak
echo "CXX=$cxx" >> $config_mak
echo "CFLAGS=$CFLAGS" >> $config_mak
echo "GLIB_CFLAGS=$GLIB_CFLAGS" >> $config_mak
echo "GLIB_LDFLAGS=$GLIB_LDFLAGS" >> $config_mak
echo "GTK_CFLAGS=$GTK_CFLAGS" >> $config_mak
echo "GTK_LDFLAGS=$GTK_LDFLAGS" >> $config_mak
if test "$biarch" = "yes"; then
echo "LDFLAGS_32=-m32" >> $config_mak
echo "CFLAGS_32=$CFLAGS_32" >> $config_mak
else
echo 'CFLAGS_32=$(CFLAGS)' >> $config_mak
fi
if test "$host_os" = "linux"; then
echo "OS=linux" >> $config_mak
echo "#define HOST_LINUX 1" >> $config_h
echo "#define HOST_OS \"linux\"" >> $config_h
elif test "$host_os" = "freebsd"; then
echo "OS=freebsd" >> $config_mak
echo "#define HOST_FREEBSD 1" >> $config_h
echo "#define HOST_OS \"freebsd\"" >> $config_h
elif test "$host_os" = "netbsd"; then
echo "OS=netbsd" >> $config_mak
echo "#define HOST_NETBSD 1" >> $config_h
echo "#define HOST_OS \"netbsd\"" >> $config_h
else
echo "Unsupported OS"
exit 1
fi
if test "$host_cpu" = "i386" ; then
echo "ARCH=i386" >> $config_mak
echo "#define HOST_I386 1" >> $config_h
echo "#define HOST_ARCH \"i386\"" >> $config_h
elif test "$host_cpu" = "x86_64" ; then
echo "ARCH=x86_64" >> $config_mak
echo "#define HOST_X86_64 1" >> $config_h
echo "#define HOST_ARCH \"x86_64\"" >> $config_h
elif test "$host_cpu" = "ppc" ; then
echo "ARCH=ppc" >> $config_mak
echo "#define HOST_PPC 1" >> $config_h
echo "#define HOST_ARCH \"ppc\"" >> $config_h
elif test "$host_cpu" = "ppc64" ; then
echo "ARCH=ppc64" >> $config_mak
echo "#define HOST_PPC64 1" >> $config_h
echo "#define HOST_ARCH \"ppc64\"" >> $config_h
elif test "$host_cpu" = "sparc" ; then
echo "ARCH=sparc" >> $config_mak
echo "#define HOST_SPARC 1" >> $config_h
echo "#define HOST_ARCH \"sparc\"" >> $config_h
elif test "$host_cpu" = "sparc64" ; then
echo "ARCH=sparc64" >> $config_mak
echo "#define HOST_SPARC64 1" >> $config_h
echo "#define HOST_ARCH \"sparc64\"" >> $config_h
elif test "$host_cpu" = "ia64" ; then
echo "ARCH=ia64" >> $config_mak
echo "#define HOST_IA64 1" >> $config_h
echo "#define HOST_ARCH \"ia64\"" >> $config_h
else
echo "Unsupported CPU"
exit 1
fi
if test "$bigendian" = "yes" ; then
echo "WORDS_BIGENDIAN=yes" >> $config_mak
echo "#define WORDS_BIGENDIAN 1" >> $config_h
fi
if test -n "$fbigendian" ; then
echo "#define FLOAT_WORDS_BIGENDIAN $fbigendian" >> $config_h
fi
echo "SRC_PATH=$source_path" >> $config_mak
echo "build_viewer=$build_viewer" >> $config_mak
echo "biarch=$biarch" >> $config_mak
echo "lib32=$lib32" >> $config_mak
echo "lib64=$lib64" >> $config_mak
echo "prefix=$prefix" >> $config_mak
echo "bindir=$prefix/bin" >> $config_mak
libdir="$prefix/$lib64"
echo "libdir=$libdir" >> $config_mak
echo "#define LIB \"$lib64\"" >> $config_h
echo "#define LIBDIR \"$libdir\"" >> $config_h
echo "x11prefix=$x_base_dir" >> $config_mak
VERSION=`sed < $source_path/$PACKAGE.spec -n '/^\%define version[ ]*/s///p'`
RELEASE=`sed < $source_path/$PACKAGE.spec -n '/^\%define release[ ]*/s///p'`
SVNDATE=`sed < $source_path/$PACKAGE.spec -n '/^\%define svndate[ ]*/s///p'`
if test -z "$SVNDATE"; then
SVNDATE=`date '+%Y%m%d'`
fi
SNAPSHOT=0
if echo "$RELEASE" | grep -q ^0; then
SNAPSHOT=1
fi
echo "VERSION=$VERSION" >> $config_mak
echo "SVNDATE=$SVNDATE" >> $config_mak
echo "SNAPSHOT=$SNAPSHOT" >> $config_mak
echo "#define NPW_SNAPSHOT $SNAPSHOT" >> $config_h
if test "$SNAPSHOT" = "1"; then
echo "#define NPW_VERSION \"$VERSION-Pre ($SVNDATE)\"" >> $config_h
else
echo "#define NPW_VERSION \"$VERSION\"" >> $config_h
fi
echo "pkglibdir=$pkglibdir" >> $config_mak
echo "#define NPW_LIBDIR \"$pkglibdir\"" >> $config_h
if test "$has_visibility_attribute" = "yes"; then
echo "#define attribute_hidden __attribute__((visibility(\"hidden\")))" >> $config_h
echo "#define attribute_protected __attribute__((visibility(\"protected\")))" >> $config_h
else
echo "#define attribute_hidden" >> $config_h
echo "#define attribute_protected" >> $config_h
fi
if test "$has_initfini_array" = "yes"; then
echo "#define HAVE_INITFINI_ARRAY 1" >> $config_h
else
echo "#undef HAVE_INITFINI_ARRAY" >> $config_h
fi
config_mak="config.mak"
echo "# Automatically generated by configure - do not modify" > $config_mak
echo "include config-host.mak" >> $config_mak
config_h="config.h"
echo "/* Automatically generated by configure - do not modify */" > $config_h
echo "#include \"config-host.h\"" >> $config_h
if test "$target_os" = "linux"; then
echo "TARGET_OS=linux" >> $config_mak
echo "#define TARGET_OS \"linux\"" >> $config_h
echo "#define TARGET_LINUX 1" >> $config_h
elif test "$target_os" = "solaris"; then
echo "TARGET_OS=solaris" >> $config_mak
echo "#define TARGET_OS \"solaris\"" >> $config_h
echo "#define TARGET_SOLARIS 1" >> $config_h
else
echo "Unsupported target OS"
exit 1
fi
if test "$target_cpu" = "i386" ; then
echo "TARGET_ARCH=i386" >> $config_mak
echo "#define TARGET_ARCH \"i386\"" >> $config_h
echo "#define TARGET_I386 1" >> $config_h
elif test "$target_cpu" = "ppc" ; then
echo "TARGET_ARCH=ppc" >> $config_mak
echo "#define TARGET_ARCH \"ppc\"" >> $config_h
echo "#define TARGET_PPC 1" >> $config_h
else
echo "Unsupported target CPU"
exit 1
fi
# build tree in object directory if source path is different from current one
if test "$source_path_used" = "yes" ; then
case $source_path in
..*)
sp1=..
;;
esac
ln -sf $source_path/Makefile Makefile
fi

View File

@ -0,0 +1,39 @@
#ifndef _ATK_1_0_ATK_ATK_ENUM_TYPES_H_
#define _ATK_1_0_ATK_ATK_ENUM_TYPES_H_
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ATK_TYPE_HYPERLINK_STATE_FLAGS \
(atk_hyperlink_state_flags_get_type())
#define ATK_TYPE_COORD_TYPE (atk_coord_type_get_type())
#define ATK_TYPE_KEY_EVENT_TYPE (atk_key_event_type_get_type())
#define ATK_TYPE_LAYER (atk_layer_get_type())
#define ATK_TYPE_RELATION_TYPE (atk_relation_type_get_type())
#define ATK_TYPE_ROLE (atk_role_get_type())
#define ATK_TYPE_STATE_TYPE (atk_state_type_get_type())
#define ATK_TYPE_TEXT_ATTRIBUTE (atk_text_attribute_get_type())
#define ATK_TYPE_TEXT_BOUNDARY (atk_text_boundary_get_type())
#define ATK_TYPE_TEXT_CLIP_TYPE (atk_text_clip_type_get_type())
extern GType atk_state_type_get_type(void);
extern GType atk_role_get_type(void);
extern GType atk_text_boundary_get_type(void);
extern GType atk_relation_type_get_type(void);
extern GType atk_layer_get_type(void);
extern GType atk_hyperlink_state_flags_get_type(void);
extern GType atk_text_clip_type_get_type(void);
extern GType atk_key_event_type_get_type(void);
extern GType atk_coord_type_get_type(void);
extern GType atk_text_attribute_get_type(void);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,16 @@
dlfcn.h
errno.h
fcntl.h
limits.h
stddef.h
stdio.h
stdlib.h
string.h
sys/resource.h
sys/select.h
sys/time.h
sys/types.h
sys/wait.h
time.h
unistd.h
wctype.h

View File

@ -0,0 +1,24 @@
fontconfig/fontconfig.h
fontconfig/fcfreetype.h
fontconfig/fcprivate.h
glib-2.0/glib.h
glib-2.0/glib/gprintf.h
glib-2.0/glib/gstdio.h
glib-2.0/glib-object.h
glib-2.0/gobject/gvaluecollector.h
glib-2.0/gmodule.h
atk-1.0/atk/atk.h
atk-1.0/atk/atk-enum-types.h
pango-1.0/pango/pango.h
pango-1.0/pango/pango-utils.h
pango-1.0/pango/pangoxft.h
pango-1.0/pango/pangoft2.h
pango-1.0/pango/pangofc-decoder.h
pango-1.0/pango/pangofc-fontmap.h
gtk-2.0/gdk-pixbuf/gdk-pixbuf.h
gtk-2.0/gdk-pixbuf/gdk-pixdata.h
gtk-2.0/gdk-pixbuf-xlib/gdk-pixbuf-xlib.h
gtk-2.0/gdk/gdk.h
gtk-2.0/gdk/gdkkeysyms.h
gtk-2.0/gdk/gdkx.h
gtk-2.0/gtk/gtk.h

33
lsb-build/headers/dlfcn.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef _DLFCN_H_
#define _DLFCN_H_
#ifdef __cplusplus
extern "C" {
#endif
#define RTLD_NEXT ((void *) -1l)
#define RTLD_LOCAL 0
#define RTLD_LAZY 0x00001
#define RTLD_NOW 0x00002
#define RTLD_GLOBAL 0x00100
typedef struct {
char *dli_fname;
void *dli_fbase;
char *dli_sname;
void *dli_saddr;
} Dl_info;
extern int dladdr(const void *, Dl_info *);
extern int dlclose(void *);
extern char *dlerror(void);
extern void *dlopen(const char *, int);
extern void *dlsym(void *, const char *);
#ifdef __cplusplus
}
#endif
#endif

163
lsb-build/headers/errno.h Normal file
View File

@ -0,0 +1,163 @@
#ifndef _ERRNO_H_
#define _ERRNO_H_
#ifdef __cplusplus
extern "C" {
#endif
#define errno (*__errno_location())
/* errno values*/
#define EPERM 1
#define ECHILD 10
#define ENETDOWN 100
#define ENETUNREACH 101
#define ENETRESET 102
#define ECONNABORTED 103
#define ECONNRESET 104
#define ENOBUFS 105
#define EISCONN 106
#define ENOTCONN 107
#define ESHUTDOWN 108
#define ETOOMANYREFS 109
#define EAGAIN 11
#define ETIMEDOUT 110
#define ECONNREFUSED 111
#define EHOSTDOWN 112
#define EHOSTUNREACH 113
#define EALREADY 114
#define EINPROGRESS 115
#define ESTALE 116
#define EUCLEAN 117
#define ENOTNAM 118
#define ENAVAIL 119
#define ENOMEM 12
#define EISNAM 120
#define EREMOTEIO 121
#define EDQUOT 122
#define ENOMEDIUM 123
#define EMEDIUMTYPE 124
#define ECANCELED 125
#define EACCES 13
#define EFAULT 14
#define ENOTBLK 15
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#define ENOENT 2
#define ENOTDIR 20
#define EISDIR 21
#define EINVAL 22
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define ETXTBSY 26
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define ESRCH 3
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
#define EDOM 33
#define ERANGE 34
#define EDEADLK 35
#if __s390x__
#define EDEADLOCK 35
#endif
#define ENAMETOOLONG 36
#define ENOLCK 37
#define ENOSYS 38
#define ENOTEMPTY 39
#define EINTR 4
#define ELOOP 40
#define ENOMSG 42
#define EIDRM 43
#define ECHRNG 44
#define EL2NSYNC 45
#define EL3HLT 46
#define EL3RST 47
#define ELNRNG 48
#define EUNATCH 49
#define EIO 5
#define ENOANO 55
#define EBADRQC 56
#define EBADSLT 57
#if __powerpc__ && !__powerpc64__
#define EDEADLOCK 58
#endif
#if __powerpc64__
#define EDEADLOCK 58
#endif
#define EBFONT 59
#define ENXIO 6
#define ENOSTR 60
#define ENODATA 61
#define ETIME 62
#define ENOSR 63
#define ENONET 64
#define ENOPKG 65
#define EREMOTE 66
#define ENOLINK 67
#define EADV 68
#define ESRMNT 69
#define E2BIG 7
#define ECOMM 70
#define EPROTO 71
#define EMULTIHOP 72
#define EDOTDOT 73
#define EBADMSG 74
#define EOVERFLOW 75
#define ENOTUNIQ 76
#define EBADFD 77
#define EREMCHG 78
#define ELIBACC 79
#define ENOEXEC 8
#define ELIBBAD 80
#define ELIBSCN 81
#define ELIBMAX 82
#define ELIBEXEC 83
#define EILSEQ 84
#define ERESTART 85
#define ESTRPIPE 86
#define EUSERS 87
#define ENOTSOCK 88
#define EDESTADDRREQ 89
#define EBADF 9
#define EMSGSIZE 90
#define EPROTOTYPE 91
#define ENOPROTOOPT 92
#define EPROTONOSUPPORT 93
#define ESOCKTNOSUPPORT 94
#define EOPNOTSUPP 95
#define EPFNOSUPPORT 96
#define EAFNOSUPPORT 97
#define EADDRINUSE 98
#define EADDRNOTAVAIL 99
#define EWOULDBLOCK EAGAIN
#if __i386__
#define EDEADLOCK EDEADLK
#endif
#if __ia64__
#define EDEADLOCK EDEADLK
#endif
#if __s390__ && !__s390x__
#define EDEADLOCK EDEADLK
#endif
#if __x86_64__
#define EDEADLOCK EDEADLK
#endif
#define ENOTSUP EOPNOTSUPP
extern int *__errno_location(void);
#ifdef __cplusplus
}
#endif
#endif

138
lsb-build/headers/fcntl.h Normal file
View File

@ -0,0 +1,138 @@
#ifndef _FCNTL_H_
#define _FCNTL_H_
#include <sys/types.h>
#include <unistd.h>
#ifdef __cplusplus
extern "C" {
#endif
#define O_RDONLY 00
#define O_ACCMODE 0003
#define O_WRONLY 01
#define O_CREAT 0100
#define O_TRUNC 01000
#define O_SYNC 010000
#define O_RDWR 02
#define O_EXCL 0200
#define O_APPEND 02000
#define O_ASYNC 020000
#define O_NOCTTY 0400
#define O_NDELAY 04000
#define O_NONBLOCK 04000
#define FD_CLOEXEC 1
struct flock {
short l_type;
short l_whence;
off_t l_start;
off_t l_len;
pid_t l_pid;
};
struct flock64 {
short l_type;
short l_whence;
loff_t l_start;
loff_t l_len;
pid_t l_pid;
};
/* flags for open(2)*/
/* flags for access(2)*/
/* Constants used for fcntl(2)*/
#define F_DUPFD 0
#define F_RDLCK 0
#define F_GETFD 1
#define F_WRLCK 1
#if __i386__
#define F_GETLK64 12
#endif
#if __powerpc__ && !__powerpc64__
#define F_GETLK64 12
#endif
#if __powerpc64__
#define F_GETLK64 12
#endif
#if __s390__ && !__s390x__
#define F_GETLK64 12
#endif
#if __i386__
#define F_SETLK64 13
#endif
#if __powerpc__ && !__powerpc64__
#define F_SETLK64 13
#endif
#if __powerpc64__
#define F_SETLK64 13
#endif
#if __s390__ && !__s390x__
#define F_SETLK64 13
#endif
#if __i386__
#define F_SETLKW64 14
#endif
#if __powerpc__ && !__powerpc64__
#define F_SETLKW64 14
#endif
#if __powerpc64__
#define F_SETLKW64 14
#endif
#if __s390__ && !__s390x__
#define F_SETLKW64 14
#endif
#define F_SETFD 2
#define F_UNLCK 2
#define F_GETFL 3
#define F_SETFL 4
#define F_GETLK 5
#if __ia64__
#define F_GETLK64 5
#endif
#if __x86_64__
#define F_GETLK64 5
#endif
#if __s390x__
#define F_GETLK64 5
#endif
#define F_SETLK 6
#if __ia64__
#define F_SETLK64 6
#endif
#if __x86_64__
#define F_SETLK64 6
#endif
#if __s390x__
#define F_SETLK64 6
#endif
#define F_SETLKW 7
#if __ia64__
#define F_SETLKW64 7
#endif
#if __x86_64__
#define F_SETLKW64 7
#endif
#if __s390x__
#define F_SETLKW64 7
#endif
#define F_SETOWN 8
#define F_GETOWN 9
extern int lockf64(int, int, off64_t);
extern int fcntl(int, int, ...);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,25 @@
#ifndef _FONTCONFIG_FCFREETYPE_H_
#define _FONTCONFIG_FCFREETYPE_H_
#include <fontconfig/fontconfig.h>
#ifdef __cplusplus
extern "C" {
#endif
extern FcResult FcPatternGetFTFace(const FcPattern *, const char *,
int, FT_Face *);
extern FcBool FcPatternAddFTFace(FcPattern *, const char *,
const FT_Face);
extern FT_UInt FcFreeTypeCharIndex(FT_Face, FcChar32);
extern FcCharSet *FcFreeTypeCharSet(FT_Face, FcBlanks *);
extern FcCharSet *FcFreeTypeCharSetAndSpacing(FT_Face, FcBlanks *,
int *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,42 @@
#ifndef _FONTCONFIG_FCPRIVATE_H_
#define _FONTCONFIG_FCPRIVATE_H_
#ifdef __cplusplus
extern "C" {
#endif
#define FcObjectSetVapBuild(__ret__,__first__,__va__) \
{ FcObjectSet *__os__; const char *__ob__; __ret__ = 0; __os__ = \
FcObjectSetCreate (); if (!__os__) goto _FcObjectSetVapBuild_bail0; \
__ob__ = __first__; while (__ob__) { if (!FcObjectSetAdd (__os__, \
__ob__)) goto _FcObjectSetVapBuild_bail1; __ob__ = va_arg (__va__, \
const char *); } __ret__ = __os__; _FcObjectSetVapBuild_bail1: if \
(!__ret__ && __os__) FcObjectSetDestroy (__os__); \
_FcObjectSetVapBuild_bail0: ; }
#define FcPatternVapBuild(result,orig,va) \
{ FcPattern *__p__ = (orig); const char *__o__; FcValue __v__; if \
(!__p__) { __p__ = FcPatternCreate (); if (!__p__) goto \
_FcPatternVapBuild_bail0; } for (;;) { __o__ = va_arg (va, const char \
*); if (!__o__) break; __v__.type = va_arg (va, FcType); switch \
(__v__.type) { case FcTypeVoid: goto _FcPatternVapBuild_bail1; case \
FcTypeInteger: __v__.u.i = va_arg (va, int); break; case FcTypeDouble: \
__v__.u.d = va_arg (va, double); break; case FcTypeString: __v__.u.s = \
va_arg (va, FcChar8 *); break; case FcTypeBool: __v__.u.b = va_arg \
(va, FcBool); break; case FcTypeMatrix: __v__.u.m = va_arg (va, \
FcMatrix *); break; case FcTypeCharSet: __v__.u.c = va_arg (va, \
FcCharSet *); break; case FcTypeFTFace: __v__.u.f = va_arg (va, \
FT_Face); break; case FcTypeLangSet: __v__.u.l = va_arg (va, FcLangSet \
*); break; } if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) goto \
_FcPatternVapBuild_bail1; } result = __p__; goto \
_FcPatternVapBuild_return; _FcPatternVapBuild_bail1: if (!orig) \
FcPatternDestroy (__p__); _FcPatternVapBuild_bail0: result = (void*)0; \
_FcPatternVapBuild_return: ; }
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,463 @@
#ifndef _FONTCONFIG_FONTCONFIG_H_
#define _FONTCONFIG_FONTCONFIG_H_
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
#define _FCFUNCPROTOBEGIN
#define _FCFUNCPROTOEND
#define FC_USER_CACHE_FILE ".fonts.cache-"FC_CACHE_VERSION
#define FC_DIR_CACHE_FILE "fonts.cache-"FC_CACHE_VERSION
#define FcIsUpper(c) ((0101 <= (c) && (c) <= 0132))
#define FcIsLower(c) ((0141 <= (c) && (c) <= 0172))
#define FC_CHARSET_DONE ((FcChar32) -1)
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
#define FcMatrixInit(m) ((m)->xx = (m)->yy = 1, (m)->xy = (m)->yx = 0)
#define FC_CHARSET_MAP_SIZE (256/32)
#define FcToLower(c) (FcIsUpper(c) ? (c) - 0101 + 0141 : (c))
#define FC_HINT_NONE 0
#define FC_PROPORTIONAL 0
#define FC_RGBA_UNKNOWN 0
#define FC_SLANT_ROMAN 0
#define FC_WEIGHT_THIN 0
#define FcFalse 0
#define FC_CACHE_VERSION "1"
#define FC_HINT_SLIGHT 1
#define FC_RGBA_RGB 1
#define FcTrue 1
#define FC_MONO 100
#define FC_SLANT_ITALIC 100
#define FC_WEIGHT_MEDIUM 100
#define FC_WIDTH_NORMAL 100
#define FC_CHARCELL 110
#define FC_SLANT_OBLIQUE 110
#define FC_WIDTH_SEMIEXPANDED 113
#define FC_WIDTH_EXPANDED 125
#define FC_WIDTH_EXTRAEXPANDED 150
#define FC_WEIGHT_DEMIBOLD 180
#define FC_HINT_MEDIUM 2
#define FC_MAJOR 2
#define FC_REVISION 2
#define FC_RGBA_BGR 2
#define FC_WEIGHT_BOLD 200
#define FC_WIDTH_ULTRAEXPANDED 200
#define FC_WEIGHT_EXTRABOLD 205
#define FC_WEIGHT_BLACK 210
#define FC_HINT_FULL 3
#define FC_MINOR 3
#define FC_RGBA_VRGB 3
#define FC_RGBA_VBGR 4
#define FC_WEIGHT_EXTRALIGHT 40
#define FC_RGBA_NONE 5
#define FC_WEIGHT_LIGHT 50
#define FC_WIDTH_ULTRACONDENSED 50
#define FC_UTF8_MAX_LEN 6
#define FC_WIDTH_EXTRACONDENSED 63
#define FC_WEIGHT_BOOK 75
#define FC_WIDTH_CONDENSED 75
#define FC_WEIGHT_REGULAR 80
#define FC_WIDTH_SEMICONDENSED 87
#define FC_DUAL 90
#define FC_ANTIALIAS "antialias"
#define FC_ASPECT "aspect"
#define FC_AUTOHINT "autohint"
#define FC_CAPABILITY "capability"
#define FC_CHAR_HEIGHT "charheight"
#define FC_CHARSET "charset"
#define FC_CHAR_WIDTH "charwidth"
#define FC_DPI "dpi"
#define FC_EMBOLDEN "embolden"
#define FC_FAMILY "family"
#define FC_FAMILYLANG "familylang"
#define FC_WEIGHT_HEAVY FC_WEIGHT_BLACK
#define FC_WEIGHT_SEMIBOLD FC_WEIGHT_DEMIBOLD
#define FC_WEIGHT_ULTRABOLD FC_WEIGHT_EXTRABOLD
#define FC_WEIGHT_ULTRALIGHT FC_WEIGHT_EXTRALIGHT
#define FC_WEIGHT_NORMAL FC_WEIGHT_REGULAR
#define FC_FILE "file"
#define FC_FONTFORMAT "fontformat"
#define FC_FONTVERSION "fontversion"
#define FC_FOUNDRY "foundry"
#define FC_FT_FACE "ftface"
#define FC_FULLNAME "fullname"
#define FC_FULLNAMELANG "fullnamelang"
#define FC_GLOBAL_ADVANCE "globaladvance"
#define FC_HINTING "hinting"
#define FC_HINT_STYLE "hintstyle"
#define FC_INDEX "index"
#define FC_LANG "lang"
#define FC_MATRIX "matrix"
#define FC_MINSPACE "minspace"
#define FC_OUTLINE "outline"
#define FC_PIXEL_SIZE "pixelsize"
#define FC_RASTERIZER "rasterizer"
#define FC_RGBA "rgba"
#define FC_SCALABLE "scalable"
#define FC_SCALE "scale"
#define FC_SIZE "size"
#define FC_SLANT "slant"
#define FC_SOURCE "source"
#define FC_SPACING "spacing"
#define FC_STYLE "style"
#define FC_STYLELANG "stylelang"
#define FC_VERTICAL_LAYOUT "verticallayout"
#define FC_WEIGHT "weight"
#define FC_WIDTH "width"
typedef int FcBool;
typedef struct _FcPattern FcPattern;
typedef enum _FcType {
FcTypeVoid = 0,
FcTypeInteger = 1,
FcTypeDouble = 2,
FcTypeString = 3,
FcTypeBool = 4,
FcTypeMatrix = 5,
FcTypeCharSet = 6,
FcTypeFTFace = 7,
FcTypeLangSet = 8
} FcType;
typedef unsigned char FcChar8;
typedef struct _FcMatrix FcMatrix;
typedef struct _FcCharSet FcCharSet;
typedef struct _FcLangSet FcLangSet;
typedef struct _FcValue FcValue;
typedef struct _FcStrList FcStrList;
typedef struct _FcConfig FcConfig;
typedef struct _FcStrSet FcStrSet;
typedef unsigned int FcChar32;
typedef enum _FcMatchKind {
FcMatchPattern = 0,
FcMatchFont = 1
} FcMatchKind;
typedef struct _FcObjectSet FcObjectSet;
typedef enum {
FcEndianBig = 0,
FcEndianLittle = 1
} FcEndian;
typedef struct _FcAtomic FcAtomic;
typedef struct _FcConstant FcConstant;
typedef struct _FcFontSet FcFontSet;
typedef enum _FcSetName {
FcSetSystem = 0,
FcSetApplication = 1
} FcSetName;
typedef struct _FcBlanks FcBlanks;
typedef enum _FcResult {
FcResultMatch = 0,
FcResultNoMatch = 1,
FcResultTypeMismatch = 2,
FcResultNoId = 3,
FcResultOutOfMemory = 4
} FcResult;
typedef struct _FcObjectType FcObjectType;
typedef struct _FcGlobalCache FcGlobalCache;
typedef enum _FcLangResult {
FcLangEqual = 0,
FcLangDifferentCountry = 1,
FcLangDifferentLang = 2
} FcLangResult;
typedef short unsigned int FcChar16;
struct _FcMatrix {
double xx;
double xy;
double yx;
double yy;
};
struct _FcValue {
FcType type;
union {
const FcChar8 *s;
int i;
FcBool b;
double d;
const FcMatrix *m;
const FcCharSet *c;
void *f;
const FcPattern *p;
const FcLangSet *l;
} u;
};
struct _FcObjectSet {
int nobject;
int sobject;
const char **objects;
};
struct _FcConstant {
const FcChar8 *name;
const char *object;
int value;
};
struct _FcFontSet {
int nfont;
int sfont;
FcPattern **fonts;
};
struct _FcObjectType {
const char *object;
FcType type;
};
extern FcBool FcPatternAdd(FcPattern *, const char *, FcValue, FcBool);
extern FcStrList *FcConfigGetConfigFiles(FcConfig *);
extern FcBool FcStrSetAdd(FcStrSet *, const FcChar8 *);
extern FcBool FcCharSetIsSubset(const FcCharSet *, const FcCharSet *);
extern void FcDefaultSubstitute(FcPattern *);
extern FcChar32 FcCharSetIntersectCount(const FcCharSet *,
const FcCharSet *);
extern FcBool FcConfigUptoDate(FcConfig *);
extern void FcPatternDestroy(FcPattern *);
extern FcLangSet *FcLangSetCopy(const FcLangSet *);
extern FcBool FcPatternAddCharSet(FcPattern *, const char *,
const FcCharSet *);
extern FcBool FcPatternAddLangSet(FcPattern *, const char *,
const FcLangSet *);
extern void FcConfigAppFontClear(FcConfig *);
extern int FcConfigGetRescanInverval(FcConfig *);
extern FcBool FcConfigSubstitute(FcConfig *, FcPattern *, FcMatchKind);
extern FcObjectSet *FcObjectSetBuild(const char *, ...);
extern FcBool FcObjectSetAdd(FcObjectSet *, const char *);
extern FcChar32 FcCharSetSubtractCount(const FcCharSet *,
const FcCharSet *);
extern FcBool FcUtf16Len(const FcChar8 *, FcEndian, int, int *, int *);
extern FcBool FcConfigBuildFonts(FcConfig *);
extern FcChar8 *FcAtomicOrigFile(FcAtomic *);
extern FcBool FcNameUnregisterConstants(const FcConstant *, int);
extern FcBool FcConfigSetRescanInverval(FcConfig *, int);
extern FcBool FcAtomicLock(FcAtomic *);
extern FcPattern *FcPatternBuild(FcPattern *, ...);
extern FcFontSet *FcConfigGetFonts(FcConfig *, FcSetName);
extern void FcStrListDone(FcStrList *);
extern FcBool FcLangSetEqual(const FcLangSet *, const FcLangSet *);
extern const FcConstant *FcNameGetConstant(FcChar8 *);
extern void FcMatrixShear(FcMatrix *, double, double);
extern FcMatrix *FcMatrixCopy(const FcMatrix *);
extern FcStrList *FcConfigGetConfigDirs(FcConfig *);
extern FcBool FcStrSetDel(FcStrSet *, const FcChar8 *);
extern FcBool FcConfigEnableHome(FcBool);
extern FcStrSet *FcStrSetCreate(void);
extern int FcStrCmpIgnoreCase(const FcChar8 *, const FcChar8 *);
extern FcCharSet *FcCharSetUnion(const FcCharSet *, const FcCharSet *);
extern FcObjectSet *FcObjectSetCreate(void);
extern FcBlanks *FcBlanksCreate(void);
extern void FcBlanksDestroy(FcBlanks *);
extern FcBool FcNameConstant(FcChar8 *, int *);
extern void FcMatrixRotate(FcMatrix *, double, double);
extern FcPattern *FcNameParse(const FcChar8 *);
extern void FcMatrixMultiply(FcMatrix *, const FcMatrix *,
const FcMatrix *);
extern FcResult FcPatternGetLangSet(const FcPattern *, const char *,
int, FcLangSet * *);
extern FcValue FcValueSave(FcValue);
extern void FcAtomicDestroy(FcAtomic *);
extern FcBool FcPatternEqual(const FcPattern *, const FcPattern *);
extern FcBool FcNameRegisterObjectTypes(const FcObjectType *, int);
extern FcChar32 FcCharSetNextPage(const FcCharSet *, FcChar32 *,
FcChar32 *);
extern FcBool FcConfigSetCurrent(FcConfig *);
extern FcPattern *FcFreeTypeQuery(const FcChar8 *, int, FcBlanks *,
int *);
extern FcChar8 *FcStrListNext(FcStrList *);
extern FcBool FcNameRegisterConstants(const FcConstant *, int);
extern void FcValueDestroy(FcValue);
extern FcBool FcFileScan(FcFontSet *, FcStrSet *, FcGlobalCache *,
FcBlanks *, const FcChar8 *, FcBool);
extern FcFontSet *FcFontSetSort(FcConfig *, FcFontSet * *, int,
FcPattern *, FcBool, FcCharSet * *,
FcResult *);
extern FcResult FcPatternGetString(const FcPattern *, const char *,
int, FcChar8 * *);
extern FcChar8 *FcStrCopy(const FcChar8 *);
extern FcBool FcPatternEqualSubset(const FcPattern *,
const FcPattern *,
const FcObjectSet *);
extern FcConfig *FcInitLoadConfig(void);
extern FcStrList *FcStrListCreate(FcStrSet *);
extern FcResult FcPatternGetCharSet(const FcPattern *, const char *,
int, FcCharSet * *);
extern FcPattern *FcPatternCreate(void);
extern FcChar32 FcPatternHash(const FcPattern *);
extern FcChar8 *FcConfigFilename(const FcChar8 *);
extern FcBool FcPatternDel(FcPattern *, const char *);
extern FcCharSet *FcCharSetCopy(FcCharSet *);
extern FcBool FcInitReinitialize(void);
extern FcFontSet *FcFontList(FcConfig *, FcPattern *, FcObjectSet *);
extern int FcUcs4ToUtf8(FcChar32, FcChar8 *);
extern FcBool FcAtomicReplaceOrig(FcAtomic *);
extern FcObjectSet *FcObjectSetVaBuild(const char *, va_list);
extern FcBool FcInitBringUptoDate(void);
extern FcResult FcPatternGetDouble(const FcPattern *, const char *,
int, double *);
extern int FcStrCmp(const FcChar8 *, const FcChar8 *);
extern FcChar8 *FcConfigGetCache(FcConfig *);
extern FcAtomic *FcAtomicCreate(const FcChar8 *);
extern FcPattern *FcPatternDuplicate(const FcPattern *);
extern FcChar8 *FcStrDirname(const FcChar8 *);
extern FcBool FcConfigSubstituteWithPat(FcConfig *, FcPattern *,
FcPattern *, FcMatchKind);
extern FcBool FcDirScan(FcFontSet *, FcStrSet *, FcGlobalCache *,
FcBlanks *, const FcChar8 *, FcBool);
extern FcChar8 *FcStrCopyFilename(const FcChar8 *);
extern FcBool FcLangSetAdd(FcLangSet *, const FcChar8 *);
extern FcResult FcPatternGetInteger(const FcPattern *, const char *,
int, int *);
extern FcBool FcConfigParseAndLoad(FcConfig *, const FcChar8 *,
FcBool);
extern FcBool FcStrSetEqual(FcStrSet *, FcStrSet *);
extern FcBool FcConfigAppFontAddFile(FcConfig *, const FcChar8 *);
extern FcPattern *FcFontSetMatch(FcConfig *, FcFontSet * *, int,
FcPattern *, FcResult *);
extern FcBool FcStrSetAddFilename(FcStrSet *, const FcChar8 *);
extern FcChar8 *FcNameUnparse(FcPattern *);
extern FcChar32 FcCharSetFirstPage(const FcCharSet *, FcChar32 *,
FcChar32 *);
extern void FcFontSetPrint(const FcFontSet *);
extern FcPattern *FcPatternVaBuild(FcPattern *, va_list);
extern FcChar8 *FcConfigHome(void);
extern FcBool FcBlanksAdd(FcBlanks *, FcChar32);
extern FcBool FcBlanksIsMember(FcBlanks *, FcChar32);
extern FcBool FcNameUnregisterObjectTypes(const FcObjectType *, int);
extern FcLangResult FcLangSetHasLang(const FcLangSet *,
const FcChar8 *);
extern FcChar8 *FcStrBasename(const FcChar8 *);
extern FcPattern *FcFontMatch(FcConfig *, FcPattern *, FcResult *);
extern void FcValuePrint(const FcValue);
extern FcLangSet *FcLangSetCreate(void);
extern FcStrList *FcConfigGetFontDirs(FcConfig *);
extern FcBool FcCharSetAddChar(FcCharSet *, FcChar32);
extern FcCharSet *FcCharSetIntersect(const FcCharSet *,
const FcCharSet *);
extern void FcMatrixScale(FcMatrix *, double, double);
extern void FcPatternReference(FcPattern *);
extern FcBool FcCharSetEqual(const FcCharSet *, const FcCharSet *);
extern FcBool FcFontSetAdd(FcFontSet *, FcPattern *);
extern FcChar8 *FcAtomicNewFile(FcAtomic *);
extern FcFontSet *FcFontSetList(FcConfig *, FcFontSet * *, int,
FcPattern *, FcObjectSet *);
extern void FcFontSetSortDestroy(FcFontSet *);
extern FcBool FcPatternAddMatrix(FcPattern *, const char *,
const FcMatrix *);
extern FcChar32 FcCharSetCount(const FcCharSet *);
extern FcBool FcPatternAddString(FcPattern *, const char *,
const FcChar8 *);
extern void FcStrSetDestroy(FcStrSet *);
extern FcConfig *FcConfigGetCurrent(void);
extern FcBool FcPatternAddInteger(FcPattern *, const char *, int);
extern FcResult FcPatternGetMatrix(const FcPattern *, const char *,
int, FcMatrix * *);
extern int FcGetVersion(void);
extern FcBool FcCharSetHasChar(const FcCharSet *, FcChar32);
extern FcBool FcPatternAddBool(FcPattern *, const char *, FcBool);
extern const FcObjectType *FcNameGetObjectType(const char *);
extern FcBool FcDirCacheValid(const FcChar8 *);
extern FcBool FcUtf8Len(const FcChar8 *, int, int *, int *);
extern FcConfig *FcInitLoadConfigAndFonts(void);
extern FcResult FcPatternGetBool(const FcPattern *, const char *, int,
FcBool *);
extern void FcFontSetDestroy(FcFontSet *);
extern FcBool FcConfigAppFontAddDir(FcConfig *, const FcChar8 *);
extern int FcUtf16ToUcs4(const FcChar8 *, FcEndian, FcChar32 *, int);
extern int FcUtf8ToUcs4(const FcChar8 *, FcChar32 *, int);
extern FcFontSet *FcFontSetCreate(void);
extern FcBool FcDirSave(FcFontSet *, FcStrSet *, const FcChar8 *);
extern void FcConfigDestroy(FcConfig *);
extern FcBool FcPatternAddDouble(FcPattern *, const char *, double);
extern FcFontSet *FcFontSort(FcConfig *, FcPattern *, FcBool,
FcCharSet * *, FcResult *);
extern FcPattern *FcFontRenderPrepare(FcConfig *, FcPattern *,
FcPattern *);
extern void FcLangSetDestroy(FcLangSet *);
extern void FcCharSetDestroy(FcCharSet *);
extern FcBool FcValueEqual(FcValue, FcValue);
extern FcBool FcPatternAddWeak(FcPattern *, const char *, FcValue,
FcBool);
extern FcBool FcLangSetContains(const FcLangSet *, const FcLangSet *);
extern void FcObjectSetDestroy(FcObjectSet *);
extern FcCharSet *FcCharSetCreate(void);
extern FcLangResult FcLangSetCompare(const FcLangSet *,
const FcLangSet *);
extern FcBool FcMatrixEqual(const FcMatrix *, const FcMatrix *);
extern void FcAtomicUnlock(FcAtomic *);
extern FcBool FcStrSetMember(FcStrSet *, const FcChar8 *);
extern FcChar32 FcLangSetHash(const FcLangSet *);
extern void FcAtomicDeleteNew(FcAtomic *);
extern FcCharSet *FcCharSetSubtract(const FcCharSet *,
const FcCharSet *);
extern FcBool FcInit(void);
extern FcResult FcPatternGet(const FcPattern *, const char *, int,
FcValue *);
extern void FcPatternPrint(const FcPattern *);
extern FcBlanks *FcConfigGetBlanks(FcConfig *);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
#ifndef _GLIB_2_0_GLIB_GPRINTF_H_
#define _GLIB_2_0_GLIB_GPRINTF_H_
#include <stdio.h>
#include <stdarg.h>
#include <glib-2.0/glib.h>
#ifdef __cplusplus
extern "C" {
#endif
extern gint g_sprintf(gchar *, const gchar *, ...);
extern gint g_fprintf(FILE *, const gchar *, ...);
extern gint g_vasprintf(gchar * *, const gchar *, va_list);
extern gint g_vprintf(const gchar *, va_list);
extern gint g_printf(const gchar *, ...);
extern gint g_vfprintf(FILE *, const gchar *, va_list);
extern gint g_vsnprintf(gchar *, gulong, const gchar *, va_list);
extern gint g_vsprintf(gchar *, const gchar *, va_list);
extern gint g_snprintf(gchar *, gulong, const gchar *, ...);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,26 @@
#ifndef _GLIB_2_0_GLIB_GSTDIO_H_
#define _GLIB_2_0_GLIB_GSTDIO_H_
#ifdef __cplusplus
extern "C" {
#endif
#define g_fopen fopen
#define g_freopen freopen
#define g_lstat lstat
#define g_mkdir mkdir
#define g_open open
#define g_remove remove
#define g_rename rename
#define g_rmdir rmdir
#define g_stat stat
#define g_unlink unlink
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,42 @@
#ifndef _GLIB_2_0_GMODULE_H_
#define _GLIB_2_0_GMODULE_H_
#include <glib-2.0/glib.h>
#ifdef __cplusplus
extern "C" {
#endif
#define G_MODULE_EXPORT
#define G_MODULE_IMPORT extern
typedef struct _GModule GModule;
typedef enum {
G_MODULE_BIND_LAZY = 1,
G_MODULE_BIND_LOCAL = 2,
G_MODULE_BIND_MASK = 3
} GModuleFlags;
typedef void (*GModuleUnload) (GModule *);
typedef const gchar *(*GModuleCheckInit) (GModule *);
extern void g_module_make_resident(GModule *);
extern gchar *g_module_build_path(const gchar *, const gchar *);
extern gboolean g_module_close(GModule *);
extern GModule *g_module_open(const gchar *, GModuleFlags);
extern gboolean g_module_symbol(GModule *, const gchar *, gpointer *);
extern const gchar *g_module_error(void);
extern const gchar *g_module_name(GModule *);
extern gboolean g_module_supported(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,61 @@
#ifndef _GLIB_2_0_GOBJECT_GVALUECOLLECTOR_H_
#define _GLIB_2_0_GOBJECT_GVALUECOLLECTOR_H_
#ifdef __cplusplus
extern "C" {
#endif
#define G_VALUE_LCOPY(value,var_args,flags,__error) \
G_STMT_START { const GValue *_value = (value); guint _flags = \
(flags); GType _value_type = G_VALUE_TYPE (_value); GTypeValueTable \
*_vtable = g_type_value_table_peek (_value_type); gchar *_lcopy_format \
= _vtable->lcopy_format; GTypeCValue \
_cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; guint \
_n_values = 0; while (*_lcopy_format) { GTypeCValue *_cvalue = \
_cvalues + _n_values++; switch (*_lcopy_format++) { case \
G_VALUE_COLLECT_INT: _cvalue->v_int = va_arg ((var_args), gint); \
break; case G_VALUE_COLLECT_LONG: _cvalue->v_long = va_arg \
((var_args), glong); break; case G_VALUE_COLLECT_INT64: \
_cvalue->v_int64 = va_arg ((var_args), gint64); break; case \
G_VALUE_COLLECT_DOUBLE: _cvalue->v_double = va_arg ((var_args), \
gdouble); break; case G_VALUE_COLLECT_POINTER: _cvalue->v_pointer = \
va_arg ((var_args), gpointer); break; default: g_assert_not_reached \
(); } } *(__error) = _vtable->lcopy_value (_value, _n_values, \
_cvalues, _flags); } G_STMT_END
#define G_VALUE_COLLECT(value,var_args,flags,__error) \
G_STMT_START { GValue *_value = (value); guint _flags = (flags); \
GType _value_type = G_VALUE_TYPE (_value); GTypeValueTable *_vtable = \
g_type_value_table_peek (_value_type); gchar *_collect_format = \
_vtable->collect_format; GTypeCValue \
_cvalues[G_VALUE_COLLECT_FORMAT_MAX_LENGTH] = { { 0, }, }; guint \
_n_values = 0; if (_vtable->value_free) _vtable->value_free (_value); \
_value->g_type = _value_type; memset (_value->data, 0, sizeof \
(_value->data)); while (*_collect_format) { GTypeCValue *_cvalue = \
_cvalues + _n_values++; switch (*_collect_format++) { case \
G_VALUE_COLLECT_INT: _cvalue->v_int = va_arg ((var_args), gint); \
break; case G_VALUE_COLLECT_LONG: _cvalue->v_long = va_arg \
((var_args), glong); break; case G_VALUE_COLLECT_INT64: \
_cvalue->v_int64 = va_arg ((var_args), gint64); break; case \
G_VALUE_COLLECT_DOUBLE: _cvalue->v_double = va_arg ((var_args), \
gdouble); break; case G_VALUE_COLLECT_POINTER: _cvalue->v_pointer = \
va_arg ((var_args), gpointer); break; default: g_assert_not_reached \
(); } } *(__error) = _vtable->collect_value (_value, _n_values, \
_cvalues, _flags); } G_STMT_END
#define G_VALUE_COLLECT_FORMAT_MAX_LENGTH (8)
enum {
G_VALUE_COLLECT_INT = 'i',
G_VALUE_COLLECT_LONG = 'l',
G_VALUE_COLLECT_INT64 = 'q',
G_VALUE_COLLECT_DOUBLE = 'd',
G_VALUE_COLLECT_POINTER = 'p'
};
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,91 @@
#ifndef _GTK_2_0_GDK_PIXBUF_XLIB_GDK_PIXBUF_XLIB_H_
#define _GTK_2_0_GDK_PIXBUF_XLIB_GDK_PIXBUF_XLIB_H_
#include <X11/Xlib.h>
#include <X11/X.h>
#include <X11/Xutil.h>
#include <glib-2.0/glib.h>
#include <gtk-2.0/gdk-pixbuf/gdk-pixbuf.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
XLIB_RGB_DITHER_NONE = 0,
XLIB_RGB_DITHER_NORMAL = 1,
XLIB_RGB_DITHER_MAX = 2
} XlibRgbDither;
typedef struct _XlibRgbCmap XlibRgbCmap;
struct _XlibRgbCmap {
unsigned int colors[256];
unsigned char lut[256];
};
extern void gdk_pixbuf_xlib_init_with_depth(Display *, int, int);
extern Visual *xlib_rgb_get_visual(void);
extern void gdk_pixbuf_xlib_render_to_drawable(GdkPixbuf *, Drawable,
GC, int, int, int, int,
int, int, XlibRgbDither,
int, int);
extern GdkPixbuf *gdk_pixbuf_xlib_get_from_drawable(GdkPixbuf *,
Drawable, Colormap,
Visual *, int, int,
int, int, int,
int);
extern XVisualInfo *xlib_rgb_get_visual_info(void);
extern void xlib_rgb_set_install(int);
extern void xlib_rgb_cmap_free(XlibRgbCmap *);
extern int xlib_rgb_get_depth(void);
extern long unsigned int xlib_rgb_xpixel_from_rgb(guint32);
extern void xlib_rgb_gc_set_foreground(GC, guint32);
extern void xlib_rgb_set_verbose(int);
extern int xlib_rgb_ditherable(void);
extern void xlib_rgb_set_min_colors(int);
extern void gdk_pixbuf_xlib_render_threshold_alpha(GdkPixbuf *, Pixmap,
int, int, int, int,
int, int, int);
extern Display *xlib_rgb_get_display(void);
extern void xlib_rgb_init(Display *, Screen *);
extern void gdk_pixbuf_xlib_init(Display *, int);
extern Screen *xlib_rgb_get_screen(void);
extern Colormap xlib_rgb_get_cmap(void);
extern void xlib_draw_gray_image(Drawable, GC, int, int, int, int,
XlibRgbDither, unsigned char *, int);
extern void xlib_draw_indexed_image(Drawable, GC, int, int, int, int,
XlibRgbDither, unsigned char *,
int, XlibRgbCmap *);
extern XlibRgbCmap *xlib_rgb_cmap_new(guint32 *, int);
extern void xlib_draw_rgb_32_image(Drawable, GC, int, int, int, int,
XlibRgbDither, unsigned char *,
int);
extern void xlib_draw_rgb_image_dithalign(Drawable, GC, int, int, int,
int, XlibRgbDither,
unsigned char *, int, int,
int);
extern void xlib_rgb_gc_set_background(GC, guint32);
extern void gdk_pixbuf_xlib_render_pixmap_and_mask(GdkPixbuf *,
Pixmap *, Pixmap *,
int);
extern void gdk_pixbuf_xlib_render_to_drawable_alpha(GdkPixbuf *,
Drawable, int,
int, int, int,
int, int,
GdkPixbufAlphaMode,
int,
XlibRgbDither,
int, int);
extern void xlib_draw_rgb_image(Drawable, GC, int, int, int, int,
XlibRgbDither, unsigned char *, int);
extern void xlib_rgb_init_with_depth(Display *, Screen *, int);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,284 @@
#ifndef _GTK_2_0_GDK_PIXBUF_GDK_PIXBUF_H_
#define _GTK_2_0_GDK_PIXBUF_GDK_PIXBUF_H_
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#include <pango-1.0/pango/pango.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GDK_TYPE_PIXBUF_ANIMATION_ITER \
(gdk_pixbuf_animation_iter_get_type ())
#define GDK_PIXBUF_LOADER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_LOADER, \
GdkPixbufLoaderClass))
#define GDK_IS_PIXBUF_LOADER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_LOADER))
#define GDK_PIXBUF_LOADER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PIXBUF_LOADER, \
GdkPixbufLoader))
#define GDK_PIXBUF(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF, GdkPixbuf))
#define GDK_PIXBUF_ANIMATION(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION, \
GdkPixbufAnimation))
#define GDK_PIXBUF_ANIMATION_ITER(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), \
GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter))
#define GDK_IS_PIXBUF_LOADER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PIXBUF_LOADER))
#define GDK_IS_PIXBUF(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF))
#define GDK_IS_PIXBUF_ANIMATION(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION))
#define GDK_IS_PIXBUF_ANIMATION_ITER(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), \
GDK_TYPE_PIXBUF_ANIMATION_ITER))
#define GDK_PIXBUF_LOADER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_LOADER, \
GdkPixbufLoaderClass))
#define GDK_PIXBUF_MICRO (10)
#define GDK_PIXBUF_MAJOR (2)
#define GDK_PIXBUF_MINOR (6)
#define GDK_TYPE_COLORSPACE (gdk_colorspace_get_type())
#define GDK_TYPE_INTERP_TYPE (gdk_interp_type_get_type())
#define GDK_TYPE_PIXBUF_ALPHA_MODE (gdk_pixbuf_alpha_mode_get_type())
#define GDK_TYPE_PIXBUF_ANIMATION (gdk_pixbuf_animation_get_type ())
#define GDK_TYPE_PIXBUF_ERROR (gdk_pixbuf_error_get_type())
#define GDK_TYPE_PIXBUF (gdk_pixbuf_get_type ())
#define GDK_TYPE_PIXBUF_LOADER (gdk_pixbuf_loader_get_type ())
#define GDK_TYPE_PIXBUF_ROTATION (gdk_pixbuf_rotation_get_type())
#define GDK_PIXBUF_VERSION "2.6.10"
#define GDK_PIXBUF_VAR extern
#define GDK_PIXBUF_ERROR gdk_pixbuf_error_quark ()
typedef struct _GdkPixbuf GdkPixbuf;
typedef gboolean(*GdkPixbufSaveFunc) (const gchar *, gsize, GError * *,
gpointer);
typedef struct _GdkPixbufLoader GdkPixbufLoader;
typedef struct _GdkPixbufFormat GdkPixbufFormat;
typedef enum {
GDK_INTERP_NEAREST = 0,
GDK_INTERP_TILES = 1,
GDK_INTERP_BILINEAR = 2,
GDK_INTERP_HYPER = 3
} GdkInterpType;
typedef enum {
GDK_COLORSPACE_RGB = 0
} GdkColorspace;
typedef void (*GdkPixbufDestroyNotify) (guchar *, gpointer);
typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
typedef enum {
GDK_PIXBUF_ROTATE_NONE = 0,
GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE = 90,
GDK_PIXBUF_ROTATE_UPSIDEDOWN = 180,
GDK_PIXBUF_ROTATE_CLOCKWISE = 270
} GdkPixbufRotation;
typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
typedef enum {
GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,
GDK_PIXBUF_ERROR_BAD_OPTION,
GDK_PIXBUF_ERROR_UNKNOWN_TYPE,
GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION,
GDK_PIXBUF_ERROR_FAILED
} GdkPixbufError;
typedef enum {
GDK_PIXBUF_ALPHA_BILEVEL,
GDK_PIXBUF_ALPHA_FULL
} GdkPixbufAlphaMode;
struct _GdkPixbufLoader {
GObject parent_instance;
gpointer priv;
};
struct _GdkPixbufLoaderClass {
GObjectClass parent_class;
void (*size_prepared) (GdkPixbufLoader *, int, int);
void (*area_prepared) (GdkPixbufLoader *);
void (*area_updated) (GdkPixbufLoader *, int, int, int, int);
void (*closed) (GdkPixbufLoader *);
};
extern gboolean gdk_pixbuf_save_to_callbackv(GdkPixbuf *,
GdkPixbufSaveFunc,
gpointer, const char *,
char **, char **,
GError * *);
extern gboolean gdk_pixbuf_save_to_bufferv(GdkPixbuf *, gchar * *,
gsize *, const char *,
char **, char **,
GError * *);
extern GdkPixbuf *gdk_pixbuf_new_from_file_at_scale(const char *, int,
int, gboolean,
GError * *);
extern GdkPixbufLoader *gdk_pixbuf_loader_new_with_type(const char *,
GError * *);
extern GSList *gdk_pixbuf_get_formats(void);
extern guchar *gdk_pixbuf_get_pixels(const GdkPixbuf *);
extern const guint gdk_pixbuf_minor_version;
extern void gdk_pixbuf_format_set_disabled(GdkPixbufFormat *,
gboolean);
extern gboolean gdk_pixbuf_format_is_scalable(GdkPixbufFormat *);
extern int gdk_pixbuf_get_n_channels(const GdkPixbuf *);
extern GdkPixbuf *gdk_pixbuf_scale_simple(const GdkPixbuf *, int, int,
GdkInterpType);
extern GdkPixbuf *gdk_pixbuf_new_from_data(const guchar *,
GdkColorspace, gboolean,
int, int, int, int,
GdkPixbufDestroyNotify,
gpointer);
extern gboolean gdk_pixbuf_loader_close(GdkPixbufLoader *, GError * *);
extern GType gdk_pixbuf_animation_get_type(void);
extern gboolean gdk_pixbuf_save_to_buffer(GdkPixbuf *, gchar * *,
gsize *, const char *,
GError * *, ...);
extern GType gdk_interp_type_get_type(void);
extern GdkPixbuf *gdk_pixbuf_new_from_file_at_size(const char *, int,
int, GError * *);
extern GdkPixbuf *gdk_pixbuf_new_from_xpm_data(const char **);
extern GdkPixbufLoader *gdk_pixbuf_loader_new(void);
extern gboolean gdk_pixbuf_save_to_callback(GdkPixbuf *,
GdkPixbufSaveFunc,
gpointer, const char *,
GError * *, ...);
extern GdkPixbuf *gdk_pixbuf_add_alpha(const GdkPixbuf *, gboolean,
guchar, guchar, guchar);
extern gboolean
gdk_pixbuf_animation_iter_advance(GdkPixbufAnimationIter *,
const GTimeVal *);
extern void gdk_pixbuf_saturate_and_pixelate(const GdkPixbuf *,
GdkPixbuf *, gfloat,
gboolean);
extern GType gdk_pixbuf_animation_iter_get_type(void);
extern int gdk_pixbuf_get_bits_per_sample(const GdkPixbuf *);
extern GdkPixbuf *gdk_pixbuf_new_from_inline(gint, const guint8 *,
gboolean, GError * *);
extern const guint gdk_pixbuf_major_version;
extern GdkPixbuf
*gdk_pixbuf_animation_get_static_image(GdkPixbufAnimation *);
extern const guint gdk_pixbuf_micro_version;
extern int gdk_pixbuf_get_height(const GdkPixbuf *);
extern GdkPixbuf *gdk_pixbuf_flip(const GdkPixbuf *, gboolean);
extern GdkPixbufAnimationIter
*gdk_pixbuf_animation_get_iter(GdkPixbufAnimation *,
const GTimeVal *);
extern gboolean
gdk_pixbuf_animation_iter_on_currently_loading_frame
(GdkPixbufAnimationIter *);
extern GdkPixbufAnimation
*gdk_pixbuf_loader_get_animation(GdkPixbufLoader *);
extern int gdk_pixbuf_get_rowstride(const GdkPixbuf *);
extern GdkPixbuf *gdk_pixbuf_new_from_file(const char *, GError * *);
extern void gdk_pixbuf_loader_set_size(GdkPixbufLoader *, gint, gint);
extern GType gdk_pixbuf_loader_get_type(void);
extern GdkPixbuf *gdk_pixbuf_composite_color_simple(const GdkPixbuf *,
int, int,
GdkInterpType, int,
int, guint32,
guint32);
extern gboolean gdk_pixbuf_save(GdkPixbuf *, const char *,
const char *, GError * *, ...);
extern GdkPixbuf *gdk_pixbuf_new_subpixbuf(GdkPixbuf *, int, int, int,
int);
extern gchar *gdk_pixbuf_format_get_license(GdkPixbufFormat *);
extern GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file(const
char *,
GError *
*);
extern void gdk_pixbuf_fill(GdkPixbuf *, guint32);
extern void gdk_pixbuf_composite_color(const GdkPixbuf *, GdkPixbuf *,
int, int, int, int, double,
double, double, double,
GdkInterpType, int, int, int,
int, guint32, guint32);
extern void gdk_pixbuf_composite(const GdkPixbuf *, GdkPixbuf *, int,
int, int, int, double, double, double,
double, GdkInterpType, int);
extern int gdk_pixbuf_animation_get_width(GdkPixbufAnimation *);
extern gboolean gdk_pixbuf_animation_is_static_image(GdkPixbufAnimation
*);
extern void gdk_pixbuf_scale(const GdkPixbuf *, GdkPixbuf *, int, int,
int, int, double, double, double, double,
GdkInterpType);
extern GdkPixbuf
*gdk_pixbuf_animation_iter_get_pixbuf(GdkPixbufAnimationIter *);
extern const char *gdk_pixbuf_version;
extern gchar *gdk_pixbuf_format_get_name(GdkPixbufFormat *);
extern gchar **gdk_pixbuf_format_get_mime_types(GdkPixbufFormat *);
extern GType gdk_pixbuf_rotation_get_type(void);
extern GType gdk_colorspace_get_type(void);
extern GdkPixbufFormat *gdk_pixbuf_loader_get_format(GdkPixbufLoader
*);
extern GType gdk_pixbuf_alpha_mode_get_type(void);
extern gboolean gdk_pixbuf_format_is_disabled(GdkPixbufFormat *);
extern GdkPixbuf *gdk_pixbuf_rotate_simple(const GdkPixbuf *,
GdkPixbufRotation);
extern void gdk_pixbuf_copy_area(const GdkPixbuf *, int, int, int, int,
GdkPixbuf *, int, int);
extern GQuark gdk_pixbuf_error_quark(void);
extern gboolean gdk_pixbuf_format_is_writable(GdkPixbufFormat *);
extern GType gdk_pixbuf_get_type(void);
extern GdkPixbufFormat *gdk_pixbuf_get_file_info(const gchar *, gint *,
gint *);
extern GdkPixbuf *gdk_pixbuf_copy(const GdkPixbuf *);
extern gboolean gdk_pixbuf_savev(GdkPixbuf *, const char *,
const char *, char **, char **,
GError * *);
extern gchar *gdk_pixbuf_format_get_description(GdkPixbufFormat *);
extern GdkPixbuf *gdk_pixbuf_loader_get_pixbuf(GdkPixbufLoader *);
extern gboolean gdk_pixbuf_loader_write(GdkPixbufLoader *,
const guchar *, gsize,
GError * *);
extern int gdk_pixbuf_animation_get_height(GdkPixbufAnimation *);
extern int gdk_pixbuf_get_width(const GdkPixbuf *);
extern GdkPixbuf *gdk_pixbuf_new(GdkColorspace, gboolean, int, int,
int);
extern gchar **gdk_pixbuf_format_get_extensions(GdkPixbufFormat *);
extern GdkColorspace gdk_pixbuf_get_colorspace(const GdkPixbuf *);
extern GdkPixbufLoader *gdk_pixbuf_loader_new_with_mime_type(const char
*,
GError *
*);
extern GType gdk_pixbuf_error_get_type(void);
extern gboolean gdk_pixbuf_get_has_alpha(const GdkPixbuf *);
extern const gchar *gdk_pixbuf_get_option(GdkPixbuf *, const gchar *);
extern int
gdk_pixbuf_animation_iter_get_delay_time(GdkPixbufAnimationIter *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,65 @@
#ifndef _GTK_2_0_GDK_PIXBUF_GDK_PIXDATA_H_
#define _GTK_2_0_GDK_PIXBUF_GDK_PIXDATA_H_
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#include <gtk-2.0/gdk-pixbuf/gdk-pixbuf.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GDK_PIXBUF_MAGIC_NUMBER (0x47646b50)
#define GDK_PIXDATA_HEADER_LENGTH (4 + 4 + 4 + 4 + 4 + 4)
typedef struct _GdkPixdata GdkPixdata;
typedef enum {
GDK_PIXDATA_DUMP_PIXDATA_STREAM = 0,
GDK_PIXDATA_DUMP_PIXDATA_STRUCT = 1,
GDK_PIXDATA_DUMP_MACROS = 2,
GDK_PIXDATA_DUMP_GTYPES = 0,
GDK_PIXDATA_DUMP_CTYPES = 256,
GDK_PIXDATA_DUMP_STATIC = 512,
GDK_PIXDATA_DUMP_CONST = 1024,
GDK_PIXDATA_DUMP_RLE_DECODER = 65536
} GdkPixdataDumpType;
typedef enum {
GDK_PIXDATA_COLOR_TYPE_RGB = 0x01,
GDK_PIXDATA_COLOR_TYPE_RGBA = 0x02,
GDK_PIXDATA_COLOR_TYPE_MASK = 0xff,
GDK_PIXDATA_SAMPLE_WIDTH_8 = 0x01 << 16,
GDK_PIXDATA_SAMPLE_WIDTH_MASK = 0x0f << 16,
GDK_PIXDATA_ENCODING_RAW = 0x01 << 24,
GDK_PIXDATA_ENCODING_RLE = 0x02 << 24,
GDK_PIXDATA_ENCODING_MASK = 0x0f << 24
} GdkPixdataType;
struct _GdkPixdata {
guint32 magic;
gint32 length;
guint32 pixdata_type;
guint32 rowstride;
guint32 width;
guint32 height;
guint8 *pixel_data;
};
extern gboolean gdk_pixdata_deserialize(GdkPixdata *, guint,
const guint8 *, GError * *);
extern gpointer gdk_pixdata_from_pixbuf(GdkPixdata *,
const GdkPixbuf *, gboolean);
extern guint8 *gdk_pixdata_serialize(const GdkPixdata *, guint *);
extern GString *gdk_pixdata_to_csource(GdkPixdata *, const gchar *,
GdkPixdataDumpType);
extern GdkPixbuf *gdk_pixbuf_from_pixdata(const GdkPixdata *, gboolean,
GError * *);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,105 @@
#ifndef _GTK_2_0_GDK_GDKX_H_
#define _GTK_2_0_GDK_GDKX_H_
#include <X11/Xlib.h>
#include <X11/X.h>
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#include <gtk-2.0/gdk/gdk.h>
#ifdef __cplusplus
extern "C" {
#endif
#define GDK_WINDOW_DESTROYED(d) \
(((GdkWindowObject*)(GDK_WINDOW (d)))->destroyed)
#define GDK_WINDOW_TYPE(d) \
(((GdkWindowObject*)(GDK_WINDOW (d)))->window_type)
#define GDK_COLORMAP_XCOLORMAP(cmap) \
(gdk_x11_colormap_get_xcolormap (cmap))
#define GDK_DISPLAY_XDISPLAY(display) \
(gdk_x11_display_get_xdisplay (display))
#define GDK_SCREEN_XDISPLAY(screen) \
(gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen)))
#define GDK_PIXMAP_XDISPLAY(win) \
(gdk_x11_drawable_get_xdisplay (((GdkPixmapObject *)win)->impl))
#define GDK_WINDOW_XDISPLAY(win) \
(gdk_x11_drawable_get_xdisplay (((GdkWindowObject *)win)->impl))
#define GDK_SCREEN_XNUMBER(screen) \
(gdk_x11_screen_get_screen_number (screen))
#define GDK_PARENT_RELATIVE_BG ((GdkPixmap *)1L)
#define GDK_NO_BG ((GdkPixmap *)2L)
#define GDK_COLORMAP_XDISPLAY(cmap) (gdk_x11_colormap_get_xdisplay (cmap))
#define GDK_CURSOR_XCURSOR(cursor) (gdk_x11_cursor_get_xcursor (cursor))
#define GDK_CURSOR_XDISPLAY(cursor) (gdk_x11_cursor_get_xdisplay (cursor))
#define GDK_DRAWABLE_XDISPLAY(win) (gdk_x11_drawable_get_xdisplay (win))
#define GDK_DRAWABLE_XID(win) (gdk_x11_drawable_get_xid (win))
#define GDK_PIXMAP_XID(win) (gdk_x11_drawable_get_xid (win))
#define GDK_WINDOW_XID(win) (gdk_x11_drawable_get_xid (win))
#define GDK_WINDOW_XWINDOW(win) (gdk_x11_drawable_get_xid (win))
#define GDK_GC_XDISPLAY(gc) (gdk_x11_gc_get_xdisplay (gc))
#define GDK_GC_XGC(gc) (gdk_x11_gc_get_xgc (gc))
#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
#define GDK_IMAGE_XDISPLAY(image) (gdk_x11_image_get_xdisplay (image))
#define GDK_IMAGE_XIMAGE(image) (gdk_x11_image_get_ximage (image))
#define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen))
#define GDK_VISUAL_XVISUAL(visual) (gdk_x11_visual_get_xvisual (visual))
#define GDK_DISPLAY() gdk_display
extern guint32 gdk_x11_get_server_time(GdkWindow *);
extern gpointer gdk_xid_table_lookup_for_display(GdkDisplay *, XID);
extern GdkVisual *gdk_x11_screen_lookup_visual(GdkScreen *, VisualID);
extern Window gdk_x11_get_default_root_xwindow(void);
extern Visual *gdk_x11_visual_get_xvisual(GdkVisual *);
extern void gdk_x11_display_ungrab(GdkDisplay *);
extern void gdk_x11_register_standard_event_type(GdkDisplay *, gint,
gint);
extern void gdk_window_destroy_notify(GdkWindow *);
extern const gchar *gdk_x11_get_xatom_name(Atom);
extern Atom gdk_x11_get_xatom_by_name_for_display(GdkDisplay *,
const gchar *);
extern GdkColormap *gdk_x11_colormap_foreign_new(GdkVisual *,
Colormap);
extern gboolean gdk_net_wm_supports(GdkAtom);
extern const gchar *gdk_x11_get_xatom_name_for_display(GdkDisplay *,
Atom);
extern GdkVisual *gdkx_visual_get(VisualID);
extern Atom gdk_x11_get_xatom_by_name(const gchar *);
extern gpointer gdk_xid_table_lookup(XID);
extern XID gdk_x11_drawable_get_xid(GdkDrawable *);
extern Display *gdk_x11_gc_get_xdisplay(GdkGC *);
extern Colormap gdk_x11_colormap_get_xcolormap(GdkColormap *);
extern GdkDisplay *gdk_x11_lookup_xdisplay(Display *);
extern GC gdk_x11_gc_get_xgc(GdkGC *);
extern void gdk_x11_grab_server(void);
extern int gdk_x11_screen_get_screen_number(GdkScreen *);
extern const char *gdk_x11_screen_get_window_manager_name(GdkScreen *);
extern GdkAtom gdk_x11_xatom_to_atom_for_display(GdkDisplay *, Atom);
extern Screen *gdk_x11_screen_get_xscreen(GdkScreen *);
extern void gdk_x11_ungrab_server(void);
extern gint gdk_x11_get_default_screen(void);
extern Display *gdk_x11_drawable_get_xdisplay(GdkDrawable *);
extern GdkAtom gdk_x11_xatom_to_atom(Atom);
extern Display *gdk_x11_colormap_get_xdisplay(GdkColormap *);
extern void gdk_x11_window_set_user_time(GdkWindow *, guint32);
extern Atom gdk_x11_atom_to_xatom(GdkAtom);
extern XImage *gdk_x11_image_get_ximage(GdkImage *);
extern Display *gdk_x11_cursor_get_xdisplay(GdkCursor *);
extern void gdk_x11_display_grab(GdkDisplay *);
extern Display *gdk_display;
extern Display *gdk_x11_image_get_xdisplay(GdkImage *);
extern Display *gdk_x11_get_default_xdisplay(void);
extern gboolean gdk_x11_screen_supports_net_wm_hint(GdkScreen *,
GdkAtom);
extern void gdk_synthesize_window_state(GdkWindow *, GdkWindowState,
GdkWindowState);
extern Display *gdk_x11_display_get_xdisplay(GdkDisplay *);
extern Atom gdk_x11_atom_to_xatom_for_display(GdkDisplay *, GdkAtom);
extern Cursor gdk_x11_cursor_get_xcursor(GdkCursor *);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

168
lsb-build/headers/limits.h Normal file
View File

@ -0,0 +1,168 @@
#ifndef _LIMITS_H_
#define _LIMITS_H_
#ifdef __cplusplus
extern "C" {
#endif
#define LLONG_MIN (-LLONG_MAX-1LL)
#if __ia64__
#define LONG_MAX 0x7FFFFFFFFFFFFFFFL
#endif
#if __x86_64__
#define LONG_MAX 0x7FFFFFFFFFFFFFFFL
#endif
#if __i386__
#define LONG_MAX 0x7FFFFFFFL
#endif
#if __ia64__
#define ULONG_MAX 0xFFFFFFFFFFFFFFFFUL
#endif
#if __powerpc64__
#define ULONG_MAX 0xFFFFFFFFFFFFFFFFUL
#endif
#if __x86_64__
#define ULONG_MAX 0xFFFFFFFFFFFFFFFFUL
#endif
#if __s390x__
#define ULONG_MAX 0xFFFFFFFFFFFFFFFFUL
#endif
#if __i386__
#define ULONG_MAX 0xFFFFFFFFUL
#endif
#if __powerpc__ && !__powerpc64__
#define ULONG_MAX 0xFFFFFFFFUL
#endif
#if __s390__ && !__s390x__
#define ULONG_MAX 0xFFFFFFFFUL
#endif
#define ULLONG_MAX 18446744073709551615ULL
#if __s390__ && !__s390x__
#define LONG_MAX 2147483647
#endif
#if __powerpc__ && !__powerpc64__
#define LONG_MAX 2147483647L
#endif
#define OPEN_MAX 256
#define NGROUPS_MAX 32
#define PATH_MAX 4096
#if __powerpc64__
#define LONG_MAX 9223372036854775807L
#endif
#if __s390x__
#define LONG_MAX 9223372036854775807L
#endif
#define LLONG_MAX 9223372036854775807LL
#define SSIZE_MAX LONG_MAX
/* Maximum length of any multibyte character in any locale.*/
#define MB_LEN_MAX 16
/* Number of bits in a `char'.*/
#define SCHAR_MIN (-128)
#if __powerpc__ && !__powerpc64__
#define CHAR_MIN 0
#endif
#if __powerpc64__
#define CHAR_MIN 0
#endif
#if __s390__ && !__s390x__
#define CHAR_MIN 0
#endif
#if __s390x__
#define CHAR_MIN 0
#endif
#if __x86_64__
#define CHAR_MAX 127
#endif
#define SCHAR_MAX 127
#if __powerpc__ && !__powerpc64__
#define CHAR_MAX 255
#endif
#if __powerpc64__
#define CHAR_MAX 255
#endif
#if __s390__ && !__s390x__
#define CHAR_MAX 255
#endif
#if __s390x__
#define CHAR_MAX 255
#endif
#define UCHAR_MAX 255
#define CHAR_BIT 8
#if __i386__
#define CHAR_MAX SCHAR_MAX
#endif
#if __ia64__
#define CHAR_MAX SCHAR_MAX
#endif
#if __i386__
#define CHAR_MIN SCHAR_MIN
#endif
#if __ia64__
#define CHAR_MIN SCHAR_MIN
#endif
#if __x86_64__
#define CHAR_MIN SCHAR_MIN
#endif
/* Minimum and maximum values a `signed short int' can hold.*/
#define SHRT_MIN (-32768)
#define SHRT_MAX 32767
#define USHRT_MAX 65535
/* Minimum and maximum values a `int' can hold.*/
#define INT_MIN (-INT_MAX-1)
#define INT_MAX 2147483647
#define __INT_MAX__ 2147483647
#define UINT_MAX 4294967295U
/* Minimum and maximum values a `long int' can hold.*/
#define LONG_MIN (-LONG_MAX-1L)
/* POSIX Threads values*/
#define PTHREAD_KEYS_MAX 1024
#if __i386__
#define PTHREAD_STACK_MIN 16384
#endif
#if __powerpc__ && !__powerpc64__
#define PTHREAD_STACK_MIN 16384
#endif
#if __powerpc64__
#define PTHREAD_STACK_MIN 16384
#endif
#if __s390__ && !__s390x__
#define PTHREAD_STACK_MIN 16384
#endif
#if __x86_64__
#define PTHREAD_STACK_MIN 16384
#endif
#if __s390x__
#define PTHREAD_STACK_MIN 16384
#endif
#define PTHREAD_THREADS_MAX 16384
#if __ia64__
#define PTHREAD_STACK_MIN 196608
#endif
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,38 @@
#ifndef _PANGO_1_0_PANGO_PANGO_UTILS_H_
#define _PANGO_1_0_PANGO_PANGO_UTILS_H_
#include <stdio.h>
#include <glib-2.0/glib.h>
#include <pango-1.0/pango/pango.h>
#ifdef __cplusplus
extern "C" {
#endif
extern char *pango_trim_string(const char *);
extern gboolean pango_scan_word(const char **, GString *);
extern gboolean pango_skip_space(const char **);
extern gboolean pango_parse_stretch(const char *, PangoStretch *,
gboolean);
extern gboolean pango_scan_int(const char **, int *);
extern gboolean pango_parse_weight(const char *, PangoWeight *,
gboolean);
extern gint pango_read_line(FILE *, GString *);
extern gboolean pango_log2vis_get_embedding_levels(gunichar *, gint,
PangoDirection *,
guint8 *);
extern const char *pango_language_get_sample_string(PangoLanguage *);
extern gboolean pango_parse_style(const char *, PangoStyle *,
gboolean);
extern gboolean pango_scan_string(const char **, GString *);
extern gboolean pango_parse_variant(const char *, PangoVariant *,
gboolean);
extern char **pango_split_file_list(const char *);
#ifdef __cplusplus
}
#endif
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,61 @@
#ifndef _PANGO_1_0_PANGO_PANGOFC_DECODER_H_
#define _PANGO_1_0_PANGO_PANGOFC_DECODER_H_
#include <fontconfig/fontconfig.h>
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#include <pango-1.0/pango/pango.h>
#include <pango-1.0/pango/pangoxft.h>
#include <pango-1.0/pango/pangoft2.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PANGO_FC_DECODER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_DECODER, \
PangoFcDecoderClass))
#define PANGO_IS_FC_DECODER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_DECODER))
#define PANGO_FC_DECODER(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_DECODER, \
PangoFcDecoder))
#define PANGO_IS_FC_DECODER(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_DECODER))
#define PANGO_FC_DECODER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_DECODER, \
PangoFcDecoderClass))
#define PANGO_TYPE_FC_DECODER (pango_fc_decoder_get_type())
typedef struct _PangoFcDecoder PangoFcDecoder;
typedef struct _PangoFcDecoderClass PangoFcDecoderClass;
struct _PangoFcDecoder {
GObject parent_instance;
};
struct _PangoFcDecoderClass {
GObjectClass parent_class;
FcCharSet *(*get_charset) (PangoFcDecoder *, PangoFcFont *);
PangoGlyph(*get_glyph) (PangoFcDecoder *, PangoFcFont *, guint32);
void (*_pango_reserved1) (void);
void (*_pango_reserved2) (void);
void (*_pango_reserved3) (void);
void (*_pango_reserved4) (void);
};
extern FcCharSet *pango_fc_decoder_get_charset(PangoFcDecoder *,
PangoFcFont *);
extern PangoGlyph pango_fc_decoder_get_glyph(PangoFcDecoder *,
PangoFcFont *, guint32);
extern GType pango_fc_decoder_get_type(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,47 @@
#ifndef _PANGO_1_0_PANGO_PANGOFC_FONTMAP_H_
#define _PANGO_1_0_PANGO_PANGOFC_FONTMAP_H_
#include <fontconfig/fontconfig.h>
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#include <pango-1.0/pango/pango.h>
#include <pango-1.0/pango/pangofc-decoder.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PANGO_FC_FONT_MAP(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT_MAP, \
PangoFcFontMap))
#define PANGO_IS_FC_FONT_MAP(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT_MAP))
#define PANGO_TYPE_FC_FONT_MAP (pango_fc_font_map_get_type ())
typedef struct _PangoFcFontMap PangoFcFontMap;
typedef PangoFcDecoder *(*PangoFcDecoderFindFunc) (FcPattern *,
gpointer);
typedef struct _PangoFcFontMapClass PangoFcFontMapClass;
extern void pango_fc_font_map_add_decoder_find_func(PangoFcFontMap *,
PangoFcDecoderFindFunc,
gpointer,
GDestroyNotify);
extern PangoFontDescription
*pango_fc_font_description_from_pattern(FcPattern *, gboolean);
extern GType pango_fc_font_map_get_type(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,71 @@
#ifndef _PANGO_1_0_PANGO_PANGOFT2_H_
#define _PANGO_1_0_PANGO_PANGOFT2_H_
#include <fontconfig/fontconfig.h>
#include <fontconfig/fcfreetype.h>
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#include <pango-1.0/pango/pango.h>
#include <pango-1.0/pango/pangoxft.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PANGO_FC_FONT(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT, \
PangoFcFont))
#define PANGO_FT2_FONT_MAP(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT_MAP, \
PangoFT2FontMap))
#define PANGO_IS_FC_FONT(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT))
#define PANGO_FT2_IS_FONT_MAP(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_FONT_MAP))
#define PANGO_TYPE_FC_FONT (pango_fc_font_get_type ())
#define PANGO_TYPE_FT2_FONT_MAP (pango_ft2_font_map_get_type ())
typedef struct _PangoFT2FontMap PangoFT2FontMap;
typedef void (*PangoFT2SubstituteFunc) (FcPattern *, gpointer);
extern void pango_ft2_font_map_set_default_substitute(PangoFT2FontMap
*,
PangoFT2SubstituteFunc,
gpointer,
GDestroyNotify);
extern void pango_fc_font_unlock_face(PangoFcFont *);
extern GType pango_ft2_font_map_get_type(void);
extern void pango_ft2_render_transformed(FT_Bitmap *,
const PangoMatrix *,
PangoFont *,
PangoGlyphString *, int, int);
extern PangoContext *pango_ft2_font_map_create_context(PangoFT2FontMap
*);
extern void pango_ft2_render_layout_subpixel(FT_Bitmap *,
PangoLayout *, int, int);
extern void pango_ft2_render_layout(FT_Bitmap *, PangoLayout *, int,
int);
extern void pango_ft2_font_map_set_resolution(PangoFT2FontMap *,
double, double);
extern void pango_ft2_render(FT_Bitmap *, PangoFont *,
PangoGlyphString *, int, int);
extern void pango_ft2_font_map_substitute_changed(PangoFT2FontMap *);
extern void pango_ft2_render_layout_line(FT_Bitmap *,
PangoLayoutLine *, int, int);
extern GType pango_fc_font_get_type(void);
extern void pango_ft2_render_layout_line_subpixel(FT_Bitmap *,
PangoLayoutLine *,
int, int);
extern FT_Face pango_fc_font_lock_face(PangoFcFont *);
extern PangoFontMap *pango_ft2_font_map_new(void);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,117 @@
#ifndef _PANGO_1_0_PANGO_PANGOXFT_H_
#define _PANGO_1_0_PANGO_PANGOXFT_H_
#include <X11/Xlib.h>
#include <fontconfig/fontconfig.h>
#include <glib-2.0/glib.h>
#include <glib-2.0/glib-object.h>
#include <pango-1.0/pango/pango.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PANGO_XFT_RENDERER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_XFT_RENDERER, \
PangoXftRendererClass))
#define PANGO_IS_XFT_RENDERER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_XFT_RENDERER))
#define PANGO_XFT_FONT(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT, \
PangoXftFont))
#define PANGO_XFT_FONT_MAP(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_FONT_MAP, \
PangoXftFontMap))
#define PANGO_XFT_RENDERER(object) \
(G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_XFT_RENDERER, \
PangoXftRenderer))
#define PANGO_XFT_IS_FONT(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT))
#define PANGO_XFT_IS_FONT_MAP(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_FONT_MAP))
#define PANGO_IS_XFT_RENDERER(object) \
(G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_XFT_RENDERER))
#define PANGO_XFT_RENDERER_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_XFT_RENDERER, \
PangoXftRendererClass))
#define PANGO_TYPE_XFT_FONT (pango_xft_font_get_type ())
#define PANGO_TYPE_XFT_FONT_MAP (pango_xft_font_map_get_type ())
#define PANGO_TYPE_XFT_RENDERER (pango_xft_renderer_get_type())
#define PANGO_RENDER_TYPE_XFT "PangoRenderXft"
typedef struct _PangoXftRenderer PangoXftRenderer;
typedef void (*PangoXftSubstituteFunc) (FcPattern *, gpointer);
typedef struct _PangoXftFontMap PangoXftFontMap;
typedef struct _PangoXftRendererClass PangoXftRendererClass;
typedef struct _PangoFcFontClass PangoFcFontClass;
typedef struct _PangoFcFont PangoFcFont;
typedef struct _PangoXftFont PangoXftFont;
typedef struct _PangoXftRendererPrivate PangoXftRendererPrivate;
struct _PangoXftRendererClass {
PangoRendererClass parent_class;
void (*composite_trapezoids) (PangoXftRenderer *, PangoRenderPart,
XTrapezoid *, int);
void (*composite_glyphs) (PangoXftRenderer *, XftFont *,
XftGlyphSpec *, int);
};
extern void pango_xft_substitute_changed(Display *, int);
extern void pango_xft_render(XftDraw *, XftColor *, PangoFont *,
PangoGlyphString *, gint, gint);
extern PangoRenderer *pango_xft_renderer_new(Display *, int);
extern GType pango_xft_renderer_get_type(void);
extern void pango_xft_renderer_set_default_color(PangoXftRenderer *,
PangoColor *);
extern GType pango_xft_font_get_type(void);
extern void pango_xft_picture_render(Display *, Picture, Picture,
PangoFont *, PangoGlyphString *,
gint, gint);
extern void pango_xft_render_layout(XftDraw *, XftColor *,
PangoLayout *, int, int);
extern void pango_xft_render_transformed(XftDraw *, XftColor *,
PangoMatrix *, PangoFont *,
PangoGlyphString *, int, int);
extern void pango_xft_renderer_set_draw(PangoXftRenderer *, XftDraw *);
extern void pango_xft_render_layout_line(XftDraw *, XftColor *,
PangoLayoutLine *, int, int);
extern void pango_xft_shutdown_display(Display *, int);
extern PangoFontMap *pango_xft_get_font_map(Display *, int);
extern PangoContext *pango_xft_get_context(Display *, int);
extern GType pango_xft_font_map_get_type(void);
extern void pango_xft_set_default_substitute(Display *, int,
PangoXftSubstituteFunc,
gpointer, GDestroyNotify);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,92 @@
#ifndef _STDDEF_H_
#define _STDDEF_H_
#ifdef __cplusplus
extern "C" {
#endif
#define offsetof(TYPE,MEMBER) ((size_t)&((TYPE*)0)->MEMBER)
#define NULL (0L)
#if !defined(__cplusplus)
typedef int wchar_t;
#endif
#if __ia64__
/* IA64 */
typedef long int ptrdiff_t;
#endif
#if __i386__
/* IA32 */
typedef unsigned int size_t;
#endif
#if __ia64__
/* IA64 */
typedef unsigned long int size_t;
#endif
#if __powerpc__ && !__powerpc64__
/* PPC32 */
typedef unsigned int size_t;
#endif
#if __powerpc64__
/* PPC64 */
typedef unsigned long int size_t;
#endif
#if __s390__ && !__s390x__
/* S390 */
typedef unsigned long int size_t;
#endif
#if __i386__
/* IA32 */
typedef int ptrdiff_t;
#endif
#if __powerpc__ && !__powerpc64__
/* PPC32 */
typedef int ptrdiff_t;
#endif
#if __s390__ && !__s390x__
/* S390 */
typedef int ptrdiff_t;
#endif
#if __powerpc64__
/* PPC64 */
typedef long int ptrdiff_t;
#endif
#if __s390x__
/* S390X */
typedef unsigned long int size_t;
#endif
#if __x86_64__
/* x86-64 */
typedef long int ptrdiff_t;
#endif
#if __x86_64__
/* x86-64 */
typedef unsigned long int size_t;
#endif
#if __s390x__
/* S390X */
typedef long int ptrdiff_t;
#endif
#ifdef __cplusplus
}
#endif
#endif

166
lsb-build/headers/stdio.h Normal file
View File

@ -0,0 +1,166 @@
#ifndef _STDIO_H_
#define _STDIO_H_
#include <sys/types.h>
#include <unistd.h>
#include <wctype.h>
#include <stddef.h>
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
#define EOF (-1)
#define P_tmpdir "/tmp"
#if __i386__
#define __IO_FILE_SIZE 148
#endif
#if __powerpc__ && !__powerpc64__
#define __IO_FILE_SIZE 152
#endif
#if __s390__ && !__s390x__
#define __IO_FILE_SIZE 152
#endif
#define FOPEN_MAX 16
#define L_tmpnam 20
#if __ia64__
#define __IO_FILE_SIZE 216
#endif
#if __powerpc64__
#define __IO_FILE_SIZE 216
#endif
#if __x86_64__
#define __IO_FILE_SIZE 216
#endif
#if __s390x__
#define __IO_FILE_SIZE 216
#endif
#define FILENAME_MAX 4096
#define BUFSIZ 8192
#define L_ctermid 9
#define L_cuserid 9
typedef struct {
off_t __pos;
mbstate_t __state;
} fpos_t;
typedef struct {
off64_t __pos;
mbstate_t __state;
} fpos64_t;
struct _IO_FILE {
char dummy[__IO_FILE_SIZE];
};
/* The opaque type of streams.*/
typedef struct _IO_FILE FILE;
/* The possibilities for the third argument to `setvbuf'.*/
#define _IOFBF 0
#define _IOLBF 1
#define _IONBF 2
/* The possibilities for the third argument to `fseek'.*/
/* End of file character.*/
extern char *const _sys_errlist[128];
extern void clearerr(FILE *);
extern int fclose(FILE *);
extern FILE *fdopen(int, const char *);
extern int fflush_unlocked(FILE *);
extern int fileno(FILE *);
extern FILE *fopen(const char *, const char *);
extern int fprintf(FILE *, const char *, ...);
extern int fputc(int, FILE *);
extern FILE *freopen(const char *, const char *, FILE *);
extern FILE *freopen64(const char *, const char *, FILE *);
extern int fscanf(FILE *, const char *, ...);
extern int fseek(FILE *, long int, int);
extern int fseeko(FILE *, off_t, int);
extern int fseeko64(FILE *, loff_t, int);
extern off_t ftello(FILE *);
extern loff_t ftello64(FILE *);
extern int getchar(void);
extern int getchar_unlocked(void);
extern int getw(FILE *);
extern int pclose(FILE *);
extern void perror(const char *);
extern FILE *popen(const char *, const char *);
extern int printf(const char *, ...);
extern int putc_unlocked(int, FILE *);
extern int putchar(int);
extern int putchar_unlocked(int);
extern int putw(int, FILE *);
extern int remove(const char *);
extern void rewind(FILE *);
extern int scanf(const char *, ...);
extern void setbuf(FILE *, char *);
extern int sprintf(char *, const char *, ...);
extern int sscanf(const char *, const char *, ...);
extern FILE *stderr;
extern FILE *stdin;
extern FILE *stdout;
extern char *tempnam(const char *, const char *);
extern FILE *tmpfile64(void);
extern FILE *tmpfile(void);
extern char *tmpnam(char *);
extern int vfprintf(FILE *, const char *, va_list);
extern int vprintf(const char *, va_list);
extern int feof(FILE *);
extern int ferror(FILE *);
extern int fflush(FILE *);
extern int fgetc(FILE *);
extern int fgetpos(FILE *, fpos_t *);
extern char *fgets(char *, int, FILE *);
extern int fputs(const char *, FILE *);
extern size_t fread(void *, size_t, size_t, FILE *);
extern int fsetpos(FILE *, const fpos_t *);
extern long int ftell(FILE *);
extern size_t fwrite(const void *, size_t, size_t, FILE *);
extern int getc(FILE *);
extern char *gets(char *);
extern int putc(int, FILE *);
extern int puts(const char *);
extern int setvbuf(FILE *, char *, int, size_t);
extern int snprintf(char *, size_t, const char *, ...);
extern int ungetc(int, FILE *);
extern int vsnprintf(char *, size_t, const char *, va_list);
extern int vsprintf(char *, const char *, va_list);
extern void flockfile(FILE *);
extern int asprintf(char **, const char *, ...);
extern int fgetpos64(FILE *, fpos64_t *);
extern FILE *fopen64(const char *, const char *);
extern int fsetpos64(FILE *, const fpos64_t *);
extern int ftrylockfile(FILE *);
extern void funlockfile(FILE *);
extern int getc_unlocked(FILE *);
extern void setbuffer(FILE *, char *, size_t);
extern int vasprintf(char **, const char *, va_list);
extern int vdprintf(int, const char *, va_list);
extern int vfscanf(FILE *, const char *, va_list);
extern int vscanf(const char *, va_list);
extern int vsscanf(const char *, const char *, va_list);
extern size_t __fpending(FILE *);
#ifdef __cplusplus
}
#endif
#endif

145
lsb-build/headers/stdlib.h Normal file
View File

@ -0,0 +1,145 @@
#ifndef _STDLIB_H_
#define _STDLIB_H_
#include <sys/types.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#define MB_CUR_MAX (__ctype_get_mb_cur_max())
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#define RAND_MAX 2147483647
typedef int (*__compar_fn_t) (const void *, const void *);
struct random_data {
int32_t *fptr; /* Front pointer. */
int32_t *rptr; /* Rear pointer. */
int32_t *state; /* Array of state values. */
int rand_type; /* Type of random number generator. */
int rand_deg; /* Degree of random number generator. */
int rand_sep; /* Distance between front and rear. */
int32_t *end_ptr; /* Pointer behind state table. */
};
/* Returned by `div'.*/
typedef struct {
int quot;
int rem;
} div_t;
/* Returned by `ldiv'.*/
typedef struct {
long int quot;
long int rem;
} ldiv_t;
/* Returned by `lldiv'.*/
typedef struct {
long long int quot;
long long int rem;
} lldiv_t;
extern double __strtod_internal(const char *, char **, int);
extern float __strtof_internal(const char *, char **, int);
extern long int __strtol_internal(const char *, char **, int, int);
extern long double __strtold_internal(const char *, char **, int);
extern long long int __strtoll_internal(const char *, char **, int,
int);
extern unsigned long int __strtoul_internal(const char *, char **, int,
int);
extern unsigned long long int __strtoull_internal(const char *,
char **, int, int);
extern long int a64l(const char *);
extern void abort(void);
extern int abs(int);
extern int atexit(void (*)(void)
);
extern double atof(const char *);
extern int atoi(const char *);
extern long int atol(const char *);
extern long long int atoll(const char *);
extern void *bsearch(const void *, const void *, size_t, size_t,
__compar_fn_t);
extern div_t div(int, int);
extern double drand48(void);
extern char *ecvt(double, int, int *, int *);
extern double erand48(unsigned short[3]);
extern void exit(int);
extern char *fcvt(double, int, int *, int *);
extern char *gcvt(double, int, char *);
extern char *getenv(const char *);
extern int getsubopt(char **, char *const *, char **);
extern int grantpt(int);
extern long int jrand48(unsigned short[3]);
extern char *l64a(long int);
extern long int labs(long int);
extern void lcong48(unsigned short[7]);
extern ldiv_t ldiv(long int, long int);
extern long long int llabs(long long int);
extern lldiv_t lldiv(long long int, long long int);
extern long int lrand48(void);
extern int mblen(const char *, size_t);
extern size_t mbstowcs(wchar_t *, const char *, size_t);
extern int mbtowc(wchar_t *, const char *, size_t);
extern char *mktemp(char *);
extern long int mrand48(void);
extern long int nrand48(unsigned short[3]);
extern char *ptsname(int);
extern int putenv(char *);
extern void qsort(void *, size_t, size_t, const __compar_fn_t);
extern int rand(void);
extern int rand_r(unsigned int *);
extern unsigned short *seed48(unsigned short[]);
extern void srand48(long int);
extern int unlockpt(int);
extern size_t wcstombs(char *, const wchar_t *, size_t);
extern int wctomb(char *, wchar_t);
extern int system(const char *);
extern void *calloc(size_t, size_t);
extern void free(void *);
extern char *initstate(unsigned int, char *, size_t);
extern void *malloc(size_t);
extern long int random(void);
extern void *realloc(void *, size_t);
extern char *setstate(char *);
extern void srand(unsigned int);
extern void srandom(unsigned int);
extern double strtod(const char *, char **);
extern float strtof(const char *, char **);
extern long int strtol(const char *, char **, int);
extern long double strtold(const char *, char **);
extern long long int strtoll(const char *, char **, int);
extern long long int strtoq(const char *, char **, int);
extern unsigned long int strtoul(const char *, char **, int);
extern unsigned long long int strtoull(const char *, char **, int);
extern unsigned long long int strtouq(const char *, char **, int);
extern void _Exit(int);
extern size_t __ctype_get_mb_cur_max(void);
extern char **environ;
extern char *realpath(const char *, char *);
extern int setenv(const char *, const char *, int);
extern int unsetenv(const char *);
extern int getloadavg(double[], int);
extern int mkstemp64(char *);
extern int posix_memalign(void **, size_t, size_t);
extern int posix_openpt(int);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,63 @@
#ifndef _STRING_H_
#define _STRING_H_
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
extern void *__mempcpy(void *, const void *, size_t);
extern char *__stpcpy(char *, const char *);
extern char *__strtok_r(char *, const char *, char **);
extern void bcopy(const void *, void *, size_t);
extern void *memchr(const void *, int, size_t);
extern int memcmp(const void *, const void *, size_t);
extern void *memcpy(void *, const void *, size_t);
extern void *memmem(const void *, size_t, const void *, size_t);
extern void *memmove(void *, const void *, size_t);
extern void *memset(void *, int, size_t);
extern char *strcat(char *, const char *);
extern char *strchr(const char *, int);
extern int strcmp(const char *, const char *);
extern int strcoll(const char *, const char *);
extern char *strcpy(char *, const char *);
extern size_t strcspn(const char *, const char *);
extern char *strerror(int);
extern size_t strlen(const char *);
extern char *strncat(char *, const char *, size_t);
extern int strncmp(const char *, const char *, size_t);
extern char *strncpy(char *, const char *, size_t);
extern char *strpbrk(const char *, const char *);
extern char *strrchr(const char *, int);
extern char *strsignal(int);
extern size_t strspn(const char *, const char *);
extern char *strstr(const char *, const char *);
extern char *strtok(char *, const char *);
extern size_t strxfrm(char *, const char *, size_t);
extern int bcmp(const void *, const void *, size_t);
extern void bzero(void *, size_t);
extern int ffs(int);
extern char *index(const char *, int);
extern void *memccpy(void *, const void *, int, size_t);
extern char *rindex(const char *, int);
extern int strcasecmp(const char *, const char *);
extern char *strdup(const char *);
extern int strncasecmp(const char *, const char *, size_t);
extern char *strndup(const char *, size_t);
extern size_t strnlen(const char *, size_t);
extern char *strsep(char **, const char *);
extern char *strerror_r(int, char *, size_t);
extern char *strtok_r(char *, const char *, char **);
extern char *strcasestr(const char *, const char *);
extern char *stpcpy(char *, const char *);
extern char *stpncpy(char *, const char *, size_t);
extern void *memrchr(const void *, int, size_t);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,110 @@
#ifndef _SYS_RESOURCE_H_
#define _SYS_RESOURCE_H_
#include <sys/types.h>
#include <sys/time.h>
#ifdef __cplusplus
extern "C" {
#endif
#define RUSAGE_CHILDREN (-1)
#define RUSAGE_BOTH (-2)
#define RLIM_INFINITY (~0UL)
#define RLIM_SAVED_CUR -1
#define RLIM_SAVED_MAX -1
#define RLIMIT_CPU 0
#define RUSAGE_SELF 0
#define RLIMIT_FSIZE 1
#define RLIMIT_LOCKS 10
#define RLIM_NLIMITS 11
#define RLIMIT_DATA 2
#define RLIMIT_STACK 3
#define RLIMIT_CORE 4
#define RLIMIT_RSS 5
#define RLIMIT_NPROC 6
#define RLIMIT_NOFILE 7
#define RLIMIT_MEMLOCK 8
#define RLIMIT_AS 9
typedef unsigned long int rlim_t;
typedef unsigned long long int rlim64_t;
typedef int __rlimit_resource_t;
struct rlimit {
rlim_t rlim_cur; /* The current (soft) limit. */
rlim_t rlim_max; /* The hard limit. */
};
struct rlimit64 {
rlim64_t rlim_cur; /* The current (soft) limit. */
rlim64_t rlim_max; /* The hard limit. */
};
struct rusage {
struct timeval ru_utime; /* Total amount of user time used. */
struct timeval ru_stime; /* Total amount of system time used. */
long int ru_maxrss; /* Maximum resident set size (in kilobytes). */
long int ru_ixrss; /* Amount of sharing of text segment memory with other p */
long int ru_idrss; /* Amount of data segment memory used (kilobyte-seconds). */
long int ru_isrss; /* Amount of stack memory used (kilobyte-seconds). */
long int ru_minflt; /* Number of soft page faults (i.e. those serviced by reclaimin */
long int ru_majflt; /* Number of hard page faults (i.e. those that required I/O). */
long int ru_nswap; /* Number of times a process was swapped out of physical memory */
long int ru_inblock; /* Number of input operations via the file system. Note: This */
long int ru_oublock; /* Number of output operations via the file system. */
long int ru_msgsnd; /* Number of IPC messages sent. */
long int ru_msgrcv; /* Number of IPC messages received. */
long int ru_nsignals; /* Number of signals delivered. */
long int ru_nvcsw; /* Number of voluntary context switches, i.e. because the proce */
long int ru_nivcsw; /* Number of involuntary context switches, i.e. a higher priori */
};
/* Priority limits.*/
/* The type of the WHICH argument to `getpriority' and `setpriority',
indicating what flavor of entity the WHO argument specifies.*/
enum __priority_which {
PRIO_PROCESS = 0, /* WHO is a process ID. */
PRIO_PGRP = 1, /* WHO is a process group ID. */
PRIO_USER = 2 /* WHO is a user ID. */
};
#define PRIO_PGRP PRIO_PGRP
#define PRIO_PROCESS PRIO_PROCESS
#define PRIO_USER PRIO_USER
typedef enum __priority_which __priority_which_t;
extern int getpriority(__priority_which_t, id_t);
extern int getrlimit64(id_t, struct rlimit64 *);
extern int setpriority(__priority_which_t, id_t, int);
extern int setrlimit(__rlimit_resource_t, const struct rlimit *);
extern int setrlimit64(__rlimit_resource_t, const struct rlimit64 *);
extern int getrlimit(__rlimit_resource_t, struct rlimit *);
extern int getrusage(int, struct rusage *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,17 @@
#ifndef _SYS_SELECT_H_
#define _SYS_SELECT_H_
#ifdef __cplusplus
extern "C" {
#endif
#define NFDBITS (8 * sizeof (long))
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,69 @@
#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2
struct timezone {
int tz_minuteswest;
int tz_dsttime;
};
/* Values for the first argument to `getitimer' and `setitimer'.*/
typedef int __itimer_which_t;
struct timespec {
time_t tv_sec;
long int tv_nsec;
};
struct timeval {
time_t tv_sec;
suseconds_t tv_usec;
};
/* Type of the second argument to `getitimer' and
the second and third arguments `setitimer'.*/
struct itimerval {
struct timeval it_interval;
struct timeval it_value;
};
extern int getitimer(__itimer_which_t, struct itimerval *);
extern int setitimer(__itimer_which_t, const struct itimerval *,
struct itimerval *);
extern int adjtime(const struct timeval *, struct timeval *);
extern int gettimeofday(struct timeval *, struct timezone *);
extern int utimes(const char *, const struct timeval *);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,249 @@
#ifndef _SYS_TYPES_H_
#define _SYS_TYPES_H_
#ifdef __cplusplus
extern "C" {
#endif
#define FALSE 0
#define TRUE 1
#define FD_SETSIZE 1024
#define FD_ZERO(fdsetp) bzero(fdsetp, sizeof(*(fdsetp)))
#define FD_ISSET(d,set) \
((set)->fds_bits[((d)/(8*sizeof(long)))]&(1<<((d)%(8*sizeof(long)))))
#define FD_CLR(d,set) \
((set)->fds_bits[((d)/(8*sizeof(long)))]&=~(1<<((d)%(8*sizeof(long)))))
#define FD_SET(d,set) \
((set)->fds_bits[((d)/(8*sizeof(long)))]|=(1<<((d)%(8*sizeof(long)))))
typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
#if __i386__
/* IA32 */
typedef long long int int64_t;
#endif
typedef unsigned char u_int8_t;
typedef unsigned short u_int16_t;
typedef unsigned int u_int32_t;
typedef unsigned int uid_t;
typedef int pid_t;
typedef long int off_t;
typedef int key_t;
typedef long int suseconds_t;
typedef unsigned int u_int;
typedef struct {
int __val[2];
} fsid_t;
typedef unsigned int useconds_t;
typedef unsigned long int blksize_t;
typedef long int fd_mask;
typedef int timer_t;
typedef int clockid_t;
#if __ia64__
/* IA64 */
typedef long int int64_t;
#endif
#if __powerpc64__
/* PPC64 */
typedef long int int64_t;
#endif
#if __x86_64__
/* x86-64 */
typedef long int int64_t;
#endif
#if __s390x__
/* S390X */
typedef long int int64_t;
#endif
#if __powerpc__ && !__powerpc64__
/* PPC32 */
typedef long long int int64_t;
#endif
#if __s390__ && !__s390x__
/* S390 */
typedef long long int int64_t;
#endif
/* These types are derived from the ones above*/
#if __i386__
/* IA32 */
typedef int32_t ssize_t;
#endif
typedef unsigned int id_t;
#if __powerpc__ && !__powerpc64__
/* PPC32 */
typedef int32_t ssize_t;
#endif
#if __ia64__
/* IA64 */
typedef int64_t ssize_t;
#endif
#if __s390__ && !__s390x__
/* S390 */
typedef int32_t ssize_t;
#endif
#if __powerpc64__
/* PPC64 */
typedef int64_t ssize_t;
#endif
#if __x86_64__
/* x86-64 */
typedef int64_t ssize_t;
#endif
#if __s390x__
/* S390X */
typedef int64_t ssize_t;
#endif
/* Stuff that really in bits/types.h*/
typedef unsigned long long int ino64_t;
typedef long long int loff_t;
typedef unsigned long int blkcnt_t;
typedef unsigned long int fsblkcnt_t;
typedef unsigned long int fsfilcnt_t;
typedef unsigned long long int blkcnt64_t;
typedef unsigned long long int fsblkcnt64_t;
typedef unsigned long long int fsfilcnt64_t;
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned long int u_long;
/* Stuff really in linux/types.h*/
typedef unsigned long int ino_t;
typedef unsigned int gid_t;
typedef unsigned long long int dev_t;
typedef unsigned int mode_t;
typedef unsigned long int nlink_t;
typedef char *caddr_t;
#if __ia64__
#define __FDSET_LONGS 16
#endif
#if __powerpc64__
#define __FDSET_LONGS 16
#endif
#if __x86_64__
#define __FDSET_LONGS 16
#endif
#if __s390x__
#define __FDSET_LONGS 16
#endif
#if __i386__
#define __FDSET_LONGS 32
#endif
#if __powerpc__ && !__powerpc64__
#define __FDSET_LONGS 32
#endif
#if __s390__ && !__s390x__
#define __FDSET_LONGS 32
#endif
typedef struct {
unsigned long int fds_bits[__FDSET_LONGS];
} fd_set;
/* Time related types*/
typedef long int clock_t;
typedef long int time_t;
/* Setup some values*/
#define __LITTLE_ENDIAN 1234
#define __BIG_ENDIAN 4321
/* Per Architecture settings*/
#if __powerpc__ && !__powerpc64__
#define __BYTE_ORDER __BIG_ENDIAN
#endif
#if __powerpc64__
#define __BYTE_ORDER __BIG_ENDIAN
#endif
#if __s390__ && !__s390x__
#define __BYTE_ORDER __BIG_ENDIAN
#endif
#if __s390x__
#define __BYTE_ORDER __BIG_ENDIAN
#endif
#if __i386__
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
#if __ia64__
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
#if __x86_64__
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,38 @@
#ifndef _SYS_WAIT_H_
#define _SYS_WAIT_H_
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/time.h>
#ifdef __cplusplus
extern "C" {
#endif
#define WIFSIGNALED(status) (!WIFSTOPPED(status) && !WIFEXITED(status))
#define WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
#define WEXITSTATUS(status) (((status) & 0xff00) >> 8)
#define WTERMSIG(status) ((status) & 0x7f)
#define WCOREDUMP(status) ((status) & 0x80)
#define WIFEXITED(status) (WTERMSIG(status) == 0)
#define WNOHANG 0x00000001
#define WUNTRACED 0x00000002
#define WCOREFLAG 0x80
#define WSTOPSIG(status) WEXITSTATUS(status)
typedef enum {
P_ALL,
P_PID,
P_PGID
} idtype_t;
extern pid_t wait(int *);
extern pid_t waitpid(pid_t, int *, int);
extern pid_t wait4(pid_t, int *, int, struct rusage *);
#ifdef __cplusplus
}
#endif
#endif

100
lsb-build/headers/time.h Normal file
View File

@ -0,0 +1,100 @@
#ifndef _TIME_H_
#define _TIME_H_
#include <signal.h>
#include <sys/types.h>
#include <sys/time.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#define CLK_TCK ((clock_t)__sysconf(2))
#define CLOCK_REALTIME 0
#define TIMER_ABSTIME 1
#define CLOCKS_PER_SEC 1000000l
struct tm {
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
long int tm_gmtoff;
char *tm_zone;
};
struct itimerspec {
struct timespec it_interval;
struct timespec it_value;
};
/* Returned by clock()*/
/* Returned by `time'*/
/* POSIX.1b structure for a time value.*/
/* Used by other time functions.*/
extern int __daylight;
extern long int __timezone;
extern char *__tzname[2];
extern char *asctime(const struct tm *);
extern clock_t clock(void);
extern char *ctime(const time_t *);
extern char *ctime_r(const time_t *, char *);
extern double difftime(time_t, time_t);
extern struct tm *getdate(const char *);
extern int getdate_err;
extern struct tm *gmtime(const time_t *);
extern struct tm *localtime(const time_t *);
extern time_t mktime(struct tm *);
extern int stime(const time_t *);
extern size_t strftime(char *, size_t, const char *,
const struct tm *);
extern char *strptime(const char *, const char *, struct tm *);
extern time_t time(time_t *);
extern int nanosleep(const struct timespec *, struct timespec *);
extern int daylight;
extern long int timezone;
extern char *tzname[2];
extern void tzset(void);
extern char *asctime_r(const struct tm *, char *);
extern struct tm *gmtime_r(const time_t *, struct tm *);
extern struct tm *localtime_r(const time_t *, struct tm *);
extern int clock_getcpuclockid(pid_t, clockid_t *);
extern int clock_getres(clockid_t, struct timespec *);
extern int clock_gettime(clockid_t, struct timespec *);
extern int clock_nanosleep(clockid_t, int, const struct timespec *,
struct timespec *);
extern int clock_settime(clockid_t, const struct timespec *);
extern int timer_create(clockid_t, struct sigevent *, timer_t *);
extern int timer_delete(timer_t);
extern int timer_getoverrun(timer_t);
extern int timer_gettime(timer_t, struct itimerspec *);
extern int timer_settime(timer_t, int, const struct itimerspec *,
struct itimerspec *);
#ifdef __cplusplus
}
#endif
#endif

372
lsb-build/headers/unistd.h Normal file
View File

@ -0,0 +1,372 @@
#ifndef _UNISTD_H_
#define _UNISTD_H_
#include <sys/types.h>
#include <sys/time.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#define SEEK_SET 0
#define STDIN_FILENO 0
#define SEEK_CUR 1
#define STDOUT_FILENO 1
#define SEEK_END 2
#define STDERR_FILENO 2
typedef long long int off64_t;
#if __i386__
/* IA32 */
typedef int intptr_t;
#endif
#if __ia64__
/* IA64 */
typedef long int intptr_t;
#endif
#if __powerpc64__
/* PPC64 */
typedef long int intptr_t;
#endif
#if __powerpc__ && !__powerpc64__
/* PPC32 */
typedef int intptr_t;
#endif
#if __s390__ && !__s390x__
/* S390 */
typedef int intptr_t;
#endif
#if __x86_64__
/* x86-64 */
typedef long int intptr_t;
#endif
/* Values for the second argument to access.*/
#define F_OK 0
#define X_OK 1
#define W_OK 2
#define R_OK 4
#define _POSIX_VDISABLE '\0'
#define _POSIX_CHOWN_RESTRICTED 1
#define _POSIX_JOB_CONTROL 1
#define _POSIX_NO_TRUNC 1
#define _POSIX_SHELL 1
#define _POSIX_FSYNC 200112
#define _POSIX_MAPPED_FILES 200112
#define _POSIX_MEMLOCK 200112
#define _POSIX_MEMLOCK_RANGE 200112
#define _POSIX_MEMORY_PROTECTION 200112
#define _POSIX_SEMAPHORES 200112
#define _POSIX_SHARED_MEMORY_OBJECTS 200112
#define _POSIX_TIMERS 200112
#define _POSIX2_C_BIND 200112L
#define _POSIX2_VERSION 200112L
#define _POSIX_THREADS 200112L
#define _POSIX_VERSION 200112L
/* `pathconf' NAME values.*/
#define _PC_LINK_MAX 0
#define _PC_MAX_CANON 1
#define _PC_ASYNC_IO 10
#define _PC_PRIO_IO 11
#define _PC_FILESIZEBITS 13
#define _PC_REC_INCR_XFER_SIZE 14
#define _PC_REC_MIN_XFER_SIZE 16
#define _PC_REC_XFER_ALIGN 17
#define _PC_ALLOC_SIZE_MIN 18
#define _PC_MAX_INPUT 2
#define _PC_2_SYMLINKS 20
#define _PC_NAME_MAX 3
#define _PC_PATH_MAX 4
#define _PC_PIPE_BUF 5
#define _PC_CHOWN_RESTRICTED 6
#define _PC_NO_TRUNC 7
#define _PC_VDISABLE 8
#define _PC_SYNC_IO 9
/* `sysconf' NAME values.*/
#define _SC_ARG_MAX 0
#define _SC_CHILD_MAX 1
#define _SC_PRIORITY_SCHEDULING 10
#define _SC_TIMERS 11
#define _SC_ASYNCHRONOUS_IO 12
#define _SC_XBS5_ILP32_OFF32 125
#define _SC_XBS5_ILP32_OFFBIG 126
#define _SC_XBS5_LP64_OFF64 127
#define _SC_XBS5_LPBIG_OFFBIG 128
#define _SC_XOPEN_LEGACY 129
#define _SC_PRIORITIZED_IO 13
#define _SC_XOPEN_REALTIME 130
#define _SC_XOPEN_REALTIME_THREADS 131
#define _SC_ADVISORY_INFO 132
#define _SC_BARRIERS 133
#define _SC_CLOCK_SELECTION 137
#define _SC_CPUTIME 138
#define _SC_THREAD_CPUTIME 139
#define _SC_SYNCHRONIZED_IO 14
#define _SC_MONOTONIC_CLOCK 149
#define _SC_FSYNC 15
#define _SC_READER_WRITER_LOCKS 153
#define _SC_SPIN_LOCKS 154
#define _SC_REGEXP 155
#define _SC_SHELL 157
#define _SC_SPAWN 159
#define _SC_MAPPED_FILES 16
#define _SC_SPORADIC_SERVER 160
#define _SC_THREAD_SPORADIC_SERVER 161
#define _SC_TIMEOUTS 164
#define _SC_TYPED_MEMORY_OBJECTS 165
#define _SC_2_PBS_ACCOUNTING 169
#define _SC_MEMLOCK 17
#define _SC_2_PBS_LOCATE 170
#define _SC_2_PBS_MESSAGE 171
#define _SC_2_PBS_TRACK 172
#define _SC_SYMLOOP_MAX 173
#define _SC_2_PBS_CHECKPOINT 175
#define _SC_V6_ILP32_OFF32 176
#define _SC_V6_ILP32_OFFBIG 177
#define _SC_V6_LP64_OFF64 178
#define _SC_V6_LPBIG_OFFBIG 179
#define _SC_MEMLOCK_RANGE 18
#define _SC_HOST_NAME_MAX 180
#define _SC_TRACE 181
#define _SC_TRACE_EVENT_FILTER 182
#define _SC_TRACE_INHERIT 183
#define _SC_TRACE_LOG 184
#define _SC_MEMORY_PROTECTION 19
#define _SC_CLK_TCK 2
#define _SC_MESSAGE_PASSING 20
#define _SC_SEMAPHORES 21
#define _SC_SHARED_MEMORY_OBJECTS 22
#define _SC_AIO_LISTIO_MAX 23
#define _SC_AIO_MAX 24
#define _SC_AIO_PRIO_DELTA_MAX 25
#define _SC_DELAYTIMER_MAX 26
#define _SC_MQ_OPEN_MAX 27
#define _SC_MQ_PRIO_MAX 28
#define _SC_VERSION 29
#define _SC_NGROUPS_MAX 3
#define _SC_PAGESIZE 30
#define _SC_PAGE_SIZE 30
#define _SC_RTSIG_MAX 31
#define _SC_SEM_NSEMS_MAX 32
#define _SC_SEM_VALUE_MAX 33
#define _SC_SIGQUEUE_MAX 34
#define _SC_TIMER_MAX 35
#define _SC_BC_BASE_MAX 36
#define _SC_BC_DIM_MAX 37
#define _SC_BC_SCALE_MAX 38
#define _SC_BC_STRING_MAX 39
#define _SC_OPEN_MAX 4
#define _SC_COLL_WEIGHTS_MAX 40
#define _SC_EXPR_NEST_MAX 42
#define _SC_LINE_MAX 43
#define _SC_RE_DUP_MAX 44
#define _SC_2_VERSION 46
#define _SC_2_C_BIND 47
#define _SC_2_C_DEV 48
#define _SC_2_FORT_DEV 49
#define _SC_STREAM_MAX 5
#define _SC_2_FORT_RUN 50
#define _SC_2_SW_DEV 51
#define _SC_2_LOCALEDEF 52
#define _SC_TZNAME_MAX 6
#define _SC_IOV_MAX 60
#define _SC_THREADS 67
#define _SC_THREAD_SAFE_FUNCTIONS 68
#define _SC_GETGR_R_SIZE_MAX 69
#define _SC_JOB_CONTROL 7
#define _SC_GETPW_R_SIZE_MAX 70
#define _SC_LOGIN_NAME_MAX 71
#define _SC_TTY_NAME_MAX 72
#define _SC_THREAD_DESTRUCTOR_ITERATIONS 73
#define _SC_THREAD_KEYS_MAX 74
#define _SC_THREAD_STACK_MIN 75
#define _SC_THREAD_THREADS_MAX 76
#define _SC_THREAD_ATTR_STACKADDR 77
#define _SC_THREAD_ATTR_STACKSIZE 78
#define _SC_THREAD_PRIORITY_SCHEDULING 79
#define _SC_SAVED_IDS 8
#define _SC_THREAD_PRIO_INHERIT 80
#define _SC_THREAD_PRIO_PROTECT 81
#define _SC_THREAD_PROCESS_SHARED 82
#define _SC_ATEXIT_MAX 87
#define _SC_PASS_MAX 88
#define _SC_XOPEN_VERSION 89
#define _SC_REALTIME_SIGNALS 9
#define _SC_XOPEN_UNIX 91
#define _SC_XOPEN_CRYPT 92
#define _SC_XOPEN_ENH_I18N 93
#define _SC_XOPEN_SHM 94
#define _SC_2_CHAR_TERM 95
#define _SC_2_C_VERSION 96
#define _SC_2_UPE 97
/* `confstr' NAME values.*/
#define _CS_PATH 0
#define _POSIX_REGEXP 1
#define _CS_XBS5_ILP32_OFF32_CFLAGS 1100
#define _CS_XBS5_ILP32_OFF32_LDFLAGS 1101
#define _CS_XBS5_ILP32_OFF32_LIBS 1102
#define _CS_XBS5_ILP32_OFF32_LINTFLAGS 1103
#define _CS_XBS5_ILP32_OFFBIG_CFLAGS 1104
#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS 1105
#define _CS_XBS5_ILP32_OFFBIG_LIBS 1106
#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 1107
#define _CS_XBS5_LP64_OFF64_CFLAGS 1108
#define _CS_XBS5_LP64_OFF64_LDFLAGS 1109
#define _CS_XBS5_LP64_OFF64_LIBS 1110
#define _CS_XBS5_LP64_OFF64_LINTFLAGS 1111
#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS 1112
#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS 1113
#define _CS_XBS5_LPBIG_OFFBIG_LIBS 1114
#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 1115
#define _XOPEN_XPG4 1
#define _XOPEN_VERSION 500
/* Flags for lockf()*/
#define F_ULOCK 0
#define F_LOCK 1
#define F_TLOCK 2
#define F_TEST 3
extern char **__environ;
extern pid_t __getpgid(pid_t);
extern void _exit(int);
extern int acct(const char *);
extern unsigned int alarm(unsigned int);
extern int chown(const char *, uid_t, gid_t);
extern int chroot(const char *);
extern size_t confstr(int, char *, size_t);
extern int creat(const char *, mode_t);
extern int creat64(const char *, mode_t);
extern char *ctermid(char *);
extern char *cuserid(char *);
extern int daemon(int, int);
extern int execl(const char *, const char *, ...);
extern int execle(const char *, const char *, ...);
extern int execlp(const char *, const char *, ...);
extern int execv(const char *, char *const[]);
extern int execvp(const char *, char *const[]);
extern int fdatasync(int);
extern int ftruncate64(int, off64_t);
extern long int gethostid(void);
extern char *getlogin(void);
extern int getlogin_r(char *, size_t);
extern int getopt(int, char *const[], const char *);
extern pid_t getpgrp(void);
extern pid_t getsid(pid_t);
extern char *getwd(char *);
extern int lockf(int, int, off_t);
extern int mkstemp(char *);
extern int nice(int);
extern char *optarg;
extern int opterr;
extern int optind;
extern int optopt;
extern int rename(const char *, const char *);
extern int setegid(gid_t);
extern int seteuid(uid_t);
extern int sethostname(const char *, size_t);
extern int setpgrp(void);
extern void swab(const void *, void *, ssize_t);
extern void sync(void);
extern pid_t tcgetpgrp(int);
extern int tcsetpgrp(int, pid_t);
extern int truncate(const char *, off_t);
extern int truncate64(const char *, off64_t);
extern char *ttyname(int);
extern unsigned int ualarm(useconds_t, useconds_t);
extern int usleep(useconds_t);
extern int close(int);
extern int fsync(int);
extern off_t lseek(int, off_t, int);
extern int open(const char *, int, ...);
extern int pause(void);
extern ssize_t read(int, void *, size_t);
extern ssize_t write(int, const void *, size_t);
extern char *crypt(const char *, const char *);
extern void encrypt(char *, int);
extern void setkey(const char *);
extern int access(const char *, int);
extern int brk(void *);
extern int chdir(const char *);
extern int dup(int);
extern int dup2(int, int);
extern int execve(const char *, char *const[], char *const[]);
extern int fchdir(int);
extern int fchown(int, uid_t, gid_t);
extern pid_t fork(void);
extern gid_t getegid(void);
extern uid_t geteuid(void);
extern gid_t getgid(void);
extern int getgroups(int, gid_t[]);
extern int gethostname(char *, size_t);
extern pid_t getpgid(pid_t);
extern pid_t getpid(void);
extern uid_t getuid(void);
extern int lchown(const char *, uid_t, gid_t);
extern int link(const char *, const char *);
extern int mkdir(const char *, mode_t);
extern long int pathconf(const char *, int);
extern int pipe(int[2]);
extern int readlink(const char *, char *, size_t);
extern int rmdir(const char *);
extern void *sbrk(ptrdiff_t);
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
extern int setgid(gid_t);
extern int setpgid(pid_t, pid_t);
extern int setregid(gid_t, gid_t);
extern int setreuid(uid_t, uid_t);
extern pid_t setsid(void);
extern int setuid(uid_t);
extern unsigned int sleep(unsigned int);
extern int symlink(const char *, const char *);
extern long int sysconf(int);
extern int unlink(const char *);
extern pid_t vfork(void);
extern ssize_t pread(int, void *, size_t, off_t);
extern ssize_t pwrite(int, const void *, size_t, off_t);
extern char **_environ;
extern long int fpathconf(int, int);
extern int ftruncate(int, off_t);
extern char *getcwd(char *, size_t);
extern int getpagesize(void);
extern pid_t getppid(void);
extern int isatty(int);
extern loff_t lseek64(int, loff_t, int);
extern int open64(const char *, int, ...);
extern ssize_t pread64(int, void *, size_t, off64_t);
extern ssize_t pwrite64(int, const void *, size_t, off64_t);
extern int ttyname_r(int, char *, size_t);
extern int mknod(const char *, mode_t, dev_t);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,52 @@
#ifndef _WCTYPE_H_
#define _WCTYPE_H_
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef unsigned long int wctype_t;
typedef unsigned int wint_t;
typedef const int32_t *wctrans_t;
typedef struct {
int count;
wint_t value;
} __mbstate_t;
/* This really belongs in wchar.h, but it's presense creates a circular dependency with stdio.h, so put it here to break the circle.*/
typedef __mbstate_t mbstate_t;
extern int iswblank(wint_t);
extern wint_t towlower(wint_t);
extern wint_t towupper(wint_t);
extern wctrans_t wctrans(const char *);
extern int iswalnum(wint_t);
extern int iswalpha(wint_t);
extern int iswcntrl(wint_t);
extern int iswctype(wint_t, wctype_t);
extern int iswdigit(wint_t);
extern int iswgraph(wint_t);
extern int iswlower(wint_t);
extern int iswprint(wint_t);
extern int iswpunct(wint_t);
extern int iswspace(wint_t);
extern int iswupper(wint_t);
extern int iswxdigit(wint_t);
extern wctype_t wctype(const char *);
extern wint_t towctrans(wint_t, wctrans_t);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,44 @@
libGL libGL.so.1
libICE libICE.so.6
libQtCore libQtCore.so.4
libQtGui libQtGui.so.4
libQtNetwork libQtNetwork.so.4
libQtOpenGL libQtOpenGL.so.4
libQtSql libQtSql.so.4
libQtSvg libQtSvg.so.4
libQtXml libQtXml.so.4
libSM libSM.so.6
libX11 libX11.so.6
libXext libXext.so.6
libXi libXi.so.6
libXt libXt.so.6
libatk-1.0 libatk-1.0.so.0
libc_main libc.so.6
libcrypt libcrypt.so.1
libdl libdl.so.2
libfontconfig libfontconfig.so.1
libgcc_s libgcc_s.so.1
libgdk-x11-2.0 libgdk-x11-2.0.so.0
libgdk_pixbuf-2.0 libgdk_pixbuf-2.0.so.0
libgdk_pixbuf_xlib-2.0 libgdk_pixbuf_xlib-2.0.so.0
libglib-2.0 libglib-2.0.so.0
libgmodule-2.0 libgmodule-2.0.so.0
libgobject-2.0 libgobject-2.0.so.0
libgthread-2.0 libgthread-2.0.so.0
libgtk-x11-2.0 libgtk-x11-2.0.so.0
libjpeg libjpeg.so.62
libm libm.so.6
libncurses libncurses.so.5
libpam libpam.so.0
libpango-1.0 libpango-1.0.so.0
libpangoft2-1.0 libpangoft2-1.0.so.0
libpangoxft-1.0 libpangoxft-1.0.so.0
libpng12 libpng12.so.0
libpthread libpthread.so.0
libqt-mt libqt-mt.so.3
librt librt.so.1
libstdcxx libstdc++.so.6
libutil libutil.so.1
libxml2 libxml2.so.2
libz libz.so.1
proginterp /lib/ld-lsb.so.3

View File

@ -0,0 +1,7 @@
libdl
libc_main
libpthread
libgcc_s
libX11
libXt
libXext

View File

@ -0,0 +1 @@
libc_nonshared

View File

@ -0,0 +1,5 @@
libglib-2.0
libgobject-2.0
libgthread-2.0
libgdk-x11-2.0
libgtk-x11-2.0

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

View File

@ -0,0 +1,716 @@
void XActivateScreenSaver() {} ;
void XAddConnectionWatch() {} ;
void XAddExtension() {} ;
void XAddHost() {} ;
void XAddHosts() {} ;
void XAddPixel() {} ;
void XAddToExtensionList() {} ;
void XAddToSaveSet() {} ;
void XAllPlanes() {} ;
void XAllocClassHint() {} ;
void XAllocColor() {} ;
void XAllocColorCells() {} ;
void XAllocColorPlanes() {} ;
void XAllocIconSize() {} ;
void XAllocNamedColor() {} ;
void XAllocSizeHints() {} ;
void XAllocStandardColormap() {} ;
void XAllocWMHints() {} ;
void XAllowEvents() {} ;
void XAutoRepeatOff() {} ;
void XAutoRepeatOn() {} ;
void XBaseFontNameListOfFontSet() {} ;
void XBell() {} ;
void XBitmapBitOrder() {} ;
void XBitmapPad() {} ;
void XBitmapUnit() {} ;
void XBlackPixel() {} ;
void XBlackPixelOfScreen() {} ;
void XCellsOfScreen() {} ;
void XChangeActivePointerGrab() {} ;
void XChangeGC() {} ;
void XChangeKeyboardControl() {} ;
void XChangeKeyboardMapping() {} ;
void XChangePointerControl() {} ;
void XChangeProperty() {} ;
void XChangeSaveSet() {} ;
void XChangeWindowAttributes() {} ;
void XCheckIfEvent() {} ;
void XCheckMaskEvent() {} ;
void XCheckTypedEvent() {} ;
void XCheckTypedWindowEvent() {} ;
void XCheckWindowEvent() {} ;
void XCirculateSubwindows() {} ;
void XCirculateSubwindowsDown() {} ;
void XCirculateSubwindowsUp() {} ;
void XClearArea() {} ;
void XClearWindow() {} ;
void XClipBox() {} ;
void XCloseDisplay() {} ;
void XCloseIM() {} ;
void XCloseOM() {} ;
void XConfigureWindow() {} ;
void XConnectionNumber() {} ;
void XContextDependentDrawing() {} ;
void XContextualDrawing() {} ;
void XConvertCase() {} ;
void XConvertSelection() {} ;
void XCopyArea() {} ;
void XCopyColormapAndFree() {} ;
void XCopyGC() {} ;
void XCopyPlane() {} ;
void XCreateBitmapFromData() {} ;
void XCreateColormap() {} ;
void XCreateFontCursor() {} ;
void XCreateFontSet() {} ;
void XCreateGC() {} ;
void XCreateGlyphCursor() {} ;
void XCreateIC() {} ;
void XCreateImage() {} ;
void XCreateOC() {} ;
void XCreatePixmap() {} ;
void XCreatePixmapCursor() {} ;
void XCreatePixmapFromBitmapData() {} ;
void XCreateRegion() {} ;
void XCreateSimpleWindow() {} ;
void XCreateWindow() {} ;
void XDefaultColormap() {} ;
void XDefaultColormapOfScreen() {} ;
void XDefaultDepth() {} ;
void XDefaultDepthOfScreen() {} ;
void XDefaultGC() {} ;
void XDefaultGCOfScreen() {} ;
void XDefaultRootWindow() {} ;
void XDefaultScreen() {} ;
void XDefaultScreenOfDisplay() {} ;
void XDefaultString() {} ;
void XDefaultVisual() {} ;
void XDefaultVisualOfScreen() {} ;
void XDefineCursor() {} ;
void XDeleteContext() {} ;
void XDeleteModifiermapEntry() {} ;
void XDeleteProperty() {} ;
void XDestroyIC() {} ;
void XDestroyImage() {} ;
void XDestroyOC() {} ;
void XDestroyRegion() {} ;
void XDestroySubwindows() {} ;
void XDestroyWindow() {} ;
void XDirectionalDependentDrawing() {} ;
void XDisableAccessControl() {} ;
void XDisplayCells() {} ;
void XDisplayHeight() {} ;
void XDisplayHeightMM() {} ;
void XDisplayKeycodes() {} ;
void XDisplayMotionBufferSize() {} ;
void XDisplayName() {} ;
void XDisplayOfIM() {} ;
void XDisplayOfOM() {} ;
void XDisplayOfScreen() {} ;
void XDisplayPlanes() {} ;
void XDisplayString() {} ;
void XDisplayWidth() {} ;
void XDisplayWidthMM() {} ;
void XDoesBackingStore() {} ;
void XDoesSaveUnders() {} ;
void XDrawArc() {} ;
void XDrawArcs() {} ;
void XDrawImageString() {} ;
void XDrawImageString16() {} ;
void XDrawLine() {} ;
void XDrawLines() {} ;
void XDrawPoint() {} ;
void XDrawPoints() {} ;
void XDrawRectangle() {} ;
void XDrawRectangles() {} ;
void XDrawSegments() {} ;
void XDrawString() {} ;
void XDrawString16() {} ;
void XDrawText() {} ;
void XDrawText16() {} ;
void XEHeadOfExtensionList() {} ;
void XESetBeforeFlush() {} ;
void XESetCloseDisplay() {} ;
void XESetCopyGC() {} ;
void XESetCreateFont() {} ;
void XESetCreateGC() {} ;
void XESetError() {} ;
void XESetErrorString() {} ;
void XESetEventToWire() {} ;
void XESetFlushGC() {} ;
void XESetFreeFont() {} ;
void XESetFreeGC() {} ;
void XESetPrintErrorValues() {} ;
void XESetWireToError() {} ;
void XESetWireToEvent() {} ;
void XEmptyRegion() {} ;
void XEnableAccessControl() {} ;
void XEqualRegion() {} ;
void XEventMaskOfScreen() {} ;
void XEventsQueued() {} ;
void XExtendedMaxRequestSize() {} ;
void XExtentsOfFontSet() {} ;
void XFetchBuffer() {} ;
void XFetchBytes() {} ;
void XFetchName() {} ;
void XFillArc() {} ;
void XFillArcs() {} ;
void XFillPolygon() {} ;
void XFillRectangle() {} ;
void XFillRectangles() {} ;
void XFilterEvent() {} ;
void XFindContext() {} ;
void XFindOnExtensionList() {} ;
void XFlush() {} ;
void XFlushGC() {} ;
void XFontsOfFontSet() {} ;
void XForceScreenSaver() {} ;
void XFree() {} ;
void XFreeColormap() {} ;
void XFreeColors() {} ;
void XFreeCursor() {} ;
void XFreeExtensionList() {} ;
void XFreeFont() {} ;
void XFreeFontInfo() {} ;
void XFreeFontNames() {} ;
void XFreeFontPath() {} ;
void XFreeFontSet() {} ;
void XFreeGC() {} ;
void XFreeModifiermap() {} ;
void XFreePixmap() {} ;
void XFreeStringList() {} ;
void XGContextFromGC() {} ;
void XGeometry() {} ;
void XGetAtomName() {} ;
void XGetAtomNames() {} ;
void XGetClassHint() {} ;
void XGetCommand() {} ;
void XGetDefault() {} ;
void XGetErrorDatabaseText() {} ;
void XGetErrorText() {} ;
void XGetFontPath() {} ;
void XGetFontProperty() {} ;
void XGetGCValues() {} ;
void XGetGeometry() {} ;
void XGetICValues() {} ;
void XGetIMValues() {} ;
void XGetIconName() {} ;
void XGetIconSizes() {} ;
void XGetImage() {} ;
void XGetInputFocus() {} ;
void XGetKeyboardControl() {} ;
void XGetKeyboardMapping() {} ;
void XGetModifierMapping() {} ;
void XGetMotionEvents() {} ;
void XGetNormalHints() {} ;
void XGetOCValues() {} ;
void XGetOMValues() {} ;
void XGetPixel() {} ;
void XGetPointerControl() {} ;
void XGetPointerMapping() {} ;
void XGetRGBColormaps() {} ;
void XGetScreenSaver() {} ;
void XGetSelectionOwner() {} ;
void XGetSizeHints() {} ;
void XGetStandardColormap() {} ;
void XGetSubImage() {} ;
void XGetTextProperty() {} ;
void XGetTransientForHint() {} ;
void XGetVisualInfo() {} ;
void XGetWMClientMachine() {} ;
void XGetWMColormapWindows() {} ;
void XGetWMHints() {} ;
void XGetWMIconName() {} ;
void XGetWMName() {} ;
void XGetWMNormalHints() {} ;
void XGetWMProtocols() {} ;
void XGetWMSizeHints() {} ;
void XGetWindowAttributes() {} ;
void XGetWindowProperty() {} ;
void XGetZoomHints() {} ;
void XGrabButton() {} ;
void XGrabKey() {} ;
void XGrabKeyboard() {} ;
void XGrabPointer() {} ;
void XGrabServer() {} ;
void XHeightMMOfScreen() {} ;
void XHeightOfScreen() {} ;
void XIMOfIC() {} ;
void XIconifyWindow() {} ;
void XIfEvent() {} ;
void XImageByteOrder() {} ;
void XInitExtension() {} ;
void XInitImage() {} ;
void XInitThreads() {} ;
void XInsertModifiermapEntry() {} ;
void XInstallColormap() {} ;
void XInternAtom() {} ;
void XInternAtoms() {} ;
void XInternalConnectionNumbers() {} ;
void XIntersectRegion() {} ;
void XKeycodeToKeysym() {} ;
void XKeysymToKeycode() {} ;
void XKeysymToString() {} ;
void XKillClient() {} ;
void XLastKnownRequestProcessed() {} ;
void XListDepths() {} ;
void XListExtensions() {} ;
void XListFonts() {} ;
void XListFontsWithInfo() {} ;
void XListHosts() {} ;
void XListInstalledColormaps() {} ;
void XListPixmapFormats() {} ;
void XListProperties() {} ;
void XLoadFont() {} ;
void XLoadQueryFont() {} ;
void XLocaleOfFontSet() {} ;
void XLocaleOfIM() {} ;
void XLocaleOfOM() {} ;
void XLockDisplay() {} ;
void XLookupColor() {} ;
void XLookupKeysym() {} ;
void XLookupString() {} ;
void XLowerWindow() {} ;
void XMapRaised() {} ;
void XMapSubwindows() {} ;
void XMapWindow() {} ;
void XMaskEvent() {} ;
void XMatchVisualInfo() {} ;
void XMaxCmapsOfScreen() {} ;
void XMaxRequestSize() {} ;
void XMinCmapsOfScreen() {} ;
void XMoveResizeWindow() {} ;
void XMoveWindow() {} ;
void XNewModifiermap() {} ;
void XNextEvent() {} ;
void XNextRequest() {} ;
void XNoOp() {} ;
void XOMOfOC() {} ;
void XOffsetRegion() {} ;
void XOpenDisplay() {} ;
void XOpenIM() {} ;
void XOpenOM() {} ;
void XParseColor() {} ;
void XParseGeometry() {} ;
void XPeekEvent() {} ;
void XPeekIfEvent() {} ;
void XPending() {} ;
void XPlanesOfScreen() {} ;
void XPointInRegion() {} ;
void XPolygonRegion() {} ;
void XProcessInternalConnection() {} ;
void XProtocolRevision() {} ;
void XProtocolVersion() {} ;
void XPutBackEvent() {} ;
void XPutImage() {} ;
void XPutPixel() {} ;
void XQLength() {} ;
void XQueryBestCursor() {} ;
void XQueryBestSize() {} ;
void XQueryBestStipple() {} ;
void XQueryBestTile() {} ;
void XQueryColor() {} ;
void XQueryColors() {} ;
void XQueryExtension() {} ;
void XQueryFont() {} ;
void XQueryKeymap() {} ;
void XQueryPointer() {} ;
void XQueryTextExtents() {} ;
void XQueryTextExtents16() {} ;
void XQueryTree() {} ;
void XRaiseWindow() {} ;
void XReadBitmapFile() {} ;
void XReadBitmapFileData() {} ;
void XRebindKeysym() {} ;
void XRecolorCursor() {} ;
void XReconfigureWMWindow() {} ;
void XRectInRegion() {} ;
void XRefreshKeyboardMapping() {} ;
void XRegisterIMInstantiateCallback() {} ;
void XRemoveConnectionWatch() {} ;
void XRemoveFromSaveSet() {} ;
void XRemoveHost() {} ;
void XRemoveHosts() {} ;
void XReparentWindow() {} ;
void XResetScreenSaver() {} ;
void XResizeWindow() {} ;
void XResourceManagerString() {} ;
void XRestackWindows() {} ;
void XRootWindow() {} ;
void XRootWindowOfScreen() {} ;
void XRotateBuffers() {} ;
void XRotateWindowProperties() {} ;
void XSaveContext() {} ;
void XScreenCount() {} ;
void XScreenNumberOfScreen() {} ;
void XScreenOfDisplay() {} ;
void XScreenResourceString() {} ;
void XSelectInput() {} ;
void XSendEvent() {} ;
void XServerVendor() {} ;
void XSetAccessControl() {} ;
void XSetArcMode() {} ;
void XSetAuthorization() {} ;
void XSetBackground() {} ;
void XSetClassHint() {} ;
void XSetClipMask() {} ;
void XSetClipOrigin() {} ;
void XSetClipRectangles() {} ;
void XSetCloseDownMode() {} ;
void XSetCommand() {} ;
void XSetDashes() {} ;
void XSetErrorHandler() {} ;
void XSetFillRule() {} ;
void XSetFillStyle() {} ;
void XSetFont() {} ;
void XSetFontPath() {} ;
void XSetForeground() {} ;
void XSetFunction() {} ;
void XSetGraphicsExposures() {} ;
void XSetICFocus() {} ;
void XSetICValues() {} ;
void XSetIMValues() {} ;
void XSetIOErrorHandler() {} ;
void XSetIconName() {} ;
void XSetIconSizes() {} ;
void XSetInputFocus() {} ;
void XSetLineAttributes() {} ;
void XSetLocaleModifiers() {} ;
void XSetModifierMapping() {} ;
void XSetNormalHints() {} ;
void XSetOCValues() {} ;
void XSetOMValues() {} ;
void XSetPlaneMask() {} ;
void XSetPointerMapping() {} ;
void XSetRGBColormaps() {} ;
void XSetRegion() {} ;
void XSetScreenSaver() {} ;
void XSetSelectionOwner() {} ;
void XSetSizeHints() {} ;
void XSetStandardColormap() {} ;
void XSetStandardProperties() {} ;
void XSetState() {} ;
void XSetStipple() {} ;
void XSetSubwindowMode() {} ;
void XSetTSOrigin() {} ;
void XSetTextProperty() {} ;
void XSetTile() {} ;
void XSetTransientForHint() {} ;
void XSetWMClientMachine() {} ;
void XSetWMColormapWindows() {} ;
void XSetWMHints() {} ;
void XSetWMIconName() {} ;
void XSetWMName() {} ;
void XSetWMNormalHints() {} ;
void XSetWMProperties() {} ;
void XSetWMProtocols() {} ;
void XSetWMSizeHints() {} ;
void XSetWindowBackground() {} ;
void XSetWindowBackgroundPixmap() {} ;
void XSetWindowBorder() {} ;
void XSetWindowBorderPixmap() {} ;
void XSetWindowBorderWidth() {} ;
void XSetWindowColormap() {} ;
void XSetZoomHints() {} ;
void XShrinkRegion() {} ;
void XStoreBuffer() {} ;
void XStoreBytes() {} ;
void XStoreColor() {} ;
void XStoreColors() {} ;
void XStoreName() {} ;
void XStoreNamedColor() {} ;
void XStringListToTextProperty() {} ;
void XStringToKeysym() {} ;
void XSubImage() {} ;
void XSubtractRegion() {} ;
void XSupportsLocale() {} ;
void XSync() {} ;
void XTextExtents() {} ;
void XTextExtents16() {} ;
void XTextPropertyToStringList() {} ;
void XTextWidth() {} ;
void XTextWidth16() {} ;
void XTranslateCoordinates() {} ;
void XUndefineCursor() {} ;
void XUngrabButton() {} ;
void XUngrabKey() {} ;
void XUngrabKeyboard() {} ;
void XUngrabPointer() {} ;
void XUngrabServer() {} ;
void XUninstallColormap() {} ;
void XUnionRectWithRegion() {} ;
void XUnionRegion() {} ;
void XUnloadFont() {} ;
void XUnlockDisplay() {} ;
void XUnmapSubwindows() {} ;
void XUnmapWindow() {} ;
void XUnregisterIMInstantiateCallback() {} ;
void XUnsetICFocus() {} ;
void XVaCreateNestedList() {} ;
void XVendorRelease() {} ;
void XVisualIDFromVisual() {} ;
void XWMGeometry() {} ;
void XWarpPointer() {} ;
void XWhitePixel() {} ;
void XWhitePixelOfScreen() {} ;
void XWidthMMOfScreen() {} ;
void XWidthOfScreen() {} ;
void XWindowEvent() {} ;
void XWithdrawWindow() {} ;
void XWriteBitmapFile() {} ;
void XXorRegion() {} ;
void XauDisposeAuth() {} ;
void XauFileName() {} ;
void XauGetBestAuthByAddr() {} ;
void XauReadAuth() {} ;
void XcmsAddColorSpace() {} ;
void XcmsAddFunctionSet() {} ;
void XcmsAllocColor() {} ;
void XcmsAllocNamedColor() {} ;
void XcmsCCCOfColormap() {} ;
void XcmsCIELabClipL() {} ;
void XcmsCIELabClipLab() {} ;
void XcmsCIELabClipab() {} ;
void XcmsCIELabQueryMaxC() {} ;
void XcmsCIELabQueryMaxL() {} ;
void XcmsCIELabQueryMaxLC() {} ;
void XcmsCIELabQueryMinL() {} ;
void XcmsCIELabToCIEXYZ() {} ;
void XcmsCIELabWhiteShiftColors() {} ;
void XcmsCIELuvClipL() {} ;
void XcmsCIELuvClipLuv() {} ;
void XcmsCIELuvClipuv() {} ;
void XcmsCIELuvQueryMaxC() {} ;
void XcmsCIELuvQueryMaxL() {} ;
void XcmsCIELuvQueryMaxLC() {} ;
void XcmsCIELuvQueryMinL() {} ;
void XcmsCIELuvToCIEuvY() {} ;
void XcmsCIELuvWhiteShiftColors() {} ;
void XcmsCIEXYZToCIELab() {} ;
void XcmsCIEXYZToCIEuvY() {} ;
void XcmsCIEXYZToCIExyY() {} ;
void XcmsCIEXYZToRGBi() {} ;
void XcmsCIEuvYToCIELuv() {} ;
void XcmsCIEuvYToCIEXYZ() {} ;
void XcmsCIEuvYToTekHVC() {} ;
void XcmsCIExyYToCIEXYZ() {} ;
void XcmsClientWhitePointOfCCC() {} ;
void XcmsConvertColors() {} ;
void XcmsCreateCCC() {} ;
void XcmsDefaultCCC() {} ;
void XcmsDisplayOfCCC() {} ;
void XcmsFormatOfPrefix() {} ;
void XcmsFreeCCC() {} ;
void XcmsLookupColor() {} ;
void XcmsPrefixOfFormat() {} ;
void XcmsQueryBlack() {} ;
void XcmsQueryBlue() {} ;
void XcmsQueryColor() {} ;
void XcmsQueryColors() {} ;
void XcmsQueryGreen() {} ;
void XcmsQueryRed() {} ;
void XcmsQueryWhite() {} ;
void XcmsRGBToRGBi() {} ;
void XcmsRGBiToCIEXYZ() {} ;
void XcmsRGBiToRGB() {} ;
void XcmsScreenNumberOfCCC() {} ;
void XcmsScreenWhitePointOfCCC() {} ;
void XcmsSetCCCOfColormap() {} ;
void XcmsSetCompressionProc() {} ;
void XcmsSetWhiteAdjustProc() {} ;
void XcmsSetWhitePoint() {} ;
void XcmsStoreColor() {} ;
void XcmsStoreColors() {} ;
void XcmsTekHVCClipC() {} ;
void XcmsTekHVCClipV() {} ;
void XcmsTekHVCClipVC() {} ;
void XcmsTekHVCQueryMaxC() {} ;
void XcmsTekHVCQueryMaxV() {} ;
void XcmsTekHVCQueryMaxVC() {} ;
void XcmsTekHVCQueryMaxVSamples() {} ;
void XcmsTekHVCQueryMinV() {} ;
void XcmsTekHVCToCIEuvY() {} ;
void XcmsTekHVCWhiteShiftColors() {} ;
void XcmsVisualOfCCC() {} ;
void XkbAllocClientMap() {} ;
void XkbAllocCompatMap() {} ;
void XkbAllocControls() {} ;
void XkbAllocGeomColors() {} ;
void XkbAllocGeomDoodads() {} ;
void XkbAllocGeomKeyAliases() {} ;
void XkbAllocGeomKeys() {} ;
void XkbAllocGeomOutlines() {} ;
void XkbAllocGeomOverlayKeys() {} ;
void XkbAllocGeomOverlayRows() {} ;
void XkbAllocGeomOverlays() {} ;
void XkbAllocGeomPoints() {} ;
void XkbAllocGeomProps() {} ;
void XkbAllocGeomRows() {} ;
void XkbAllocGeomSectionDoodads() {} ;
void XkbAllocGeomSections() {} ;
void XkbAllocGeomShapes() {} ;
void XkbAllocGeometry() {} ;
void XkbAllocIndicatorMaps() {} ;
void XkbAllocKeyboard() {} ;
void XkbAllocNames() {} ;
void XkbAllocServerMap() {} ;
void XkbApplyCompatMapToKey() {} ;
void XkbBell() {} ;
void XkbBellEvent() {} ;
void XkbChangeEnabledControls() {} ;
void XkbChangeMap() {} ;
void XkbChangeNames() {} ;
void XkbChangeTypesOfKey() {} ;
void XkbComputeEffectiveMap() {} ;
void XkbComputeRowBounds() {} ;
void XkbComputeSectionBounds() {} ;
void XkbComputeShapeBounds() {} ;
void XkbComputeShapeTop() {} ;
void XkbCopyKeyType() {} ;
void XkbCopyKeyTypes() {} ;
void XkbFindOverlayForKey() {} ;
void XkbForceBell() {} ;
void XkbFreeClientMap() {} ;
void XkbFreeCompatMap() {} ;
void XkbFreeComponentList() {} ;
void XkbFreeControls() {} ;
void XkbFreeGeomColors() {} ;
void XkbFreeGeomDoodads() {} ;
void XkbFreeGeomKeyAliases() {} ;
void XkbFreeGeomKeys() {} ;
void XkbFreeGeomOutlines() {} ;
void XkbFreeGeomOverlayKeys() {} ;
void XkbFreeGeomOverlayRows() {} ;
void XkbFreeGeomOverlays() {} ;
void XkbFreeGeomPoints() {} ;
void XkbFreeGeomProperties() {} ;
void XkbFreeGeomRows() {} ;
void XkbFreeGeomSections() {} ;
void XkbFreeGeomShapes() {} ;
void XkbFreeGeometry() {} ;
void XkbFreeIndicatorMaps() {} ;
void XkbFreeKeyboard() {} ;
void XkbFreeNames() {} ;
void XkbFreeServerMap() {} ;
void XkbGetAutoRepeatRate() {} ;
void XkbGetCompatMap() {} ;
void XkbGetControls() {} ;
void XkbGetGeometry() {} ;
void XkbGetIndicatorMap() {} ;
void XkbGetIndicatorState() {} ;
void XkbGetKeyActions() {} ;
void XkbGetKeyBehaviors() {} ;
void XkbGetKeyExplicitComponents() {} ;
void XkbGetKeyModifierMap() {} ;
void XkbGetKeySyms() {} ;
void XkbGetKeyTypes() {} ;
void XkbGetKeyboard() {} ;
void XkbGetKeyboardByName() {} ;
void XkbGetMap() {} ;
void XkbGetMapChanges() {} ;
void XkbGetNamedGeometry() {} ;
void XkbGetNamedIndicator() {} ;
void XkbGetNames() {} ;
void XkbGetState() {} ;
void XkbGetUpdatedMap() {} ;
void XkbGetVirtualMods() {} ;
void XkbGetXlibControls() {} ;
void XkbIgnoreExtension() {} ;
void XkbInitCanonicalKeyTypes() {} ;
void XkbKeyTypesForCoreSymbols() {} ;
void XkbKeycodeToKeysym() {} ;
void XkbKeysymToModifiers() {} ;
void XkbLatchGroup() {} ;
void XkbLatchModifiers() {} ;
void XkbLibraryVersion() {} ;
void XkbListComponents() {} ;
void XkbLockGroup() {} ;
void XkbLockModifiers() {} ;
void XkbLookupKeyBinding() {} ;
void XkbLookupKeySym() {} ;
void XkbNoteControlsChanges() {} ;
void XkbNoteMapChanges() {} ;
void XkbNoteNameChanges() {} ;
void XkbOpenDisplay() {} ;
void XkbQueryExtension() {} ;
void XkbRefreshKeyboardMapping() {} ;
void XkbResizeKeyActions() {} ;
void XkbResizeKeySyms() {} ;
void XkbResizeKeyType() {} ;
void XkbSelectEventDetails() {} ;
void XkbSelectEvents() {} ;
void XkbSetAtomFuncs() {} ;
void XkbSetAutoRepeatRate() {} ;
void XkbSetAutoResetControls() {} ;
void XkbSetCompatMap() {} ;
void XkbSetControls() {} ;
void XkbSetDebuggingFlags() {} ;
void XkbSetDetectableAutoRepeat() {} ;
void XkbSetGeometry() {} ;
void XkbSetIgnoreLockMods() {} ;
void XkbSetIndicatorMap() {} ;
void XkbSetMap() {} ;
void XkbSetNamedIndicator() {} ;
void XkbSetNames() {} ;
void XkbSetServerInternalMods() {} ;
void XkbSetXlibControls() {} ;
void XkbToControl() {} ;
void XkbTranslateKeyCode() {} ;
void XkbTranslateKeySym() {} ;
void XkbUpdateMapFromCore() {} ;
void XkbUseExtension() {} ;
void XkbVirtualModsToReal() {} ;
void XmbDrawImageString() {} ;
void XmbDrawString() {} ;
void XmbDrawText() {} ;
void XmbLookupString() {} ;
void XmbResetIC() {} ;
void XmbSetWMProperties() {} ;
void XmbTextEscapement() {} ;
void XmbTextExtents() {} ;
void XmbTextListToTextProperty() {} ;
void XmbTextPerCharExtents() {} ;
void XmbTextPropertyToTextList() {} ;
void XrmCombineDatabase() {} ;
void XrmCombineFileDatabase() {} ;
void XrmDestroyDatabase() {} ;
void XrmEnumerateDatabase() {} ;
void XrmGetDatabase() {} ;
void XrmGetFileDatabase() {} ;
void XrmGetResource() {} ;
void XrmGetStringDatabase() {} ;
void XrmInitialize() {} ;
void XrmLocaleOfDatabase() {} ;
void XrmMergeDatabases() {} ;
void XrmParseCommand() {} ;
void XrmPermStringToQuark() {} ;
void XrmPutFileDatabase() {} ;
void XrmPutLineResource() {} ;
void XrmPutResource() {} ;
void XrmPutStringResource() {} ;
void XrmQGetResource() {} ;
void XrmQGetSearchList() {} ;
void XrmQGetSearchResource() {} ;
void XrmQPutResource() {} ;
void XrmQPutStringResource() {} ;
void XrmQuarkToString() {} ;
void XrmSetDatabase() {} ;
void XrmStringToBindingQuarkList() {} ;
void XrmStringToQuark() {} ;
void XrmStringToQuarkList() {} ;
void XrmUniqueQuark() {} ;
void Xutf8TextListToTextProperty() {} ;
void Xutf8TextPropertyToTextList() {} ;
void XwcDrawImageString() {} ;
void XwcDrawString() {} ;
void XwcDrawText() {} ;
void XwcFreeStringList() {} ;
void XwcLookupString() {} ;
void XwcResetIC() {} ;
void XwcTextEscapement() {} ;
void XwcTextExtents() {} ;
void XwcTextListToTextProperty() {} ;
void XwcTextPerCharExtents() {} ;
void XwcTextPropertyToTextList() {} ;
__asm__(".globl XSetAfterFunction; .pushsection .data; .type XSetAfterFunction,@object; .size XSetAfterFunction, 0; XSetAfterFunction: .long 0; .popsection");
__asm__(".globl XSynchronize; .pushsection .data; .type XSynchronize,@object; .size XSynchronize, 0; XSynchronize: .long 0; .popsection");

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

View File

@ -0,0 +1,79 @@
void DPMSCapable() {} ;
void DPMSDisable() {} ;
void DPMSEnable() {} ;
void DPMSForceLevel() {} ;
void DPMSGetTimeouts() {} ;
void DPMSGetVersion() {} ;
void DPMSInfo() {} ;
void DPMSQueryExtension() {} ;
void DPMSSetTimeouts() {} ;
void XSecurityAllocXauth() {} ;
void XSecurityFreeXauth() {} ;
void XSecurityGenerateAuthorization() {} ;
void XSecurityQueryExtension() {} ;
void XSecurityRevokeAuthorization() {} ;
void XShapeCombineMask() {} ;
void XShapeCombineRectangles() {} ;
void XShapeCombineRegion() {} ;
void XShapeCombineShape() {} ;
void XShapeGetRectangles() {} ;
void XShapeInputSelected() {} ;
void XShapeOffsetShape() {} ;
void XShapeQueryExtension() {} ;
void XShapeQueryExtents() {} ;
void XShapeQueryVersion() {} ;
void XShapeSelectInput() {} ;
void XShmAttach() {} ;
void XShmCreateImage() {} ;
void XShmCreatePixmap() {} ;
void XShmDetach() {} ;
void XShmGetEventBase() {} ;
void XShmGetImage() {} ;
void XShmPixmapFormat() {} ;
void XShmPutImage() {} ;
void XShmQueryExtension() {} ;
void XShmQueryVersion() {} ;
void XSyncAwait() {} ;
void XSyncChangeAlarm() {} ;
void XSyncChangeCounter() {} ;
void XSyncCreateAlarm() {} ;
void XSyncCreateCounter() {} ;
void XSyncDestroyAlarm() {} ;
void XSyncDestroyCounter() {} ;
void XSyncFreeSystemCounterList() {} ;
void XSyncGetPriority() {} ;
void XSyncInitialize() {} ;
void XSyncIntToValue() {} ;
void XSyncIntsToValue() {} ;
void XSyncListSystemCounters() {} ;
void XSyncMaxValue() {} ;
void XSyncMinValue() {} ;
void XSyncQueryAlarm() {} ;
void XSyncQueryCounter() {} ;
void XSyncQueryExtension() {} ;
void XSyncSetCounter() {} ;
void XSyncSetPriority() {} ;
void XSyncValueAdd() {} ;
void XSyncValueEqual() {} ;
void XSyncValueGreaterOrEqual() {} ;
void XSyncValueGreaterThan() {} ;
void XSyncValueHigh32() {} ;
void XSyncValueIsNegative() {} ;
void XSyncValueIsPositive() {} ;
void XSyncValueIsZero() {} ;
void XSyncValueLessOrEqual() {} ;
void XSyncValueLessThan() {} ;
void XSyncValueLow32() {} ;
void XSyncValueSubtract() {} ;
void XdbeAllocateBackBufferName() {} ;
void XdbeBeginIdiom() {} ;
void XdbeDeallocateBackBufferName() {} ;
void XdbeEndIdiom() {} ;
void XdbeFreeVisualInfo() {} ;
void XdbeGetBackBufferAttributes() {} ;
void XdbeGetVisualInfo() {} ;
void XdbeQueryExtension() {} ;
void XdbeSwapBuffers() {} ;
void XeviGetVisualInfo() {} ;
void XeviQueryExtension() {} ;
void XeviQueryVersion() {} ;

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

331
lsb-build/stub_libs/libXt.c Normal file
View File

@ -0,0 +1,331 @@
void XtAddActions() {} ;
void XtAddCallback() {} ;
void XtAddCallbacks() {} ;
void XtAddConverter() {} ;
void XtAddEventHandler() {} ;
void XtAddExposureToRegion() {} ;
void XtAddGrab() {} ;
void XtAddInput() {} ;
void XtAddRawEventHandler() {} ;
void XtAddSignal() {} ;
void XtAddTimeOut() {} ;
void XtAddWorkProc() {} ;
void XtAllocateGC() {} ;
void XtAppAddActionHook() {} ;
void XtAppAddActions() {} ;
void XtAppAddBlockHook() {} ;
void XtAppAddConverter() {} ;
void XtAppAddInput() {} ;
void XtAppAddSignal() {} ;
void XtAppAddTimeOut() {} ;
void XtAppAddWorkProc() {} ;
void XtAppCreateShell() {} ;
void XtAppError() {} ;
void XtAppErrorMsg() {} ;
void XtAppGetErrorDatabase() {} ;
void XtAppGetErrorDatabaseText() {} ;
void XtAppGetExitFlag() {} ;
void XtAppGetSelectionTimeout() {} ;
void XtAppInitialize() {} ;
void XtAppLock() {} ;
void XtAppMainLoop() {} ;
void XtAppNextEvent() {} ;
void XtAppPeekEvent() {} ;
void XtAppPending() {} ;
void XtAppProcessEvent() {} ;
void XtAppReleaseCacheRefs() {} ;
void XtAppSetErrorHandler() {} ;
void XtAppSetErrorMsgHandler() {} ;
void XtAppSetExitFlag() {} ;
void XtAppSetFallbackResources() {} ;
void XtAppSetSelectionTimeout() {} ;
void XtAppSetTypeConverter() {} ;
void XtAppSetWarningHandler() {} ;
void XtAppSetWarningMsgHandler() {} ;
void XtAppUnlock() {} ;
void XtAppWarning() {} ;
void XtAppWarningMsg() {} ;
void XtAugmentTranslations() {} ;
void XtBuildEventMask() {} ;
void XtCallAcceptFocus() {} ;
void XtCallActionProc() {} ;
void XtCallCallbackList() {} ;
void XtCallCallbacks() {} ;
void XtCallConverter() {} ;
void XtCallbackExclusive() {} ;
void XtCallbackNone() {} ;
void XtCallbackNonexclusive() {} ;
void XtCallbackPopdown() {} ;
void XtCallbackReleaseCacheRef() {} ;
void XtCallbackReleaseCacheRefList() {} ;
void XtCalloc() {} ;
void XtCancelSelectionRequest() {} ;
void XtChangeManagedSet() {} ;
void XtClass() {} ;
void XtCloseDisplay() {} ;
void XtConfigureWidget() {} ;
void XtConvert() {} ;
void XtConvertAndStore() {} ;
void XtConvertCase() {} ;
void XtCreateApplicationContext() {} ;
void XtCreateApplicationShell() {} ;
void XtCreateManagedWidget() {} ;
void XtCreatePopupShell() {} ;
void XtCreateSelectionRequest() {} ;
void XtCreateWidget() {} ;
void XtCreateWindow() {} ;
void XtCvtColorToPixel() {} ;
void XtCvtIntToBool() {} ;
void XtCvtIntToBoolean() {} ;
void XtCvtIntToColor() {} ;
void XtCvtIntToFloat() {} ;
void XtCvtIntToFont() {} ;
void XtCvtIntToPixel() {} ;
void XtCvtIntToPixmap() {} ;
void XtCvtIntToShort() {} ;
void XtCvtIntToUnsignedChar() {} ;
void XtCvtStringToAcceleratorTable() {} ;
void XtCvtStringToAtom() {} ;
void XtCvtStringToBool() {} ;
void XtCvtStringToBoolean() {} ;
void XtCvtStringToCommandArgArray() {} ;
void XtCvtStringToCursor() {} ;
void XtCvtStringToDimension() {} ;
void XtCvtStringToDirectoryString() {} ;
void XtCvtStringToDisplay() {} ;
void XtCvtStringToFile() {} ;
void XtCvtStringToFloat() {} ;
void XtCvtStringToFont() {} ;
void XtCvtStringToFontSet() {} ;
void XtCvtStringToFontStruct() {} ;
void XtCvtStringToGravity() {} ;
void XtCvtStringToInitialState() {} ;
void XtCvtStringToInt() {} ;
void XtCvtStringToPixel() {} ;
void XtCvtStringToRestartStyle() {} ;
void XtCvtStringToShort() {} ;
void XtCvtStringToTranslationTable() {} ;
void XtCvtStringToUnsignedChar() {} ;
void XtCvtStringToVisual() {} ;
void XtDatabase() {} ;
void XtDestroyApplicationContext() {} ;
void XtDestroyGC() {} ;
void XtDestroyWidget() {} ;
void XtDirectConvert() {} ;
void XtDisownSelection() {} ;
void XtDispatchEvent() {} ;
void XtDispatchEventToWidget() {} ;
void XtDisplay() {} ;
void XtDisplayInitialize() {} ;
void XtDisplayOfObject() {} ;
void XtDisplayStringConversionWarning() {} ;
void XtDisplayToApplicationContext() {} ;
void XtError() {} ;
void XtErrorMsg() {} ;
void XtFindFile() {} ;
void XtFree() {} ;
void XtGetActionKeysym() {} ;
void XtGetActionList() {} ;
void XtGetApplicationNameAndClass() {} ;
void XtGetApplicationResources() {} ;
void XtGetClassExtension() {} ;
void XtGetConstraintResourceList() {} ;
void XtGetDisplays() {} ;
void XtGetErrorDatabase() {} ;
void XtGetErrorDatabaseText() {} ;
void XtGetGC() {} ;
void XtGetKeyboardFocusWidget() {} ;
void XtGetKeysymTable() {} ;
void XtGetMultiClickTime() {} ;
void XtGetResourceList() {} ;
void XtGetSelectionParameters() {} ;
void XtGetSelectionRequest() {} ;
void XtGetSelectionTimeout() {} ;
void XtGetSelectionValue() {} ;
void XtGetSelectionValueIncremental() {} ;
void XtGetSelectionValues() {} ;
void XtGetSelectionValuesIncremental() {} ;
void XtGetSubresources() {} ;
void XtGetSubvalues() {} ;
void XtGetValues() {} ;
void XtGrabButton() {} ;
void XtGrabKey() {} ;
void XtGrabKeyboard() {} ;
void XtGrabPointer() {} ;
void XtHasCallbacks() {} ;
void XtHooksOfDisplay() {} ;
void XtInitialize() {} ;
void XtInitializeWidgetClass() {} ;
void XtInsertEventHandler() {} ;
void XtInsertEventTypeHandler() {} ;
void XtInsertRawEventHandler() {} ;
void XtInstallAccelerators() {} ;
void XtInstallAllAccelerators() {} ;
void XtIsApplicationShell() {} ;
void XtIsComposite() {} ;
void XtIsConstraint() {} ;
void XtIsManaged() {} ;
void XtIsObject() {} ;
void XtIsOverrideShell() {} ;
void XtIsRealized() {} ;
void XtIsRectObj() {} ;
void XtIsSensitive() {} ;
void XtIsSessionShell() {} ;
void XtIsShell() {} ;
void XtIsSubclass() {} ;
void XtIsTopLevelShell() {} ;
void XtIsTransientShell() {} ;
void XtIsVendorShell() {} ;
void XtIsWMShell() {} ;
void XtIsWidget() {} ;
void XtKeysymToKeycodeList() {} ;
void XtLastEventProcessed() {} ;
void XtLastTimestampProcessed() {} ;
void XtMainLoop() {} ;
void XtMakeGeometryRequest() {} ;
void XtMakeResizeRequest() {} ;
void XtMalloc() {} ;
void XtManageChild() {} ;
void XtManageChildren() {} ;
void XtMapWidget() {} ;
void XtMenuPopupAction() {} ;
void XtMergeArgLists() {} ;
void XtMoveWidget() {} ;
void XtName() {} ;
void XtNameToWidget() {} ;
void XtNewString() {} ;
void XtNextEvent() {} ;
void XtNoticeSignal() {} ;
void XtOpenApplication() {} ;
void XtOpenDisplay() {} ;
void XtOverrideTranslations() {} ;
void XtOwnSelection() {} ;
void XtOwnSelectionIncremental() {} ;
void XtParent() {} ;
void XtParseAcceleratorTable() {} ;
void XtParseTranslationTable() {} ;
void XtPeekEvent() {} ;
void XtPending() {} ;
void XtPopdown() {} ;
void XtPopup() {} ;
void XtPopupSpringLoaded() {} ;
void XtProcessEvent() {} ;
void XtProcessLock() {} ;
void XtProcessUnlock() {} ;
void XtQueryGeometry() {} ;
void XtRealizeWidget() {} ;
void XtRealloc() {} ;
void XtRegisterCaseConverter() {} ;
void XtRegisterDrawable() {} ;
void XtRegisterExtensionSelector() {} ;
void XtRegisterGrabAction() {} ;
void XtReleaseGC() {} ;
void XtReleasePropertyAtom() {} ;
void XtRemoveActionHook() {} ;
void XtRemoveAllCallbacks() {} ;
void XtRemoveBlockHook() {} ;
void XtRemoveCallback() {} ;
void XtRemoveCallbacks() {} ;
void XtRemoveEventHandler() {} ;
void XtRemoveEventTypeHandler() {} ;
void XtRemoveGrab() {} ;
void XtRemoveInput() {} ;
void XtRemoveRawEventHandler() {} ;
void XtRemoveSignal() {} ;
void XtRemoveTimeOut() {} ;
void XtRemoveWorkProc() {} ;
void XtReservePropertyAtom() {} ;
void XtResizeWidget() {} ;
void XtResizeWindow() {} ;
void XtResolvePathname() {} ;
void XtScreen() {} ;
void XtScreenDatabase() {} ;
void XtScreenOfObject() {} ;
void XtSendSelectionRequest() {} ;
void XtSessionGetToken() {} ;
void XtSessionReturnToken() {} ;
void XtSetErrorHandler() {} ;
void XtSetErrorMsgHandler() {} ;
void XtSetEventDispatcher() {} ;
void XtSetKeyTranslator() {} ;
void XtSetKeyboardFocus() {} ;
void XtSetLanguageProc() {} ;
void XtSetMappedWhenManaged() {} ;
void XtSetMultiClickTime() {} ;
void XtSetSelectionParameters() {} ;
void XtSetSelectionTimeout() {} ;
void XtSetSensitive() {} ;
void XtSetSubvalues() {} ;
void XtSetTypeConverter() {} ;
void XtSetValues() {} ;
void XtSetWMColormapWindows() {} ;
void XtSetWarningHandler() {} ;
void XtSetWarningMsgHandler() {} ;
void XtStringConversionWarning() {} ;
void XtSuperclass() {} ;
void XtToolkitInitialize() {} ;
void XtToolkitThreadInitialize() {} ;
void XtTranslateCoords() {} ;
void XtTranslateKey() {} ;
void XtTranslateKeycode() {} ;
void XtUngrabButton() {} ;
void XtUngrabKey() {} ;
void XtUngrabKeyboard() {} ;
void XtUngrabPointer() {} ;
void XtUninstallTranslations() {} ;
void XtUnmanageChild() {} ;
void XtUnmanageChildren() {} ;
void XtUnmapWidget() {} ;
void XtUnrealizeWidget() {} ;
void XtUnregisterDrawable() {} ;
void XtVaAppCreateShell() {} ;
void XtVaAppInitialize() {} ;
void XtVaCreateArgsList() {} ;
void XtVaCreateManagedWidget() {} ;
void XtVaCreatePopupShell() {} ;
void XtVaCreateWidget() {} ;
void XtVaGetApplicationResources() {} ;
void XtVaGetSubresources() {} ;
void XtVaGetSubvalues() {} ;
void XtVaGetValues() {} ;
void XtVaOpenApplication() {} ;
void XtVaSetSubvalues() {} ;
void XtVaSetValues() {} ;
void XtWarning() {} ;
void XtWarningMsg() {} ;
void XtWidgetToApplicationContext() {} ;
void XtWindow() {} ;
void XtWindowOfObject() {} ;
void XtWindowToWidget() {} ;
void _XtCheckSubclassFlag() {} ;
void _XtCopyFromArg() {} ;
void _XtInherit() {} ;
void _XtIsSubclassOf() {} ;
__asm__(".globl XtCXtToolkitError; .pushsection .data; .type XtCXtToolkitError,@object; .size XtCXtToolkitError, 4; XtCXtToolkitError: .long 0; .popsection");
__asm__(".globl XtShellStrings; .pushsection .data; .type XtShellStrings,@object; .size XtShellStrings, 1289; XtShellStrings: .long 0; .popsection");
__asm__(".globl XtStrings; .pushsection .data; .type XtStrings,@object; .size XtStrings, 2649; XtStrings: .long 0; .popsection");
__asm__(".globl _XtInheritTranslations; .pushsection .data; .type _XtInheritTranslations,@object; .size _XtInheritTranslations, 4; _XtInheritTranslations: .long 0; .popsection");
__asm__(".globl applicationShellWidgetClass; .pushsection .data; .type applicationShellWidgetClass,@object; .size applicationShellWidgetClass, 4; applicationShellWidgetClass: .long 0; .popsection");
__asm__(".globl compositeClassRec; .pushsection .data; .type compositeClassRec,@object; .size compositeClassRec, 136; compositeClassRec: .long 0; .popsection");
__asm__(".globl compositeWidgetClass; .pushsection .data; .type compositeWidgetClass,@object; .size compositeWidgetClass, 4; compositeWidgetClass: .long 0; .popsection");
__asm__(".globl constraintClassRec; .pushsection .data; .type constraintClassRec,@object; .size constraintClassRec, 164; constraintClassRec: .long 0; .popsection");
__asm__(".globl constraintWidgetClass; .pushsection .data; .type constraintWidgetClass,@object; .size constraintWidgetClass, 4; constraintWidgetClass: .long 0; .popsection");
__asm__(".globl coreWidgetClass; .pushsection .data; .type coreWidgetClass,@object; .size coreWidgetClass, 4; coreWidgetClass: .long 0; .popsection");
__asm__(".globl objectClass; .pushsection .data; .type objectClass,@object; .size objectClass, 4; objectClass: .long 0; .popsection");
__asm__(".globl objectClassRec; .pushsection .data; .type objectClassRec,@object; .size objectClassRec, 116; objectClassRec: .long 0; .popsection");
__asm__(".globl overrideShellClassRec; .pushsection .data; .type overrideShellClassRec,@object; .size overrideShellClassRec, 144; overrideShellClassRec: .long 0; .popsection");
__asm__(".globl overrideShellWidgetClass; .pushsection .data; .type overrideShellWidgetClass,@object; .size overrideShellWidgetClass, 4; overrideShellWidgetClass: .long 0; .popsection");
__asm__(".globl rectObjClass; .pushsection .data; .type rectObjClass,@object; .size rectObjClass, 4; rectObjClass: .long 0; .popsection");
__asm__(".globl rectObjClassRec; .pushsection .data; .type rectObjClassRec,@object; .size rectObjClassRec, 116; rectObjClassRec: .long 0; .popsection");
__asm__(".globl sessionShellClassRec; .pushsection .data; .type sessionShellClassRec,@object; .size sessionShellClassRec, 160; sessionShellClassRec: .long 0; .popsection");
__asm__(".globl sessionShellWidgetClass; .pushsection .data; .type sessionShellWidgetClass,@object; .size sessionShellWidgetClass, 4; sessionShellWidgetClass: .long 0; .popsection");
__asm__(".globl shellClassRec; .pushsection .data; .type shellClassRec,@object; .size shellClassRec, 140; shellClassRec: .long 0; .popsection");
__asm__(".globl shellWidgetClass; .pushsection .data; .type shellWidgetClass,@object; .size shellWidgetClass, 4; shellWidgetClass: .long 0; .popsection");
__asm__(".globl topLevelShellClassRec; .pushsection .data; .type topLevelShellClassRec,@object; .size topLevelShellClassRec, 152; topLevelShellClassRec: .long 0; .popsection");
__asm__(".globl topLevelShellWidgetClass; .pushsection .data; .type topLevelShellWidgetClass,@object; .size topLevelShellWidgetClass, 4; topLevelShellWidgetClass: .long 0; .popsection");
__asm__(".globl transientShellClassRec; .pushsection .data; .type transientShellClassRec,@object; .size transientShellClassRec, 152; transientShellClassRec: .long 0; .popsection");
__asm__(".globl transientShellWidgetClass; .pushsection .data; .type transientShellWidgetClass,@object; .size transientShellWidgetClass, 4; transientShellWidgetClass: .long 0; .popsection");
__asm__(".globl widgetClass; .pushsection .data; .type widgetClass,@object; .size widgetClass, 4; widgetClass: .long 0; .popsection");
__asm__(".globl widgetClassRec; .pushsection .data; .type widgetClassRec,@object; .size widgetClassRec, 116; widgetClassRec: .long 0; .popsection");
__asm__(".globl wmShellClassRec; .pushsection .data; .type wmShellClassRec,@object; .size wmShellClassRec, 144; wmShellClassRec: .long 0; .popsection");
__asm__(".globl wmShellWidgetClass; .pushsection .data; .type wmShellWidgetClass,@object; .size wmShellWidgetClass, 4; wmShellWidgetClass: .long 0; .popsection");

View File

@ -0,0 +1,829 @@
LSB_DUMMY { __LSB_DUMMY; };
GLIBC_2.0 {
_IO_feof;
_IO_getc;
_IO_putc;
_IO_puts;
__assert_fail;
__ctype_get_mb_cur_max;
__errno_location;
__fxstat;
__getpagesize;
__getpgid;
__h_errno_location;
__isinf;
__isinff;
__isinfl;
__isnan;
__isnanf;
__isnanl;
__libc_start_main;
__lxstat;
__mempcpy;
__sigsetjmp;
__stpcpy;
__strdup;
__strtod_internal;
__strtof_internal;
__strtok_r;
__strtol_internal;
__strtold_internal;
__strtoll_internal;
__strtoul_internal;
__strtoull_internal;
__sysv_signal;
__wcstod_internal;
__wcstof_internal;
__wcstol_internal;
__wcstold_internal;
__wcstoul_internal;
__xmknod;
__xstat;
_exit;
_longjmp;
_setjmp;
_tolower;
_toupper;
a64l;
abort;
abs;
accept;
access;
acct;
adjtime;
alarm;
asctime;
asctime_r;
asprintf;
atof;
atoi;
atol;
atoll;
authnone_create;
basename;
bcmp;
bcopy;
bind;
bindresvport;
bindtextdomain;
brk;
bsd_signal;
bsearch;
btowc;
bzero;
calloc;
catclose;
catgets;
catopen;
cfgetispeed;
cfgetospeed;
cfmakeraw;
cfsetispeed;
cfsetospeed;
cfsetspeed;
chdir;
chmod;
chroot;
clearerr;
clnt_create;
clnt_pcreateerror;
clnt_perrno;
clnt_perror;
clnt_spcreateerror;
clnt_sperrno;
clnt_sperror;
clock;
close;
closedir;
closelog;
confstr;
connect;
creat;
ctermid;
ctime;
ctime_r;
cuserid;
daemon;
dcgettext;
dgettext;
difftime;
dirname;
div;
drand48;
dup;
dup2;
ecvt;
endgrent;
endprotoent;
endpwent;
endservent;
endutent;
erand48;
err;
error;
errx;
execl;
execle;
execlp;
execv;
execve;
execvp;
exit;
fchdir;
fchmod;
fchown;
fcntl;
fcvt;
fdatasync;
feof;
ferror;
fflush;
fflush_unlocked;
ffs;
fgetc;
fgets;
fileno;
flock;
flockfile;
fork;
fpathconf;
fprintf;
fputc;
fputs;
fread;
free;
freeaddrinfo;
freopen;
fscanf;
fseek;
fsync;
ftell;
ftime;
ftok;
ftruncate;
ftrylockfile;
ftw;
funlockfile;
fwrite;
gcvt;
getaddrinfo;
getc;
getc_unlocked;
getchar;
getchar_unlocked;
getcwd;
getegid;
getenv;
geteuid;
getgid;
getgrent;
getgrgid;
getgrnam;
getgroups;
gethostbyaddr;
gethostbyname;
gethostid;
gethostname;
getitimer;
getlogin;
getlogin_r;
getopt;
getopt_long;
getopt_long_only;
getpagesize;
getpeername;
getpgid;
getpgrp;
getpid;
getppid;
getpriority;
getprotobyname;
getprotobynumber;
getprotoent;
getpwent;
getpwnam;
getpwuid;
getrusage;
getservbyname;
getservbyport;
getservent;
getsid;
getsockname;
getsockopt;
getsubopt;
gettext;
gettimeofday;
getuid;
getutent;
getutent_r;
getw;
getwd;
glob;
globfree;
gmtime;
gmtime_r;
hcreate;
hdestroy;
hsearch;
htonl;
htons;
index;
inet_addr;
inet_ntoa;
inet_ntop;
inet_pton;
initgroups;
initstate;
insque;
ioctl;
isalnum;
isalpha;
isascii;
isatty;
isblank;
iscntrl;
isdigit;
isgraph;
islower;
isprint;
ispunct;
isspace;
isupper;
iswalnum;
iswalpha;
iswcntrl;
iswctype;
iswdigit;
iswgraph;
iswlower;
iswprint;
iswpunct;
iswspace;
iswupper;
iswxdigit;
isxdigit;
jrand48;
kill;
killpg;
l64a;
labs;
lchown;
lcong48;
ldiv;
lfind;
link;
listen;
llabs;
lldiv;
localtime;
localtime_r;
lockf;
longjmp;
lrand48;
lsearch;
lseek;
malloc;
mblen;
mbrlen;
mbrtowc;
mbsinit;
mbsnrtowcs;
mbsrtowcs;
mbstowcs;
mbtowc;
memccpy;
memchr;
memcmp;
memcpy;
memmem;
memmove;
memset;
mkdir;
mkfifo;
mkstemp;
mktemp;
mktime;
mlock;
mlockall;
mmap;
mprotect;
mrand48;
msgget;
msgrcv;
msgsnd;
msync;
munlock;
munlockall;
munmap;
nanosleep;
nice;
nl_langinfo;
nrand48;
ntohl;
ntohs;
open;
opendir;
openlog;
pathconf;
pause;
perror;
pipe;
pmap_getport;
pmap_set;
pmap_unset;
poll;
printf;
psignal;
putc;
putc_unlocked;
putchar;
putchar_unlocked;
putenv;
puts;
putw;
qsort;
raise;
rand;
rand_r;
random;
read;
readdir;
readdir_r;
readlink;
readv;
realloc;
recv;
recvfrom;
recvmsg;
regcomp;
regerror;
regfree;
remove;
remque;
rename;
rewind;
rewinddir;
rindex;
rmdir;
sbrk;
scanf;
sched_get_priority_max;
sched_get_priority_min;
sched_getparam;
sched_getscheduler;
sched_rr_get_interval;
sched_setparam;
sched_setscheduler;
sched_yield;
seed48;
seekdir;
select;
semget;
semop;
send;
sendmsg;
sendto;
setbuf;
setbuffer;
setcontext;
setegid;
setenv;
seteuid;
setgid;
setgrent;
setgroups;
sethostname;
setitimer;
setlocale;
setlogmask;
setpgid;
setpgrp;
setpriority;
setprotoent;
setpwent;
setregid;
setreuid;
setservent;
setsid;
setsockopt;
setstate;
setuid;
setutent;
setvbuf;
shmat;
shmdt;
shmget;
shutdown;
sigaction;
sigaddset;
sigaltstack;
sigandset;
sigdelset;
sigemptyset;
sigfillset;
siginterrupt;
sigisemptyset;
sigismember;
siglongjmp;
signal;
sigorset;
sigpause;
sigpending;
sigprocmask;
sigreturn;
sigsuspend;
sigwait;
sleep;
snprintf;
socket;
socketpair;
sprintf;
srand;
srand48;
srandom;
sscanf;
stime;
stpcpy;
stpncpy;
strcasecmp;
strcat;
strchr;
strcmp;
strcoll;
strcpy;
strcspn;
strdup;
strerror;
strerror_r;
strfmon;
strftime;
strlen;
strncasecmp;
strncat;
strncmp;
strncpy;
strndup;
strnlen;
strpbrk;
strptime;
strrchr;
strsep;
strsignal;
strspn;
strstr;
strtod;
strtof;
strtok;
strtok_r;
strtol;
strtold;
strtoll;
strtoq;
strtoul;
strtoull;
strtouq;
strxfrm;
svc_getreqset;
svc_register;
svc_run;
svc_sendreply;
svcerr_auth;
svcerr_decode;
svcerr_noproc;
svcerr_noprog;
svcerr_progvers;
svcerr_systemerr;
svcerr_weakauth;
svctcp_create;
svcudp_create;
swab;
symlink;
sync;
sysconf;
syslog;
system;
tcdrain;
tcflow;
tcflush;
tcgetattr;
tcgetpgrp;
tcsendbreak;
tcsetattr;
tcsetpgrp;
tdelete;
telldir;
tempnam;
textdomain;
tfind;
time;
times;
tmpnam;
toascii;
tolower;
toupper;
towctrans;
towlower;
towupper;
truncate;
tsearch;
ttyname;
ttyname_r;
twalk;
tzset;
ualarm;
ulimit;
umask;
uname;
ungetc;
unlink;
unsetenv;
usleep;
utime;
utimes;
utmpname;
vasprintf;
vdprintf;
verrx;
vfork;
vfprintf;
vfscanf;
vprintf;
vscanf;
vsnprintf;
vsprintf;
vsscanf;
vsyslog;
wait;
wait4;
waitpid;
warn;
warnx;
wcpcpy;
wcpncpy;
wcrtomb;
wcscat;
wcschr;
wcscmp;
wcscoll;
wcscpy;
wcscspn;
wcsdup;
wcslen;
wcsncat;
wcsncmp;
wcsncpy;
wcsnrtombs;
wcspbrk;
wcsrchr;
wcsrtombs;
wcsspn;
wcsstr;
wcstod;
wcstof;
wcstok;
wcstol;
wcstold;
wcstombs;
wcstoq;
wcstoul;
wcstouq;
wcswidth;
wcsxfrm;
wctob;
wctomb;
wctrans;
wctype;
wcwidth;
wmemchr;
wmemcmp;
wmemcpy;
wmemmove;
wmemset;
write;
writev;
xdr_accepted_reply;
xdr_array;
xdr_bool;
xdr_bytes;
xdr_callhdr;
xdr_callmsg;
xdr_char;
xdr_double;
xdr_enum;
xdr_float;
xdr_free;
xdr_int;
xdr_long;
xdr_opaque;
xdr_opaque_auth;
xdr_pointer;
xdr_reference;
xdr_rejected_reply;
xdr_replymsg;
xdr_short;
xdr_string;
xdr_u_char;
xdr_u_int;
xdr_u_long;
xdr_u_short;
xdr_union;
xdr_vector;
xdr_void;
xdr_wrapstring;
xdrmem_create;
xdrrec_create;
xdrrec_eof;
__daylight;
__environ;
__timezone;
__tzname;
_environ;
_nl_msg_cat_cntr;
daylight;
environ;
optarg;
opterr;
optind;
optopt;
stderr;
stdin;
stdout;
timezone;
tzname;
};
GLIBC_2.1 {
__libc_current_sigrtmax;
__libc_current_sigrtmin;
__rawmemchr;
chown;
creat64;
endutxent;
fclose;
fdopen;
fmtmsg;
fopen;
fopen64;
freopen64;
fseeko;
fseeko64;
fstatvfs;
fstatvfs64;
ftello;
ftello64;
ftruncate64;
ftw64;
gai_strerror;
getcontext;
getdate;
getnameinfo;
getutxent;
getutxid;
getutxline;
globfree64;
grantpt;
iconv;
iconv_close;
iconv_open;
if_freenameindex;
if_indextoname;
if_nameindex;
if_nametoindex;
iswblank;
key_decryptsession;
lockf64;
makecontext;
mmap64;
pclose;
popen;
ptsname;
pututxline;
setrlimit64;
setutxent;
sighold;
sigignore;
sigqueue;
sigrelse;
sigset;
sigtimedwait;
sigwaitinfo;
statvfs;
statvfs64;
strcasestr;
strtoimax;
strtoumax;
swapcontext;
tcgetsid;
tmpfile;
tmpfile64;
truncate64;
unlockpt;
wcscasecmp;
wcsncasecmp;
wcsnlen;
wcstoimax;
wcstoll;
wcstoull;
wcstoumax;
wcswcs;
wordexp;
wordfree;
getdate_err;
};
GLIBC_2.1.1 {
_Exit;
imaxabs;
imaxdiv;
};
GLIBC_2.1.2 {
getgrgid_r;
getgrnam_r;
getpwnam_r;
getpwuid_r;
};
GLIBC_2.1.3 {
__cxa_atexit;
};
GLIBC_2.2 {
__fpending;
__fxstat64;
__lxstat64;
__sysconf;
__xstat64;
bind_textdomain_codeset;
dcngettext;
dngettext;
fgetpos;
fgetpos64;
fgetwc;
fgetwc_unlocked;
fgetws;
fputwc;
fputws;
fsetpos;
fsetpos64;
fwide;
fwprintf;
fwscanf;
getloadavg;
getrlimit;
getrlimit64;
getwc;
getwchar;
glob64;
localeconv;
memrchr;
mkstemp64;
msgctl;
ngettext;
posix_memalign;
putwc;
putwchar;
readdir64;
semctl;
setrlimit;
shmctl;
swprintf;
swscanf;
ungetwc;
vfwprintf;
vfwscanf;
vswprintf;
vswscanf;
vwprintf;
vwscanf;
wcsftime;
wprintf;
wscanf;
};
GLIBC_2.2.1 {
posix_openpt;
};
GLIBC_2.2.3 {
fnmatch;
};
GLIBC_2.2.4 {
getgrouplist;
sockatmark;
};
GLIBC_2.3 {
__ctype_b_loc;
__ctype_tolower_loc;
__ctype_toupper_loc;
duplocale;
freelocale;
newlocale;
realpath;
uselocale;
_sys_errlist;
};
GLIBC_2.3.2 {
__register_atfork;
};
GLIBC_2.3.3 {
nftw;
nftw64;
_sys_siglist;
};
GLIBC_2.3.4 {
regexec;
};

View File

@ -0,0 +1,804 @@
void _Exit() {} ;
void _IO_feof() {} ;
void _IO_getc() {} ;
void _IO_putc() {} ;
void _IO_puts() {} ;
void __assert_fail() {} ;
void __ctype_b_loc() {} ;
void __ctype_get_mb_cur_max() {} ;
void __ctype_tolower_loc() {} ;
void __ctype_toupper_loc() {} ;
void __cxa_atexit() {} ;
void __errno_location() {} ;
void __fpending() {} ;
void __fxstat() {} ;
void __fxstat64() {} ;
void __getpagesize() {} ;
void __getpgid() {} ;
void __h_errno_location() {} ;
void __isinf() {} ;
void __isinff() {} ;
void __isinfl() {} ;
void __isnan() {} ;
void __isnanf() {} ;
void __isnanl() {} ;
void __libc_current_sigrtmax() {} ;
void __libc_current_sigrtmin() {} ;
void __libc_start_main() {} ;
void __lxstat() {} ;
void __lxstat64() {} ;
void __mempcpy() {} ;
void __rawmemchr() {} ;
void __register_atfork() {} ;
void __sigsetjmp() {} ;
void __stpcpy() {} ;
void __strdup() {} ;
void __strtod_internal() {} ;
void __strtof_internal() {} ;
void __strtok_r() {} ;
void __strtol_internal() {} ;
void __strtold_internal() {} ;
void __strtoll_internal() {} ;
void __strtoul_internal() {} ;
void __strtoull_internal() {} ;
void __sysconf() {} ;
void __sysv_signal() {} ;
void __wcstod_internal() {} ;
void __wcstof_internal() {} ;
void __wcstol_internal() {} ;
void __wcstold_internal() {} ;
void __wcstoul_internal() {} ;
void __xmknod() {} ;
void __xstat() {} ;
void __xstat64() {} ;
void _exit() {} ;
void _longjmp() {} ;
void _setjmp() {} ;
void _tolower() {} ;
void _toupper() {} ;
void a64l() {} ;
void abort() {} ;
void abs() {} ;
void accept() {} ;
void access() {} ;
void acct() {} ;
void adjtime() {} ;
void alarm() {} ;
void asctime() {} ;
void asctime_r() {} ;
void asprintf() {} ;
void atof() {} ;
void atoi() {} ;
void atol() {} ;
void atoll() {} ;
void authnone_create() {} ;
void basename() {} ;
void bcmp() {} ;
void bcopy() {} ;
void bind() {} ;
void bind_textdomain_codeset() {} ;
void bindresvport() {} ;
void bindtextdomain() {} ;
void brk() {} ;
void bsd_signal() {} ;
void bsearch() {} ;
void btowc() {} ;
void bzero() {} ;
void calloc() {} ;
void catclose() {} ;
void catgets() {} ;
void catopen() {} ;
void cfgetispeed() {} ;
void cfgetospeed() {} ;
void cfmakeraw() {} ;
void cfsetispeed() {} ;
void cfsetospeed() {} ;
void cfsetspeed() {} ;
void chdir() {} ;
void chmod() {} ;
void chown() {} ;
void chroot() {} ;
void clearerr() {} ;
void clnt_create() {} ;
void clnt_pcreateerror() {} ;
void clnt_perrno() {} ;
void clnt_perror() {} ;
void clnt_spcreateerror() {} ;
void clnt_sperrno() {} ;
void clnt_sperror() {} ;
void clock() {} ;
void close() {} ;
void closedir() {} ;
void closelog() {} ;
void confstr() {} ;
void connect() {} ;
void creat() {} ;
void creat64() {} ;
void ctermid() {} ;
void ctime() {} ;
void ctime_r() {} ;
void cuserid() {} ;
void daemon() {} ;
void dcgettext() {} ;
void dcngettext() {} ;
void dgettext() {} ;
void difftime() {} ;
void dirname() {} ;
void div() {} ;
void dngettext() {} ;
void drand48() {} ;
void dup() {} ;
void dup2() {} ;
void duplocale() {} ;
void ecvt() {} ;
void endgrent() {} ;
void endprotoent() {} ;
void endpwent() {} ;
void endservent() {} ;
void endutent() {} ;
void endutxent() {} ;
void erand48() {} ;
void err() {} ;
void error() {} ;
void errx() {} ;
void execl() {} ;
void execle() {} ;
void execlp() {} ;
void execv() {} ;
void execve() {} ;
void execvp() {} ;
void exit() {} ;
void fchdir() {} ;
void fchmod() {} ;
void fchown() {} ;
void fclose() {} ;
void fcntl() {} ;
void fcvt() {} ;
void fdatasync() {} ;
void fdopen() {} ;
void feof() {} ;
void ferror() {} ;
void fflush() {} ;
void fflush_unlocked() {} ;
void ffs() {} ;
void fgetc() {} ;
void fgetpos() {} ;
void fgetpos64() {} ;
void fgets() {} ;
void fgetwc() {} ;
void fgetwc_unlocked() {} ;
void fgetws() {} ;
void fileno() {} ;
void flock() {} ;
void flockfile() {} ;
void fmtmsg() {} ;
void fnmatch() {} ;
void fopen() {} ;
void fopen64() {} ;
void fork() {} ;
void fpathconf() {} ;
void fprintf() {} ;
void fputc() {} ;
void fputs() {} ;
void fputwc() {} ;
void fputws() {} ;
void fread() {} ;
void free() {} ;
void freeaddrinfo() {} ;
void freelocale() {} ;
void freopen() {} ;
void freopen64() {} ;
void fscanf() {} ;
void fseek() {} ;
void fseeko() {} ;
void fseeko64() {} ;
void fsetpos() {} ;
void fsetpos64() {} ;
void fstatvfs() {} ;
void fstatvfs64() {} ;
void fsync() {} ;
void ftell() {} ;
void ftello() {} ;
void ftello64() {} ;
void ftime() {} ;
void ftok() {} ;
void ftruncate() {} ;
void ftruncate64() {} ;
void ftrylockfile() {} ;
void ftw() {} ;
void ftw64() {} ;
void funlockfile() {} ;
void fwide() {} ;
void fwprintf() {} ;
void fwrite() {} ;
void fwscanf() {} ;
void gai_strerror() {} ;
void gcvt() {} ;
void getaddrinfo() {} ;
void getc() {} ;
void getc_unlocked() {} ;
void getchar() {} ;
void getchar_unlocked() {} ;
void getcontext() {} ;
void getcwd() {} ;
void getdate() {} ;
void getegid() {} ;
void getenv() {} ;
void geteuid() {} ;
void getgid() {} ;
void getgrent() {} ;
void getgrgid() {} ;
void getgrgid_r() {} ;
void getgrnam() {} ;
void getgrnam_r() {} ;
void getgrouplist() {} ;
void getgroups() {} ;
void gethostbyaddr() {} ;
void gethostbyname() {} ;
void gethostid() {} ;
void gethostname() {} ;
void getitimer() {} ;
void getloadavg() {} ;
void getlogin() {} ;
void getlogin_r() {} ;
void getnameinfo() {} ;
void getopt() {} ;
void getopt_long() {} ;
void getopt_long_only() {} ;
void getpagesize() {} ;
void getpeername() {} ;
void getpgid() {} ;
void getpgrp() {} ;
void getpid() {} ;
void getppid() {} ;
void getpriority() {} ;
void getprotobyname() {} ;
void getprotobynumber() {} ;
void getprotoent() {} ;
void getpwent() {} ;
void getpwnam() {} ;
void getpwnam_r() {} ;
void getpwuid() {} ;
void getpwuid_r() {} ;
void getrlimit() {} ;
void getrlimit64() {} ;
void getrusage() {} ;
void getservbyname() {} ;
void getservbyport() {} ;
void getservent() {} ;
void getsid() {} ;
void getsockname() {} ;
void getsockopt() {} ;
void getsubopt() {} ;
void gettext() {} ;
void gettimeofday() {} ;
void getuid() {} ;
void getutent() {} ;
void getutent_r() {} ;
void getutxent() {} ;
void getutxid() {} ;
void getutxline() {} ;
void getw() {} ;
void getwc() {} ;
void getwchar() {} ;
void getwd() {} ;
void glob() {} ;
void glob64() {} ;
void globfree() {} ;
void globfree64() {} ;
void gmtime() {} ;
void gmtime_r() {} ;
void grantpt() {} ;
void hcreate() {} ;
void hdestroy() {} ;
void hsearch() {} ;
void htonl() {} ;
void htons() {} ;
void iconv() {} ;
void iconv_close() {} ;
void iconv_open() {} ;
void if_freenameindex() {} ;
void if_indextoname() {} ;
void if_nameindex() {} ;
void if_nametoindex() {} ;
void imaxabs() {} ;
void imaxdiv() {} ;
void index() {} ;
void inet_addr() {} ;
void inet_ntoa() {} ;
void inet_ntop() {} ;
void inet_pton() {} ;
void initgroups() {} ;
void initstate() {} ;
void insque() {} ;
void ioctl() {} ;
void isalnum() {} ;
void isalpha() {} ;
void isascii() {} ;
void isatty() {} ;
void isblank() {} ;
void iscntrl() {} ;
void isdigit() {} ;
void isgraph() {} ;
void islower() {} ;
void isprint() {} ;
void ispunct() {} ;
void isspace() {} ;
void isupper() {} ;
void iswalnum() {} ;
void iswalpha() {} ;
void iswblank() {} ;
void iswcntrl() {} ;
void iswctype() {} ;
void iswdigit() {} ;
void iswgraph() {} ;
void iswlower() {} ;
void iswprint() {} ;
void iswpunct() {} ;
void iswspace() {} ;
void iswupper() {} ;
void iswxdigit() {} ;
void isxdigit() {} ;
void jrand48() {} ;
void key_decryptsession() {} ;
void kill() {} ;
void killpg() {} ;
void l64a() {} ;
void labs() {} ;
void lchown() {} ;
void lcong48() {} ;
void ldiv() {} ;
void lfind() {} ;
void link() {} ;
void listen() {} ;
void llabs() {} ;
void lldiv() {} ;
void localeconv() {} ;
void localtime() {} ;
void localtime_r() {} ;
void lockf() {} ;
void lockf64() {} ;
void longjmp() {} ;
void lrand48() {} ;
void lsearch() {} ;
void lseek() {} ;
void makecontext() {} ;
void malloc() {} ;
void mblen() {} ;
void mbrlen() {} ;
void mbrtowc() {} ;
void mbsinit() {} ;
void mbsnrtowcs() {} ;
void mbsrtowcs() {} ;
void mbstowcs() {} ;
void mbtowc() {} ;
void memccpy() {} ;
void memchr() {} ;
void memcmp() {} ;
void memcpy() {} ;
void memmem() {} ;
void memmove() {} ;
void memrchr() {} ;
void memset() {} ;
void mkdir() {} ;
void mkfifo() {} ;
void mkstemp() {} ;
void mkstemp64() {} ;
void mktemp() {} ;
void mktime() {} ;
void mlock() {} ;
void mlockall() {} ;
void mmap() {} ;
void mmap64() {} ;
void mprotect() {} ;
void mrand48() {} ;
void msgctl() {} ;
void msgget() {} ;
void msgrcv() {} ;
void msgsnd() {} ;
void msync() {} ;
void munlock() {} ;
void munlockall() {} ;
void munmap() {} ;
void nanosleep() {} ;
void newlocale() {} ;
void nftw() {} ;
void nftw64() {} ;
void ngettext() {} ;
void nice() {} ;
void nl_langinfo() {} ;
void nrand48() {} ;
void ntohl() {} ;
void ntohs() {} ;
void open() {} ;
void opendir() {} ;
void openlog() {} ;
void pathconf() {} ;
void pause() {} ;
void pclose() {} ;
void perror() {} ;
void pipe() {} ;
void pmap_getport() {} ;
void pmap_set() {} ;
void pmap_unset() {} ;
void poll() {} ;
void popen() {} ;
void posix_memalign() {} ;
void posix_openpt() {} ;
void printf() {} ;
void psignal() {} ;
void ptsname() {} ;
void putc() {} ;
void putc_unlocked() {} ;
void putchar() {} ;
void putchar_unlocked() {} ;
void putenv() {} ;
void puts() {} ;
void pututxline() {} ;
void putw() {} ;
void putwc() {} ;
void putwchar() {} ;
void qsort() {} ;
void raise() {} ;
void rand() {} ;
void rand_r() {} ;
void random() {} ;
void read() {} ;
void readdir() {} ;
void readdir64() {} ;
void readdir_r() {} ;
void readlink() {} ;
void readv() {} ;
void realloc() {} ;
void realpath() {} ;
void recv() {} ;
void recvfrom() {} ;
void recvmsg() {} ;
void regcomp() {} ;
void regerror() {} ;
void regexec() {} ;
void regfree() {} ;
void remove() {} ;
void remque() {} ;
void rename() {} ;
void rewind() {} ;
void rewinddir() {} ;
void rindex() {} ;
void rmdir() {} ;
void sbrk() {} ;
void scanf() {} ;
void sched_get_priority_max() {} ;
void sched_get_priority_min() {} ;
void sched_getparam() {} ;
void sched_getscheduler() {} ;
void sched_rr_get_interval() {} ;
void sched_setparam() {} ;
void sched_setscheduler() {} ;
void sched_yield() {} ;
void seed48() {} ;
void seekdir() {} ;
void select() {} ;
void semctl() {} ;
void semget() {} ;
void semop() {} ;
void send() {} ;
void sendmsg() {} ;
void sendto() {} ;
void setbuf() {} ;
void setbuffer() {} ;
void setcontext() {} ;
void setegid() {} ;
void setenv() {} ;
void seteuid() {} ;
void setgid() {} ;
void setgrent() {} ;
void setgroups() {} ;
void sethostname() {} ;
void setitimer() {} ;
void setlocale() {} ;
void setlogmask() {} ;
void setpgid() {} ;
void setpgrp() {} ;
void setpriority() {} ;
void setprotoent() {} ;
void setpwent() {} ;
void setregid() {} ;
void setreuid() {} ;
void setrlimit() {} ;
void setrlimit64() {} ;
void setservent() {} ;
void setsid() {} ;
void setsockopt() {} ;
void setstate() {} ;
void setuid() {} ;
void setutent() {} ;
void setutxent() {} ;
void setvbuf() {} ;
void shmat() {} ;
void shmctl() {} ;
void shmdt() {} ;
void shmget() {} ;
void shutdown() {} ;
void sigaction() {} ;
void sigaddset() {} ;
void sigaltstack() {} ;
void sigandset() {} ;
void sigdelset() {} ;
void sigemptyset() {} ;
void sigfillset() {} ;
void sighold() {} ;
void sigignore() {} ;
void siginterrupt() {} ;
void sigisemptyset() {} ;
void sigismember() {} ;
void siglongjmp() {} ;
void signal() {} ;
void sigorset() {} ;
void sigpause() {} ;
void sigpending() {} ;
void sigprocmask() {} ;
void sigqueue() {} ;
void sigrelse() {} ;
void sigreturn() {} ;
void sigset() {} ;
void sigsuspend() {} ;
void sigtimedwait() {} ;
void sigwait() {} ;
void sigwaitinfo() {} ;
void sleep() {} ;
void snprintf() {} ;
void sockatmark() {} ;
void socket() {} ;
void socketpair() {} ;
void sprintf() {} ;
void srand() {} ;
void srand48() {} ;
void srandom() {} ;
void sscanf() {} ;
void statvfs() {} ;
void statvfs64() {} ;
void stime() {} ;
void stpcpy() {} ;
void stpncpy() {} ;
void strcasecmp() {} ;
void strcasestr() {} ;
void strcat() {} ;
void strchr() {} ;
void strcmp() {} ;
void strcoll() {} ;
void strcpy() {} ;
void strcspn() {} ;
void strdup() {} ;
void strerror() {} ;
void strerror_r() {} ;
void strfmon() {} ;
void strftime() {} ;
void strlen() {} ;
void strncasecmp() {} ;
void strncat() {} ;
void strncmp() {} ;
void strncpy() {} ;
void strndup() {} ;
void strnlen() {} ;
void strpbrk() {} ;
void strptime() {} ;
void strrchr() {} ;
void strsep() {} ;
void strsignal() {} ;
void strspn() {} ;
void strstr() {} ;
void strtod() {} ;
void strtof() {} ;
void strtoimax() {} ;
void strtok() {} ;
void strtok_r() {} ;
void strtol() {} ;
void strtold() {} ;
void strtoll() {} ;
void strtoq() {} ;
void strtoul() {} ;
void strtoull() {} ;
void strtoumax() {} ;
void strtouq() {} ;
void strxfrm() {} ;
void svc_getreqset() {} ;
void svc_register() {} ;
void svc_run() {} ;
void svc_sendreply() {} ;
void svcerr_auth() {} ;
void svcerr_decode() {} ;
void svcerr_noproc() {} ;
void svcerr_noprog() {} ;
void svcerr_progvers() {} ;
void svcerr_systemerr() {} ;
void svcerr_weakauth() {} ;
void svctcp_create() {} ;
void svcudp_create() {} ;
void swab() {} ;
void swapcontext() {} ;
void swprintf() {} ;
void swscanf() {} ;
void symlink() {} ;
void sync() {} ;
void sysconf() {} ;
void syslog() {} ;
void system() {} ;
void tcdrain() {} ;
void tcflow() {} ;
void tcflush() {} ;
void tcgetattr() {} ;
void tcgetpgrp() {} ;
void tcgetsid() {} ;
void tcsendbreak() {} ;
void tcsetattr() {} ;
void tcsetpgrp() {} ;
void tdelete() {} ;
void telldir() {} ;
void tempnam() {} ;
void textdomain() {} ;
void tfind() {} ;
void time() {} ;
void times() {} ;
void tmpfile() {} ;
void tmpfile64() {} ;
void tmpnam() {} ;
void toascii() {} ;
void tolower() {} ;
void toupper() {} ;
void towctrans() {} ;
void towlower() {} ;
void towupper() {} ;
void truncate() {} ;
void truncate64() {} ;
void tsearch() {} ;
void ttyname() {} ;
void ttyname_r() {} ;
void twalk() {} ;
void tzset() {} ;
void ualarm() {} ;
void ulimit() {} ;
void umask() {} ;
void uname() {} ;
void ungetc() {} ;
void ungetwc() {} ;
void unlink() {} ;
void unlockpt() {} ;
void unsetenv() {} ;
void uselocale() {} ;
void usleep() {} ;
void utime() {} ;
void utimes() {} ;
void utmpname() {} ;
void vasprintf() {} ;
void vdprintf() {} ;
void verrx() {} ;
void vfork() {} ;
void vfprintf() {} ;
void vfscanf() {} ;
void vfwprintf() {} ;
void vfwscanf() {} ;
void vprintf() {} ;
void vscanf() {} ;
void vsnprintf() {} ;
void vsprintf() {} ;
void vsscanf() {} ;
void vswprintf() {} ;
void vswscanf() {} ;
void vsyslog() {} ;
void vwprintf() {} ;
void vwscanf() {} ;
void wait() {} ;
void wait4() {} ;
void waitpid() {} ;
void warn() {} ;
void warnx() {} ;
void wcpcpy() {} ;
void wcpncpy() {} ;
void wcrtomb() {} ;
void wcscasecmp() {} ;
void wcscat() {} ;
void wcschr() {} ;
void wcscmp() {} ;
void wcscoll() {} ;
void wcscpy() {} ;
void wcscspn() {} ;
void wcsdup() {} ;
void wcsftime() {} ;
void wcslen() {} ;
void wcsncasecmp() {} ;
void wcsncat() {} ;
void wcsncmp() {} ;
void wcsncpy() {} ;
void wcsnlen() {} ;
void wcsnrtombs() {} ;
void wcspbrk() {} ;
void wcsrchr() {} ;
void wcsrtombs() {} ;
void wcsspn() {} ;
void wcsstr() {} ;
void wcstod() {} ;
void wcstof() {} ;
void wcstoimax() {} ;
void wcstok() {} ;
void wcstol() {} ;
void wcstold() {} ;
void wcstoll() {} ;
void wcstombs() {} ;
void wcstoq() {} ;
void wcstoul() {} ;
void wcstoull() {} ;
void wcstoumax() {} ;
void wcstouq() {} ;
void wcswcs() {} ;
void wcswidth() {} ;
void wcsxfrm() {} ;
void wctob() {} ;
void wctomb() {} ;
void wctrans() {} ;
void wctype() {} ;
void wcwidth() {} ;
void wmemchr() {} ;
void wmemcmp() {} ;
void wmemcpy() {} ;
void wmemmove() {} ;
void wmemset() {} ;
void wordexp() {} ;
void wordfree() {} ;
void wprintf() {} ;
void write() {} ;
void writev() {} ;
void wscanf() {} ;
void xdr_accepted_reply() {} ;
void xdr_array() {} ;
void xdr_bool() {} ;
void xdr_bytes() {} ;
void xdr_callhdr() {} ;
void xdr_callmsg() {} ;
void xdr_char() {} ;
void xdr_double() {} ;
void xdr_enum() {} ;
void xdr_float() {} ;
void xdr_free() {} ;
void xdr_int() {} ;
void xdr_long() {} ;
void xdr_opaque() {} ;
void xdr_opaque_auth() {} ;
void xdr_pointer() {} ;
void xdr_reference() {} ;
void xdr_rejected_reply() {} ;
void xdr_replymsg() {} ;
void xdr_short() {} ;
void xdr_string() {} ;
void xdr_u_char() {} ;
void xdr_u_int() {} ;
void xdr_u_long() {} ;
void xdr_u_short() {} ;
void xdr_union() {} ;
void xdr_vector() {} ;
void xdr_void() {} ;
void xdr_wrapstring() {} ;
void xdrmem_create() {} ;
void xdrrec_create() {} ;
void xdrrec_eof() {} ;
__asm__(".globl __daylight; .pushsection .data; .type __daylight,@object; .size __daylight, 4; __daylight: .long 0; .popsection");
__asm__(".globl __environ; .pushsection .data; .type __environ,@object; .size __environ, 4; __environ: .long 0; .popsection");
__asm__(".globl __timezone; .pushsection .data; .type __timezone,@object; .size __timezone, 4; __timezone: .long 0; .popsection");
__asm__(".globl __tzname; .pushsection .data; .type __tzname,@object; .size __tzname, 8; __tzname: .long 0; .popsection");
__asm__(".weak _environ; _environ = __environ");
__asm__(".comm _nl_msg_cat_cntr,4");
__asm__(".globl _sys_errlist; .pushsection .data; .type _sys_errlist,@object; .size _sys_errlist, 0; _sys_errlist: .long 0; .popsection");
__asm__(".comm _sys_siglist,0");
__asm__(".weak daylight; daylight = __daylight");
__asm__(".weak environ; environ = __environ");
__asm__(".comm getdate_err,4");
__asm__(".comm optarg,4");
__asm__(".comm opterr,4");
__asm__(".comm optind,4");
__asm__(".comm optopt,4");
__asm__(".comm stderr,4");
__asm__(".comm stdin,4");
__asm__(".comm stdout,4");
__asm__(".weak timezone; timezone = __timezone");
__asm__(".weak tzname; tzname = __tzname");
extern const int _IO_stdin_used;
__asm__(".weak _IO_stdin_used;.weak _LSB_IO_stdin_used; _LSB_IO_stdin_used=_IO_stdin_used ");

View File

@ -0,0 +1,100 @@
/* Startup support for ELF initializers/finalizers in the main executable.
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
In addition to the permissions in the GNU Lesser General Public
License, the Free Software Foundation gives you unlimited
permission to link the compiled version of this file with other
programs, and to distribute those programs without any restriction
coming from the use of this file. (The GNU Lesser General Public
License restrictions do apply in other respects; for example, they
cover modification of the file, and distribution when not linked
into another program.)
Note that people who make modified versions of this file are not
obligated to grant this special exception for their modified
versions; it is their choice whether to do so. The GNU Lesser
General Public License gives permission to release a modified
version without this exception; this exception also makes it
possible to release a modified version which carries forward this
exception.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include "config.h"
#include <stddef.h>
#ifdef HAVE_INITFINI_ARRAY
/* These magic symbols are provided by the linker. */
extern void (*__preinit_array_start []) (void) attribute_hidden;
extern void (*__preinit_array_end []) (void) attribute_hidden;
extern void (*__init_array_start []) (void) attribute_hidden;
extern void (*__init_array_end []) (void) attribute_hidden;
extern void (*__fini_array_start []) (void) attribute_hidden;
extern void (*__fini_array_end []) (void) attribute_hidden;
#endif
/* These function symbols are provided for the .init/.fini section entry
points automagically by the linker. */
extern void _init (void);
extern void _fini (void);
/* These functions are passed to __libc_start_main by the startup code.
These get statically linked into each program. For dynamically linked
programs, this module will come from libc_nonshared.a and differs from
the libc.a module in that it doesn't call the preinit array. */
void
__libc_csu_init (void)
{
#ifdef HAVE_INITFINI_ARRAY
/* For dynamically linked executables the preinit array is executed by
the dynamic linker (before initializing any shared object. */
# ifndef LIBC_NONSHARED
/* For static executables, preinit happens rights before init. */
{
const size_t size = __preinit_array_end - __preinit_array_start;
size_t i;
for (i = 0; i < size; i++)
(*__preinit_array_start [i]) ();
}
# endif
#endif
_init ();
#ifdef HAVE_INITFINI_ARRAY
{
const size_t size = __init_array_end - __init_array_start;
size_t i;
for (i = 0; i < size; i++)
(*__init_array_start [i]) ();
}
#endif
}
void
__libc_csu_fini (void)
{
#ifdef HAVE_INITFINI_ARRAY
size_t i = __fini_array_end - __fini_array_start;
while (i-- > 0)
(*__fini_array_start [i]) ();
#endif
_fini ();
}

View File

@ -0,0 +1,10 @@
LSB_DUMMY { __LSB_DUMMY; };
GLIBC_2.0 {
dladdr;
dlclose;
dlerror;
dlsym;
};
GLIBC_2.1 {
dlopen;
};

View File

@ -0,0 +1,5 @@
void dladdr() {} ;
void dlclose() {} ;
void dlerror() {} ;
void dlopen() {} ;
void dlsym() {} ;

View File

@ -0,0 +1,22 @@
LSB_DUMMY { __LSB_DUMMY; };
GCC_3.0 {
_Unwind_DeleteException;
_Unwind_Find_FDE;
_Unwind_ForcedUnwind;
_Unwind_GetDataRelBase;
_Unwind_GetGR;
_Unwind_GetIP;
_Unwind_GetLanguageSpecificData;
_Unwind_GetRegionStart;
_Unwind_GetTextRelBase;
_Unwind_RaiseException;
_Unwind_Resume;
_Unwind_SetGR;
_Unwind_SetIP;
};
GCC_3.3 {
_Unwind_Backtrace;
_Unwind_FindEnclosingFunction;
_Unwind_GetCFA;
_Unwind_Resume_or_Rethrow;
};

View File

@ -0,0 +1,17 @@
void _Unwind_Backtrace() {} ;
void _Unwind_DeleteException() {} ;
void _Unwind_FindEnclosingFunction() {} ;
void _Unwind_Find_FDE() {} ;
void _Unwind_ForcedUnwind() {} ;
void _Unwind_GetCFA() {} ;
void _Unwind_GetDataRelBase() {} ;
void _Unwind_GetGR() {} ;
void _Unwind_GetIP() {} ;
void _Unwind_GetLanguageSpecificData() {} ;
void _Unwind_GetRegionStart() {} ;
void _Unwind_GetTextRelBase() {} ;
void _Unwind_RaiseException() {} ;
void _Unwind_Resume() {} ;
void _Unwind_Resume_or_Rethrow() {} ;
void _Unwind_SetGR() {} ;
void _Unwind_SetIP() {} ;

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

View File

@ -0,0 +1,546 @@
void gdk_add_client_message_filter() {} ;
void gdk_atom_intern() {} ;
void gdk_atom_name() {} ;
void gdk_axis_use_get_type() {} ;
void gdk_beep() {} ;
void gdk_bitmap_create_from_data() {} ;
void gdk_byte_order_get_type() {} ;
void gdk_cap_style_get_type() {} ;
void gdk_color_copy() {} ;
void gdk_color_equal() {} ;
void gdk_color_free() {} ;
void gdk_color_get_type() {} ;
void gdk_color_hash() {} ;
void gdk_color_parse() {} ;
void gdk_colormap_alloc_color() {} ;
void gdk_colormap_alloc_colors() {} ;
void gdk_colormap_free_colors() {} ;
void gdk_colormap_get_screen() {} ;
void gdk_colormap_get_system() {} ;
void gdk_colormap_get_type() {} ;
void gdk_colormap_get_visual() {} ;
void gdk_colormap_new() {} ;
void gdk_colormap_query_color() {} ;
void gdk_crossing_mode_get_type() {} ;
void gdk_cursor_get_display() {} ;
void gdk_cursor_get_type() {} ;
void gdk_cursor_new() {} ;
void gdk_cursor_new_for_display() {} ;
void gdk_cursor_new_from_pixbuf() {} ;
void gdk_cursor_new_from_pixmap() {} ;
void gdk_cursor_ref() {} ;
void gdk_cursor_type_get_type() {} ;
void gdk_cursor_unref() {} ;
void gdk_device_free_history() {} ;
void gdk_device_get_axis() {} ;
void gdk_device_get_core_pointer() {} ;
void gdk_device_get_history() {} ;
void gdk_device_get_state() {} ;
void gdk_device_get_type() {} ;
void gdk_device_set_axis_use() {} ;
void gdk_device_set_key() {} ;
void gdk_device_set_mode() {} ;
void gdk_device_set_source() {} ;
void gdk_devices_list() {} ;
void gdk_display_add_client_message_filter() {} ;
void gdk_display_beep() {} ;
void gdk_display_close() {} ;
void gdk_display_flush() {} ;
void gdk_display_get_core_pointer() {} ;
void gdk_display_get_default() {} ;
void gdk_display_get_default_cursor_size() {} ;
void gdk_display_get_default_group() {} ;
void gdk_display_get_default_screen() {} ;
void gdk_display_get_event() {} ;
void gdk_display_get_maximal_cursor_size() {} ;
void gdk_display_get_n_screens() {} ;
void gdk_display_get_name() {} ;
void gdk_display_get_pointer() {} ;
void gdk_display_get_screen() {} ;
void gdk_display_get_type() {} ;
void gdk_display_get_window_at_pointer() {} ;
void gdk_display_keyboard_ungrab() {} ;
void gdk_display_list_devices() {} ;
void gdk_display_manager_get() {} ;
void gdk_display_manager_get_default_display() {} ;
void gdk_display_manager_get_type() {} ;
void gdk_display_manager_list_displays() {} ;
void gdk_display_manager_set_default_display() {} ;
void gdk_display_open() {} ;
void gdk_display_peek_event() {} ;
void gdk_display_pointer_is_grabbed() {} ;
void gdk_display_pointer_ungrab() {} ;
void gdk_display_put_event() {} ;
void gdk_display_request_selection_notification() {} ;
void gdk_display_set_double_click_distance() {} ;
void gdk_display_set_double_click_time() {} ;
void gdk_display_set_pointer_hooks() {} ;
void gdk_display_store_clipboard() {} ;
void gdk_display_supports_clipboard_persistence() {} ;
void gdk_display_supports_cursor_alpha() {} ;
void gdk_display_supports_cursor_color() {} ;
void gdk_display_supports_selection_notification() {} ;
void gdk_display_sync() {} ;
void gdk_drag_abort() {} ;
void gdk_drag_action_get_type() {} ;
void gdk_drag_begin() {} ;
void gdk_drag_context_get_type() {} ;
void gdk_drag_context_new() {} ;
void gdk_drag_drop() {} ;
void gdk_drag_drop_succeeded() {} ;
void gdk_drag_find_window() {} ;
void gdk_drag_find_window_for_screen() {} ;
void gdk_drag_get_protocol() {} ;
void gdk_drag_get_protocol_for_display() {} ;
void gdk_drag_get_selection() {} ;
void gdk_drag_motion() {} ;
void gdk_drag_protocol_get_type() {} ;
void gdk_drag_status() {} ;
void gdk_draw_arc() {} ;
void gdk_draw_drawable() {} ;
void gdk_draw_glyphs() {} ;
void gdk_draw_glyphs_transformed() {} ;
void gdk_draw_gray_image() {} ;
void gdk_draw_image() {} ;
void gdk_draw_indexed_image() {} ;
void gdk_draw_layout() {} ;
void gdk_draw_layout_line() {} ;
void gdk_draw_layout_line_with_colors() {} ;
void gdk_draw_layout_with_colors() {} ;
void gdk_draw_line() {} ;
void gdk_draw_lines() {} ;
void gdk_draw_pixbuf() {} ;
void gdk_draw_point() {} ;
void gdk_draw_points() {} ;
void gdk_draw_polygon() {} ;
void gdk_draw_rectangle() {} ;
void gdk_draw_rgb_32_image() {} ;
void gdk_draw_rgb_32_image_dithalign() {} ;
void gdk_draw_rgb_image() {} ;
void gdk_draw_rgb_image_dithalign() {} ;
void gdk_draw_segments() {} ;
void gdk_draw_trapezoids() {} ;
void gdk_drawable_copy_to_image() {} ;
void gdk_drawable_get_clip_region() {} ;
void gdk_drawable_get_colormap() {} ;
void gdk_drawable_get_depth() {} ;
void gdk_drawable_get_display() {} ;
void gdk_drawable_get_image() {} ;
void gdk_drawable_get_screen() {} ;
void gdk_drawable_get_size() {} ;
void gdk_drawable_get_type() {} ;
void gdk_drawable_get_visible_region() {} ;
void gdk_drawable_get_visual() {} ;
void gdk_drawable_set_colormap() {} ;
void gdk_drop_finish() {} ;
void gdk_drop_reply() {} ;
void gdk_error_trap_pop() {} ;
void gdk_error_trap_push() {} ;
void gdk_event_copy() {} ;
void gdk_event_free() {} ;
void gdk_event_get() {} ;
void gdk_event_get_axis() {} ;
void gdk_event_get_coords() {} ;
void gdk_event_get_graphics_expose() {} ;
void gdk_event_get_root_coords() {} ;
void gdk_event_get_screen() {} ;
void gdk_event_get_state() {} ;
void gdk_event_get_time() {} ;
void gdk_event_get_type() {} ;
void gdk_event_handler_set() {} ;
void gdk_event_mask_get_type() {} ;
void gdk_event_new() {} ;
void gdk_event_peek() {} ;
void gdk_event_put() {} ;
void gdk_event_send_client_message() {} ;
void gdk_event_send_client_message_for_display() {} ;
void gdk_event_send_clientmessage_toall() {} ;
void gdk_event_set_screen() {} ;
void gdk_event_type_get_type() {} ;
void gdk_events_pending() {} ;
void gdk_extension_mode_get_type() {} ;
void gdk_fill_get_type() {} ;
void gdk_fill_rule_get_type() {} ;
void gdk_filter_return_get_type() {} ;
void gdk_flush() {} ;
void gdk_font_type_get_type() {} ;
void gdk_free_compound_text() {} ;
void gdk_free_text_list() {} ;
void gdk_function_get_type() {} ;
void gdk_gc_copy() {} ;
void gdk_gc_get_colormap() {} ;
void gdk_gc_get_screen() {} ;
void gdk_gc_get_type() {} ;
void gdk_gc_get_values() {} ;
void gdk_gc_new() {} ;
void gdk_gc_new_with_values() {} ;
void gdk_gc_offset() {} ;
void gdk_gc_set_background() {} ;
void gdk_gc_set_clip_mask() {} ;
void gdk_gc_set_clip_origin() {} ;
void gdk_gc_set_clip_rectangle() {} ;
void gdk_gc_set_clip_region() {} ;
void gdk_gc_set_colormap() {} ;
void gdk_gc_set_dashes() {} ;
void gdk_gc_set_exposures() {} ;
void gdk_gc_set_fill() {} ;
void gdk_gc_set_foreground() {} ;
void gdk_gc_set_function() {} ;
void gdk_gc_set_line_attributes() {} ;
void gdk_gc_set_rgb_bg_color() {} ;
void gdk_gc_set_rgb_fg_color() {} ;
void gdk_gc_set_stipple() {} ;
void gdk_gc_set_subwindow() {} ;
void gdk_gc_set_tile() {} ;
void gdk_gc_set_ts_origin() {} ;
void gdk_gc_set_values() {} ;
void gdk_gc_values_mask_get_type() {} ;
void gdk_get_default_root_window() {} ;
void gdk_get_display() {} ;
void gdk_get_display_arg_name() {} ;
void gdk_get_program_class() {} ;
void gdk_get_show_events() {} ;
void gdk_grab_status_get_type() {} ;
void gdk_gravity_get_type() {} ;
void gdk_image_get_colormap() {} ;
void gdk_image_get_pixel() {} ;
void gdk_image_get_type() {} ;
void gdk_image_new() {} ;
void gdk_image_put_pixel() {} ;
void gdk_image_set_colormap() {} ;
void gdk_image_type_get_type() {} ;
void gdk_init() {} ;
void gdk_init_check() {} ;
void gdk_input_condition_get_type() {} ;
void gdk_input_mode_get_type() {} ;
void gdk_input_set_extension_events() {} ;
void gdk_input_source_get_type() {} ;
void gdk_join_style_get_type() {} ;
void gdk_keyboard_grab() {} ;
void gdk_keyboard_ungrab() {} ;
void gdk_keymap_get_default() {} ;
void gdk_keymap_get_direction() {} ;
void gdk_keymap_get_entries_for_keycode() {} ;
void gdk_keymap_get_entries_for_keyval() {} ;
void gdk_keymap_get_for_display() {} ;
void gdk_keymap_get_type() {} ;
void gdk_keymap_lookup_key() {} ;
void gdk_keymap_translate_keyboard_state() {} ;
void gdk_keyval_convert_case() {} ;
void gdk_keyval_from_name() {} ;
void gdk_keyval_is_lower() {} ;
void gdk_keyval_is_upper() {} ;
void gdk_keyval_name() {} ;
void gdk_keyval_to_lower() {} ;
void gdk_keyval_to_unicode() {} ;
void gdk_keyval_to_upper() {} ;
void gdk_line_style_get_type() {} ;
void gdk_list_visuals() {} ;
void gdk_modifier_type_get_type() {} ;
void gdk_net_wm_supports() {} ;
void gdk_notify_startup_complete() {} ;
void gdk_notify_type_get_type() {} ;
void gdk_overlap_type_get_type() {} ;
void gdk_owner_change_get_type() {} ;
void gdk_pango_attr_embossed_new() {} ;
void gdk_pango_attr_stipple_new() {} ;
void gdk_pango_context_get() {} ;
void gdk_pango_context_get_for_screen() {} ;
void gdk_pango_layout_get_clip_region() {} ;
void gdk_pango_layout_line_get_clip_region() {} ;
void gdk_pango_renderer_get_default() {} ;
void gdk_pango_renderer_get_type() {} ;
void gdk_pango_renderer_new() {} ;
void gdk_pango_renderer_set_drawable() {} ;
void gdk_pango_renderer_set_gc() {} ;
void gdk_pango_renderer_set_override_color() {} ;
void gdk_pango_renderer_set_stipple() {} ;
void gdk_parse_args() {} ;
void gdk_pixbuf_get_from_drawable() {} ;
void gdk_pixbuf_get_from_image() {} ;
void gdk_pixbuf_render_pixmap_and_mask() {} ;
void gdk_pixbuf_render_pixmap_and_mask_for_colormap() {} ;
void gdk_pixbuf_render_threshold_alpha() {} ;
void gdk_pixmap_colormap_create_from_xpm() {} ;
void gdk_pixmap_colormap_create_from_xpm_d() {} ;
void gdk_pixmap_create_from_data() {} ;
void gdk_pixmap_create_from_xpm() {} ;
void gdk_pixmap_create_from_xpm_d() {} ;
void gdk_pixmap_foreign_new() {} ;
void gdk_pixmap_foreign_new_for_display() {} ;
void gdk_pixmap_get_type() {} ;
void gdk_pixmap_lookup() {} ;
void gdk_pixmap_lookup_for_display() {} ;
void gdk_pixmap_new() {} ;
void gdk_pointer_grab() {} ;
void gdk_pointer_is_grabbed() {} ;
void gdk_pointer_ungrab() {} ;
void gdk_prop_mode_get_type() {} ;
void gdk_property_change() {} ;
void gdk_property_delete() {} ;
void gdk_property_get() {} ;
void gdk_property_state_get_type() {} ;
void gdk_query_depths() {} ;
void gdk_query_visual_types() {} ;
void gdk_rectangle_get_type() {} ;
void gdk_rectangle_intersect() {} ;
void gdk_rectangle_union() {} ;
void gdk_region_copy() {} ;
void gdk_region_destroy() {} ;
void gdk_region_empty() {} ;
void gdk_region_equal() {} ;
void gdk_region_get_clipbox() {} ;
void gdk_region_get_rectangles() {} ;
void gdk_region_intersect() {} ;
void gdk_region_new() {} ;
void gdk_region_offset() {} ;
void gdk_region_point_in() {} ;
void gdk_region_polygon() {} ;
void gdk_region_rect_in() {} ;
void gdk_region_rectangle() {} ;
void gdk_region_shrink() {} ;
void gdk_region_spans_intersect_foreach() {} ;
void gdk_region_subtract() {} ;
void gdk_region_union() {} ;
void gdk_region_union_with_rect() {} ;
void gdk_region_xor() {} ;
void gdk_rgb_cmap_free() {} ;
void gdk_rgb_cmap_new() {} ;
void gdk_rgb_colormap_ditherable() {} ;
void gdk_rgb_dither_get_type() {} ;
void gdk_rgb_ditherable() {} ;
void gdk_rgb_find_color() {} ;
void gdk_rgb_get_colormap() {} ;
void gdk_rgb_get_visual() {} ;
void gdk_rgb_set_install() {} ;
void gdk_rgb_set_min_colors() {} ;
void gdk_rgb_set_verbose() {} ;
void gdk_screen_broadcast_client_message() {} ;
void gdk_screen_get_default() {} ;
void gdk_screen_get_default_colormap() {} ;
void gdk_screen_get_display() {} ;
void gdk_screen_get_height() {} ;
void gdk_screen_get_height_mm() {} ;
void gdk_screen_get_monitor_at_point() {} ;
void gdk_screen_get_monitor_at_window() {} ;
void gdk_screen_get_monitor_geometry() {} ;
void gdk_screen_get_n_monitors() {} ;
void gdk_screen_get_number() {} ;
void gdk_screen_get_rgb_colormap() {} ;
void gdk_screen_get_rgb_visual() {} ;
void gdk_screen_get_root_window() {} ;
void gdk_screen_get_setting() {} ;
void gdk_screen_get_system_colormap() {} ;
void gdk_screen_get_system_visual() {} ;
void gdk_screen_get_toplevel_windows() {} ;
void gdk_screen_get_type() {} ;
void gdk_screen_get_width() {} ;
void gdk_screen_get_width_mm() {} ;
void gdk_screen_height() {} ;
void gdk_screen_height_mm() {} ;
void gdk_screen_list_visuals() {} ;
void gdk_screen_make_display_name() {} ;
void gdk_screen_set_default_colormap() {} ;
void gdk_screen_width() {} ;
void gdk_screen_width_mm() {} ;
void gdk_scroll_direction_get_type() {} ;
void gdk_selection_convert() {} ;
void gdk_selection_owner_get() {} ;
void gdk_selection_owner_get_for_display() {} ;
void gdk_selection_owner_set() {} ;
void gdk_selection_owner_set_for_display() {} ;
void gdk_selection_property_get() {} ;
void gdk_selection_send_notify() {} ;
void gdk_selection_send_notify_for_display() {} ;
void gdk_set_double_click_time() {} ;
void gdk_set_locale() {} ;
void gdk_set_pointer_hooks() {} ;
void gdk_set_program_class() {} ;
void gdk_set_show_events() {} ;
void gdk_set_sm_client_id() {} ;
void gdk_setting_action_get_type() {} ;
void gdk_setting_get() {} ;
void gdk_spawn_command_line_on_screen() {} ;
void gdk_spawn_on_screen() {} ;
void gdk_spawn_on_screen_with_pipes() {} ;
void gdk_status_get_type() {} ;
void gdk_string_to_compound_text() {} ;
void gdk_string_to_compound_text_for_display() {} ;
void gdk_subwindow_mode_get_type() {} ;
void gdk_synthesize_window_state() {} ;
void gdk_text_property_to_text_list() {} ;
void gdk_text_property_to_text_list_for_display() {} ;
void gdk_text_property_to_utf8_list() {} ;
void gdk_text_property_to_utf8_list_for_display() {} ;
void gdk_threads_enter() {} ;
void gdk_threads_init() {} ;
void gdk_threads_leave() {} ;
void gdk_threads_set_lock_functions() {} ;
void gdk_unicode_to_keyval() {} ;
void gdk_utf8_to_compound_text() {} ;
void gdk_utf8_to_compound_text_for_display() {} ;
void gdk_utf8_to_string_target() {} ;
void gdk_visibility_state_get_type() {} ;
void gdk_visual_get_best() {} ;
void gdk_visual_get_best_depth() {} ;
void gdk_visual_get_best_type() {} ;
void gdk_visual_get_best_with_both() {} ;
void gdk_visual_get_best_with_depth() {} ;
void gdk_visual_get_best_with_type() {} ;
void gdk_visual_get_screen() {} ;
void gdk_visual_get_system() {} ;
void gdk_visual_get_type() {} ;
void gdk_visual_type_get_type() {} ;
void gdk_window_add_filter() {} ;
void gdk_window_at_pointer() {} ;
void gdk_window_attributes_type_get_type() {} ;
void gdk_window_begin_move_drag() {} ;
void gdk_window_begin_paint_rect() {} ;
void gdk_window_begin_paint_region() {} ;
void gdk_window_begin_resize_drag() {} ;
void gdk_window_class_get_type() {} ;
void gdk_window_clear() {} ;
void gdk_window_clear_area() {} ;
void gdk_window_clear_area_e() {} ;
void gdk_window_configure_finished() {} ;
void gdk_window_constrain_size() {} ;
void gdk_window_deiconify() {} ;
void gdk_window_destroy() {} ;
void gdk_window_destroy_notify() {} ;
void gdk_window_edge_get_type() {} ;
void gdk_window_enable_synchronized_configure() {} ;
void gdk_window_end_paint() {} ;
void gdk_window_focus() {} ;
void gdk_window_foreign_new() {} ;
void gdk_window_foreign_new_for_display() {} ;
void gdk_window_freeze_updates() {} ;
void gdk_window_fullscreen() {} ;
void gdk_window_get_children() {} ;
void gdk_window_get_decorations() {} ;
void gdk_window_get_events() {} ;
void gdk_window_get_frame_extents() {} ;
void gdk_window_get_geometry() {} ;
void gdk_window_get_group() {} ;
void gdk_window_get_internal_paint_info() {} ;
void gdk_window_get_origin() {} ;
void gdk_window_get_parent() {} ;
void gdk_window_get_pointer() {} ;
void gdk_window_get_position() {} ;
void gdk_window_get_root_origin() {} ;
void gdk_window_get_state() {} ;
void gdk_window_get_toplevel() {} ;
void gdk_window_get_toplevels() {} ;
void gdk_window_get_update_area() {} ;
void gdk_window_get_user_data() {} ;
void gdk_window_get_window_type() {} ;
void gdk_window_hide() {} ;
void gdk_window_hints_get_type() {} ;
void gdk_window_iconify() {} ;
void gdk_window_invalidate_maybe_recurse() {} ;
void gdk_window_invalidate_rect() {} ;
void gdk_window_invalidate_region() {} ;
void gdk_window_is_viewable() {} ;
void gdk_window_is_visible() {} ;
void gdk_window_lookup() {} ;
void gdk_window_lookup_for_display() {} ;
void gdk_window_lower() {} ;
void gdk_window_maximize() {} ;
void gdk_window_merge_child_shapes() {} ;
void gdk_window_move() {} ;
void gdk_window_move_resize() {} ;
void gdk_window_new() {} ;
void gdk_window_object_get_type() {} ;
void gdk_window_peek_children() {} ;
void gdk_window_process_all_updates() {} ;
void gdk_window_process_updates() {} ;
void gdk_window_raise() {} ;
void gdk_window_register_dnd() {} ;
void gdk_window_remove_filter() {} ;
void gdk_window_reparent() {} ;
void gdk_window_resize() {} ;
void gdk_window_scroll() {} ;
void gdk_window_set_accept_focus() {} ;
void gdk_window_set_back_pixmap() {} ;
void gdk_window_set_background() {} ;
void gdk_window_set_child_shapes() {} ;
void gdk_window_set_cursor() {} ;
void gdk_window_set_debug_updates() {} ;
void gdk_window_set_decorations() {} ;
void gdk_window_set_events() {} ;
void gdk_window_set_focus_on_map() {} ;
void gdk_window_set_functions() {} ;
void gdk_window_set_geometry_hints() {} ;
void gdk_window_set_group() {} ;
void gdk_window_set_icon() {} ;
void gdk_window_set_icon_list() {} ;
void gdk_window_set_icon_name() {} ;
void gdk_window_set_keep_above() {} ;
void gdk_window_set_keep_below() {} ;
void gdk_window_set_modal_hint() {} ;
void gdk_window_set_override_redirect() {} ;
void gdk_window_set_role() {} ;
void gdk_window_set_skip_pager_hint() {} ;
void gdk_window_set_skip_taskbar_hint() {} ;
void gdk_window_set_static_gravities() {} ;
void gdk_window_set_title() {} ;
void gdk_window_set_transient_for() {} ;
void gdk_window_set_type_hint() {} ;
void gdk_window_set_user_data() {} ;
void gdk_window_shape_combine_mask() {} ;
void gdk_window_shape_combine_region() {} ;
void gdk_window_show() {} ;
void gdk_window_show_unraised() {} ;
void gdk_window_state_get_type() {} ;
void gdk_window_stick() {} ;
void gdk_window_thaw_updates() {} ;
void gdk_window_type_get_type() {} ;
void gdk_window_type_hint_get_type() {} ;
void gdk_window_unfullscreen() {} ;
void gdk_window_unmaximize() {} ;
void gdk_window_unstick() {} ;
void gdk_window_withdraw() {} ;
void gdk_wm_decoration_get_type() {} ;
void gdk_wm_function_get_type() {} ;
void gdk_x11_atom_to_xatom() {} ;
void gdk_x11_atom_to_xatom_for_display() {} ;
void gdk_x11_colormap_foreign_new() {} ;
void gdk_x11_colormap_get_xcolormap() {} ;
void gdk_x11_colormap_get_xdisplay() {} ;
void gdk_x11_cursor_get_xcursor() {} ;
void gdk_x11_cursor_get_xdisplay() {} ;
void gdk_x11_display_get_xdisplay() {} ;
void gdk_x11_display_grab() {} ;
void gdk_x11_display_ungrab() {} ;
void gdk_x11_drawable_get_xdisplay() {} ;
void gdk_x11_drawable_get_xid() {} ;
void gdk_x11_gc_get_xdisplay() {} ;
void gdk_x11_gc_get_xgc() {} ;
void gdk_x11_get_default_root_xwindow() {} ;
void gdk_x11_get_default_screen() {} ;
void gdk_x11_get_default_xdisplay() {} ;
void gdk_x11_get_server_time() {} ;
void gdk_x11_get_xatom_by_name() {} ;
void gdk_x11_get_xatom_by_name_for_display() {} ;
void gdk_x11_get_xatom_name() {} ;
void gdk_x11_get_xatom_name_for_display() {} ;
void gdk_x11_grab_server() {} ;
void gdk_x11_image_get_xdisplay() {} ;
void gdk_x11_image_get_ximage() {} ;
void gdk_x11_lookup_xdisplay() {} ;
void gdk_x11_register_standard_event_type() {} ;
void gdk_x11_screen_get_screen_number() {} ;
void gdk_x11_screen_get_window_manager_name() {} ;
void gdk_x11_screen_get_xscreen() {} ;
void gdk_x11_screen_lookup_visual() {} ;
void gdk_x11_screen_supports_net_wm_hint() {} ;
void gdk_x11_ungrab_server() {} ;
void gdk_x11_visual_get_xvisual() {} ;
void gdk_x11_window_set_user_time() {} ;
void gdk_x11_xatom_to_atom() {} ;
void gdk_x11_xatom_to_atom_for_display() {} ;
void gdk_xid_table_lookup() {} ;
void gdk_xid_table_lookup_for_display() {} ;
void gdkx_visual_get() {} ;
__asm__(".globl gdk_display; .pushsection .data; .type gdk_display,@object; .size gdk_display, 4; gdk_display: .long 0; .popsection");
__asm__(".globl gdk_threads_lock; .pushsection .data; .type gdk_threads_lock,@object; .size gdk_threads_lock, 4; gdk_threads_lock: .long 0; .popsection");
__asm__(".globl gdk_threads_unlock; .pushsection .data; .type gdk_threads_unlock,@object; .size gdk_threads_unlock, 4; gdk_threads_unlock: .long 0; .popsection");

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

View File

@ -0,0 +1,847 @@
void g_allocator_free() {} ;
void g_allocator_new() {} ;
void g_array_append_vals() {} ;
void g_array_free() {} ;
void g_array_insert_vals() {} ;
void g_array_new() {} ;
void g_array_prepend_vals() {} ;
void g_array_remove_index() {} ;
void g_array_remove_index_fast() {} ;
void g_array_remove_range() {} ;
void g_array_set_size() {} ;
void g_array_sized_new() {} ;
void g_array_sort() {} ;
void g_array_sort_with_data() {} ;
void g_ascii_digit_value() {} ;
void g_ascii_dtostr() {} ;
void g_ascii_formatd() {} ;
void g_ascii_strcasecmp() {} ;
void g_ascii_strdown() {} ;
void g_ascii_strncasecmp() {} ;
void g_ascii_strtod() {} ;
void g_ascii_strtoull() {} ;
void g_ascii_strup() {} ;
void g_ascii_tolower() {} ;
void g_ascii_toupper() {} ;
void g_ascii_xdigit_value() {} ;
void g_assert_warning() {} ;
void g_async_queue_length() {} ;
void g_async_queue_length_unlocked() {} ;
void g_async_queue_lock() {} ;
void g_async_queue_new() {} ;
void g_async_queue_pop() {} ;
void g_async_queue_pop_unlocked() {} ;
void g_async_queue_push() {} ;
void g_async_queue_push_unlocked() {} ;
void g_async_queue_ref() {} ;
void g_async_queue_timed_pop() {} ;
void g_async_queue_timed_pop_unlocked() {} ;
void g_async_queue_try_pop() {} ;
void g_async_queue_try_pop_unlocked() {} ;
void g_async_queue_unlock() {} ;
void g_async_queue_unref() {} ;
void g_atexit() {} ;
void g_atomic_int_add() {} ;
void g_atomic_int_compare_and_exchange() {} ;
void g_atomic_int_exchange_and_add() {} ;
void g_atomic_pointer_compare_and_exchange() {} ;
void g_bit_nth_lsf() {} ;
void g_bit_nth_msf() {} ;
void g_bit_storage() {} ;
void g_blow_chunks() {} ;
void g_build_filename() {} ;
void g_build_path() {} ;
void g_byte_array_append() {} ;
void g_byte_array_free() {} ;
void g_byte_array_new() {} ;
void g_byte_array_prepend() {} ;
void g_byte_array_remove_index() {} ;
void g_byte_array_remove_index_fast() {} ;
void g_byte_array_remove_range() {} ;
void g_byte_array_set_size() {} ;
void g_byte_array_sized_new() {} ;
void g_byte_array_sort() {} ;
void g_byte_array_sort_with_data() {} ;
void g_cache_destroy() {} ;
void g_cache_insert() {} ;
void g_cache_key_foreach() {} ;
void g_cache_new() {} ;
void g_cache_remove() {} ;
void g_cache_value_foreach() {} ;
void g_child_watch_add() {} ;
void g_child_watch_add_full() {} ;
void g_child_watch_source_new() {} ;
void g_clear_error() {} ;
void g_completion_add_items() {} ;
void g_completion_clear_items() {} ;
void g_completion_complete() {} ;
void g_completion_complete_utf8() {} ;
void g_completion_free() {} ;
void g_completion_new() {} ;
void g_completion_remove_items() {} ;
void g_completion_set_compare() {} ;
void g_convert() {} ;
void g_convert_error_quark() {} ;
void g_convert_with_fallback() {} ;
void g_convert_with_iconv() {} ;
void g_datalist_clear() {} ;
void g_datalist_foreach() {} ;
void g_datalist_id_get_data() {} ;
void g_datalist_id_remove_no_notify() {} ;
void g_datalist_id_set_data_full() {} ;
void g_datalist_init() {} ;
void g_dataset_destroy() {} ;
void g_dataset_foreach() {} ;
void g_dataset_id_get_data() {} ;
void g_dataset_id_remove_no_notify() {} ;
void g_dataset_id_set_data_full() {} ;
void g_date_add_days() {} ;
void g_date_add_months() {} ;
void g_date_add_years() {} ;
void g_date_clamp() {} ;
void g_date_clear() {} ;
void g_date_compare() {} ;
void g_date_days_between() {} ;
void g_date_free() {} ;
void g_date_get_day() {} ;
void g_date_get_day_of_year() {} ;
void g_date_get_days_in_month() {} ;
void g_date_get_iso8601_week_of_year() {} ;
void g_date_get_julian() {} ;
void g_date_get_monday_week_of_year() {} ;
void g_date_get_monday_weeks_in_year() {} ;
void g_date_get_month() {} ;
void g_date_get_sunday_week_of_year() {} ;
void g_date_get_sunday_weeks_in_year() {} ;
void g_date_get_weekday() {} ;
void g_date_get_year() {} ;
void g_date_is_first_of_month() {} ;
void g_date_is_last_of_month() {} ;
void g_date_is_leap_year() {} ;
void g_date_new() {} ;
void g_date_new_dmy() {} ;
void g_date_new_julian() {} ;
void g_date_order() {} ;
void g_date_set_day() {} ;
void g_date_set_dmy() {} ;
void g_date_set_julian() {} ;
void g_date_set_month() {} ;
void g_date_set_parse() {} ;
void g_date_set_time() {} ;
void g_date_set_year() {} ;
void g_date_strftime() {} ;
void g_date_subtract_days() {} ;
void g_date_subtract_months() {} ;
void g_date_subtract_years() {} ;
void g_date_to_struct_tm() {} ;
void g_date_valid() {} ;
void g_date_valid_day() {} ;
void g_date_valid_dmy() {} ;
void g_date_valid_julian() {} ;
void g_date_valid_month() {} ;
void g_date_valid_weekday() {} ;
void g_date_valid_year() {} ;
void g_dir_close() {} ;
void g_dir_open() {} ;
void g_dir_read_name() {} ;
void g_dir_rewind() {} ;
void g_direct_equal() {} ;
void g_direct_hash() {} ;
void g_error_copy() {} ;
void g_error_free() {} ;
void g_error_matches() {} ;
void g_error_new() {} ;
void g_error_new_literal() {} ;
void g_file_error_from_errno() {} ;
void g_file_error_quark() {} ;
void g_file_get_contents() {} ;
void g_file_open_tmp() {} ;
void g_file_read_link() {} ;
void g_file_test() {} ;
void g_filename_display_basename() {} ;
void g_filename_display_name() {} ;
void g_filename_from_uri() {} ;
void g_filename_from_utf8() {} ;
void g_filename_to_uri() {} ;
void g_filename_to_utf8() {} ;
void g_find_program_in_path() {} ;
void g_fprintf() {} ;
void g_free() {} ;
void g_get_application_name() {} ;
void g_get_charset() {} ;
void g_get_current_dir() {} ;
void g_get_current_time() {} ;
void g_get_filename_charsets() {} ;
void g_get_home_dir() {} ;
void g_get_language_names() {} ;
void g_get_prgname() {} ;
void g_get_real_name() {} ;
void g_get_system_config_dirs() {} ;
void g_get_system_data_dirs() {} ;
void g_get_tmp_dir() {} ;
void g_get_user_cache_dir() {} ;
void g_get_user_config_dir() {} ;
void g_get_user_data_dir() {} ;
void g_get_user_name() {} ;
void g_getenv() {} ;
void g_hash_table_destroy() {} ;
void g_hash_table_find() {} ;
void g_hash_table_foreach() {} ;
void g_hash_table_foreach_remove() {} ;
void g_hash_table_foreach_steal() {} ;
void g_hash_table_insert() {} ;
void g_hash_table_lookup() {} ;
void g_hash_table_lookup_extended() {} ;
void g_hash_table_new() {} ;
void g_hash_table_new_full() {} ;
void g_hash_table_remove() {} ;
void g_hash_table_replace() {} ;
void g_hash_table_size() {} ;
void g_hash_table_steal() {} ;
void g_hook_alloc() {} ;
void g_hook_compare_ids() {} ;
void g_hook_destroy() {} ;
void g_hook_destroy_link() {} ;
void g_hook_find() {} ;
void g_hook_find_data() {} ;
void g_hook_find_func() {} ;
void g_hook_find_func_data() {} ;
void g_hook_first_valid() {} ;
void g_hook_free() {} ;
void g_hook_get() {} ;
void g_hook_insert_before() {} ;
void g_hook_insert_sorted() {} ;
void g_hook_list_clear() {} ;
void g_hook_list_init() {} ;
void g_hook_list_invoke() {} ;
void g_hook_list_invoke_check() {} ;
void g_hook_list_marshal() {} ;
void g_hook_list_marshal_check() {} ;
void g_hook_next_valid() {} ;
void g_hook_prepend() {} ;
void g_hook_ref() {} ;
void g_hook_unref() {} ;
void g_iconv() {} ;
void g_iconv_close() {} ;
void g_iconv_open() {} ;
void g_idle_add() {} ;
void g_idle_add_full() {} ;
void g_idle_remove_by_data() {} ;
void g_idle_source_new() {} ;
void g_int_equal() {} ;
void g_int_hash() {} ;
void g_io_add_watch() {} ;
void g_io_add_watch_full() {} ;
void g_io_channel_error_from_errno() {} ;
void g_io_channel_error_quark() {} ;
void g_io_channel_flush() {} ;
void g_io_channel_get_buffer_condition() {} ;
void g_io_channel_get_buffer_size() {} ;
void g_io_channel_get_buffered() {} ;
void g_io_channel_get_close_on_unref() {} ;
void g_io_channel_get_encoding() {} ;
void g_io_channel_get_flags() {} ;
void g_io_channel_get_line_term() {} ;
void g_io_channel_init() {} ;
void g_io_channel_new_file() {} ;
void g_io_channel_read_chars() {} ;
void g_io_channel_read_line() {} ;
void g_io_channel_read_line_string() {} ;
void g_io_channel_read_to_end() {} ;
void g_io_channel_read_unichar() {} ;
void g_io_channel_ref() {} ;
void g_io_channel_seek_position() {} ;
void g_io_channel_set_buffer_size() {} ;
void g_io_channel_set_buffered() {} ;
void g_io_channel_set_close_on_unref() {} ;
void g_io_channel_set_encoding() {} ;
void g_io_channel_set_flags() {} ;
void g_io_channel_set_line_term() {} ;
void g_io_channel_shutdown() {} ;
void g_io_channel_unix_get_fd() {} ;
void g_io_channel_unix_new() {} ;
void g_io_channel_unref() {} ;
void g_io_channel_write_chars() {} ;
void g_io_channel_write_unichar() {} ;
void g_io_create_watch() {} ;
void g_key_file_error_quark() {} ;
void g_key_file_free() {} ;
void g_key_file_get_boolean() {} ;
void g_key_file_get_boolean_list() {} ;
void g_key_file_get_comment() {} ;
void g_key_file_get_groups() {} ;
void g_key_file_get_integer() {} ;
void g_key_file_get_integer_list() {} ;
void g_key_file_get_keys() {} ;
void g_key_file_get_locale_string() {} ;
void g_key_file_get_locale_string_list() {} ;
void g_key_file_get_start_group() {} ;
void g_key_file_get_string() {} ;
void g_key_file_get_string_list() {} ;
void g_key_file_get_value() {} ;
void g_key_file_has_group() {} ;
void g_key_file_has_key() {} ;
void g_key_file_load_from_data() {} ;
void g_key_file_load_from_data_dirs() {} ;
void g_key_file_load_from_file() {} ;
void g_key_file_new() {} ;
void g_key_file_remove_comment() {} ;
void g_key_file_remove_group() {} ;
void g_key_file_remove_key() {} ;
void g_key_file_set_boolean() {} ;
void g_key_file_set_boolean_list() {} ;
void g_key_file_set_comment() {} ;
void g_key_file_set_integer() {} ;
void g_key_file_set_integer_list() {} ;
void g_key_file_set_list_separator() {} ;
void g_key_file_set_locale_string() {} ;
void g_key_file_set_locale_string_list() {} ;
void g_key_file_set_string() {} ;
void g_key_file_set_string_list() {} ;
void g_key_file_set_value() {} ;
void g_key_file_to_data() {} ;
void g_list_alloc() {} ;
void g_list_append() {} ;
void g_list_concat() {} ;
void g_list_copy() {} ;
void g_list_delete_link() {} ;
void g_list_find() {} ;
void g_list_find_custom() {} ;
void g_list_first() {} ;
void g_list_foreach() {} ;
void g_list_free() {} ;
void g_list_free_1() {} ;
void g_list_index() {} ;
void g_list_insert() {} ;
void g_list_insert_before() {} ;
void g_list_insert_sorted() {} ;
void g_list_last() {} ;
void g_list_length() {} ;
void g_list_nth() {} ;
void g_list_nth_data() {} ;
void g_list_nth_prev() {} ;
void g_list_pop_allocator() {} ;
void g_list_position() {} ;
void g_list_prepend() {} ;
void g_list_push_allocator() {} ;
void g_list_remove() {} ;
void g_list_remove_all() {} ;
void g_list_remove_link() {} ;
void g_list_reverse() {} ;
void g_list_sort() {} ;
void g_list_sort_with_data() {} ;
void g_locale_from_utf8() {} ;
void g_locale_to_utf8() {} ;
void g_log() {} ;
void g_log_default_handler() {} ;
void g_log_remove_handler() {} ;
void g_log_set_always_fatal() {} ;
void g_log_set_default_handler() {} ;
void g_log_set_fatal_mask() {} ;
void g_log_set_handler() {} ;
void g_logv() {} ;
void g_main_context_acquire() {} ;
void g_main_context_add_poll() {} ;
void g_main_context_check() {} ;
void g_main_context_default() {} ;
void g_main_context_dispatch() {} ;
void g_main_context_find_source_by_funcs_user_data() {} ;
void g_main_context_find_source_by_id() {} ;
void g_main_context_find_source_by_user_data() {} ;
void g_main_context_get_poll_func() {} ;
void g_main_context_iteration() {} ;
void g_main_context_new() {} ;
void g_main_context_pending() {} ;
void g_main_context_prepare() {} ;
void g_main_context_query() {} ;
void g_main_context_ref() {} ;
void g_main_context_release() {} ;
void g_main_context_remove_poll() {} ;
void g_main_context_set_poll_func() {} ;
void g_main_context_unref() {} ;
void g_main_context_wait() {} ;
void g_main_context_wakeup() {} ;
void g_main_depth() {} ;
void g_main_loop_get_context() {} ;
void g_main_loop_is_running() {} ;
void g_main_loop_new() {} ;
void g_main_loop_quit() {} ;
void g_main_loop_ref() {} ;
void g_main_loop_run() {} ;
void g_main_loop_unref() {} ;
void g_malloc() {} ;
void g_malloc0() {} ;
void g_markup_error_quark() {} ;
void g_markup_escape_text() {} ;
void g_markup_parse_context_end_parse() {} ;
void g_markup_parse_context_free() {} ;
void g_markup_parse_context_get_element() {} ;
void g_markup_parse_context_get_position() {} ;
void g_markup_parse_context_new() {} ;
void g_markup_parse_context_parse() {} ;
void g_markup_printf_escaped() {} ;
void g_markup_vprintf_escaped() {} ;
void g_mem_chunk_alloc() {} ;
void g_mem_chunk_alloc0() {} ;
void g_mem_chunk_clean() {} ;
void g_mem_chunk_destroy() {} ;
void g_mem_chunk_free() {} ;
void g_mem_chunk_info() {} ;
void g_mem_chunk_new() {} ;
void g_mem_chunk_print() {} ;
void g_mem_chunk_reset() {} ;
void g_mem_is_system_malloc() {} ;
void g_mem_profile() {} ;
void g_mem_set_vtable() {} ;
void g_memdup() {} ;
void g_mkstemp() {} ;
void g_node_child_index() {} ;
void g_node_child_position() {} ;
void g_node_children_foreach() {} ;
void g_node_copy() {} ;
void g_node_copy_deep() {} ;
void g_node_depth() {} ;
void g_node_destroy() {} ;
void g_node_find() {} ;
void g_node_find_child() {} ;
void g_node_first_sibling() {} ;
void g_node_get_root() {} ;
void g_node_insert() {} ;
void g_node_insert_after() {} ;
void g_node_insert_before() {} ;
void g_node_is_ancestor() {} ;
void g_node_last_child() {} ;
void g_node_last_sibling() {} ;
void g_node_max_height() {} ;
void g_node_n_children() {} ;
void g_node_n_nodes() {} ;
void g_node_new() {} ;
void g_node_nth_child() {} ;
void g_node_pop_allocator() {} ;
void g_node_prepend() {} ;
void g_node_push_allocator() {} ;
void g_node_reverse_children() {} ;
void g_node_traverse() {} ;
void g_node_unlink() {} ;
void g_nullify_pointer() {} ;
void g_on_error_query() {} ;
void g_on_error_stack_trace() {} ;
void g_once_impl() {} ;
void g_option_context_add_group() {} ;
void g_option_context_add_main_entries() {} ;
void g_option_context_free() {} ;
void g_option_context_get_help_enabled() {} ;
void g_option_context_get_ignore_unknown_options() {} ;
void g_option_context_get_main_group() {} ;
void g_option_context_new() {} ;
void g_option_context_parse() {} ;
void g_option_context_set_help_enabled() {} ;
void g_option_context_set_ignore_unknown_options() {} ;
void g_option_context_set_main_group() {} ;
void g_option_error_quark() {} ;
void g_option_group_add_entries() {} ;
void g_option_group_free() {} ;
void g_option_group_new() {} ;
void g_option_group_set_error_hook() {} ;
void g_option_group_set_parse_hooks() {} ;
void g_option_group_set_translate_func() {} ;
void g_option_group_set_translation_domain() {} ;
void g_parse_debug_string() {} ;
void g_path_get_basename() {} ;
void g_path_get_dirname() {} ;
void g_path_is_absolute() {} ;
void g_path_skip_root() {} ;
void g_pattern_match() {} ;
void g_pattern_match_simple() {} ;
void g_pattern_match_string() {} ;
void g_pattern_spec_equal() {} ;
void g_pattern_spec_free() {} ;
void g_pattern_spec_new() {} ;
void g_print() {} ;
void g_printerr() {} ;
void g_printf() {} ;
void g_printf_string_upper_bound() {} ;
void g_propagate_error() {} ;
void g_ptr_array_add() {} ;
void g_ptr_array_foreach() {} ;
void g_ptr_array_free() {} ;
void g_ptr_array_new() {} ;
void g_ptr_array_remove() {} ;
void g_ptr_array_remove_fast() {} ;
void g_ptr_array_remove_index() {} ;
void g_ptr_array_remove_index_fast() {} ;
void g_ptr_array_remove_range() {} ;
void g_ptr_array_set_size() {} ;
void g_ptr_array_sized_new() {} ;
void g_ptr_array_sort() {} ;
void g_ptr_array_sort_with_data() {} ;
void g_qsort_with_data() {} ;
void g_quark_from_static_string() {} ;
void g_quark_from_string() {} ;
void g_quark_to_string() {} ;
void g_quark_try_string() {} ;
void g_queue_copy() {} ;
void g_queue_delete_link() {} ;
void g_queue_find() {} ;
void g_queue_find_custom() {} ;
void g_queue_foreach() {} ;
void g_queue_free() {} ;
void g_queue_get_length() {} ;
void g_queue_index() {} ;
void g_queue_insert_after() {} ;
void g_queue_insert_before() {} ;
void g_queue_insert_sorted() {} ;
void g_queue_is_empty() {} ;
void g_queue_link_index() {} ;
void g_queue_new() {} ;
void g_queue_peek_head() {} ;
void g_queue_peek_head_link() {} ;
void g_queue_peek_nth() {} ;
void g_queue_peek_nth_link() {} ;
void g_queue_peek_tail() {} ;
void g_queue_peek_tail_link() {} ;
void g_queue_pop_head() {} ;
void g_queue_pop_head_link() {} ;
void g_queue_pop_nth() {} ;
void g_queue_pop_nth_link() {} ;
void g_queue_pop_tail() {} ;
void g_queue_pop_tail_link() {} ;
void g_queue_push_head() {} ;
void g_queue_push_head_link() {} ;
void g_queue_push_nth() {} ;
void g_queue_push_nth_link() {} ;
void g_queue_push_tail() {} ;
void g_queue_push_tail_link() {} ;
void g_queue_remove() {} ;
void g_queue_remove_all() {} ;
void g_queue_reverse() {} ;
void g_queue_sort() {} ;
void g_queue_unlink() {} ;
void g_rand_copy() {} ;
void g_rand_double() {} ;
void g_rand_double_range() {} ;
void g_rand_free() {} ;
void g_rand_int() {} ;
void g_rand_int_range() {} ;
void g_rand_new() {} ;
void g_rand_new_with_seed() {} ;
void g_rand_new_with_seed_array() {} ;
void g_rand_set_seed() {} ;
void g_rand_set_seed_array() {} ;
void g_random_double() {} ;
void g_random_double_range() {} ;
void g_random_int() {} ;
void g_random_int_range() {} ;
void g_random_set_seed() {} ;
void g_realloc() {} ;
void g_relation_count() {} ;
void g_relation_delete() {} ;
void g_relation_destroy() {} ;
void g_relation_exists() {} ;
void g_relation_index() {} ;
void g_relation_insert() {} ;
void g_relation_new() {} ;
void g_relation_print() {} ;
void g_relation_select() {} ;
void g_return_if_fail_warning() {} ;
void g_scanner_cur_line() {} ;
void g_scanner_cur_position() {} ;
void g_scanner_cur_token() {} ;
void g_scanner_cur_value() {} ;
void g_scanner_destroy() {} ;
void g_scanner_eof() {} ;
void g_scanner_error() {} ;
void g_scanner_get_next_token() {} ;
void g_scanner_input_file() {} ;
void g_scanner_input_text() {} ;
void g_scanner_lookup_symbol() {} ;
void g_scanner_new() {} ;
void g_scanner_peek_next_token() {} ;
void g_scanner_scope_add_symbol() {} ;
void g_scanner_scope_foreach_symbol() {} ;
void g_scanner_scope_lookup_symbol() {} ;
void g_scanner_scope_remove_symbol() {} ;
void g_scanner_set_scope() {} ;
void g_scanner_sync_file_offset() {} ;
void g_scanner_unexp_token() {} ;
void g_scanner_warn() {} ;
void g_set_application_name() {} ;
void g_set_error() {} ;
void g_set_prgname() {} ;
void g_set_print_handler() {} ;
void g_set_printerr_handler() {} ;
void g_setenv() {} ;
void g_shell_error_quark() {} ;
void g_shell_parse_argv() {} ;
void g_shell_quote() {} ;
void g_shell_unquote() {} ;
void g_slist_alloc() {} ;
void g_slist_append() {} ;
void g_slist_concat() {} ;
void g_slist_copy() {} ;
void g_slist_delete_link() {} ;
void g_slist_find() {} ;
void g_slist_find_custom() {} ;
void g_slist_foreach() {} ;
void g_slist_free() {} ;
void g_slist_free_1() {} ;
void g_slist_index() {} ;
void g_slist_insert() {} ;
void g_slist_insert_before() {} ;
void g_slist_insert_sorted() {} ;
void g_slist_last() {} ;
void g_slist_length() {} ;
void g_slist_nth() {} ;
void g_slist_nth_data() {} ;
void g_slist_pop_allocator() {} ;
void g_slist_position() {} ;
void g_slist_prepend() {} ;
void g_slist_push_allocator() {} ;
void g_slist_remove() {} ;
void g_slist_remove_all() {} ;
void g_slist_remove_link() {} ;
void g_slist_reverse() {} ;
void g_slist_sort() {} ;
void g_slist_sort_with_data() {} ;
void g_snprintf() {} ;
void g_source_add_poll() {} ;
void g_source_attach() {} ;
void g_source_destroy() {} ;
void g_source_get_can_recurse() {} ;
void g_source_get_context() {} ;
void g_source_get_current_time() {} ;
void g_source_get_id() {} ;
void g_source_get_priority() {} ;
void g_source_new() {} ;
void g_source_ref() {} ;
void g_source_remove() {} ;
void g_source_remove_by_funcs_user_data() {} ;
void g_source_remove_by_user_data() {} ;
void g_source_remove_poll() {} ;
void g_source_set_callback() {} ;
void g_source_set_callback_indirect() {} ;
void g_source_set_can_recurse() {} ;
void g_source_set_priority() {} ;
void g_source_unref() {} ;
void g_spaced_primes_closest() {} ;
void g_spawn_async() {} ;
void g_spawn_async_with_pipes() {} ;
void g_spawn_close_pid() {} ;
void g_spawn_command_line_async() {} ;
void g_spawn_command_line_sync() {} ;
void g_spawn_error_quark() {} ;
void g_spawn_sync() {} ;
void g_sprintf() {} ;
void g_static_mutex_free() {} ;
void g_static_mutex_get_mutex_impl() {} ;
void g_static_mutex_init() {} ;
void g_static_private_free() {} ;
void g_static_private_get() {} ;
void g_static_private_init() {} ;
void g_static_private_set() {} ;
void g_static_rec_mutex_free() {} ;
void g_static_rec_mutex_init() {} ;
void g_static_rec_mutex_lock() {} ;
void g_static_rec_mutex_lock_full() {} ;
void g_static_rec_mutex_trylock() {} ;
void g_static_rec_mutex_unlock() {} ;
void g_static_rec_mutex_unlock_full() {} ;
void g_static_rw_lock_free() {} ;
void g_static_rw_lock_init() {} ;
void g_static_rw_lock_reader_lock() {} ;
void g_static_rw_lock_reader_trylock() {} ;
void g_static_rw_lock_reader_unlock() {} ;
void g_static_rw_lock_writer_lock() {} ;
void g_static_rw_lock_writer_trylock() {} ;
void g_static_rw_lock_writer_unlock() {} ;
void g_stpcpy() {} ;
void g_str_equal() {} ;
void g_str_has_prefix() {} ;
void g_str_has_suffix() {} ;
void g_str_hash() {} ;
void g_strcanon() {} ;
void g_strchomp() {} ;
void g_strchug() {} ;
void g_strcompress() {} ;
void g_strconcat() {} ;
void g_strdelimit() {} ;
void g_strdup() {} ;
void g_strdup_printf() {} ;
void g_strdup_vprintf() {} ;
void g_strdupv() {} ;
void g_strerror() {} ;
void g_strescape() {} ;
void g_strfreev() {} ;
void g_string_append() {} ;
void g_string_append_c() {} ;
void g_string_append_len() {} ;
void g_string_append_printf() {} ;
void g_string_append_unichar() {} ;
void g_string_ascii_down() {} ;
void g_string_ascii_up() {} ;
void g_string_assign() {} ;
void g_string_chunk_free() {} ;
void g_string_chunk_insert() {} ;
void g_string_chunk_insert_const() {} ;
void g_string_chunk_insert_len() {} ;
void g_string_chunk_new() {} ;
void g_string_equal() {} ;
void g_string_erase() {} ;
void g_string_free() {} ;
void g_string_hash() {} ;
void g_string_insert() {} ;
void g_string_insert_c() {} ;
void g_string_insert_len() {} ;
void g_string_insert_unichar() {} ;
void g_string_new() {} ;
void g_string_new_len() {} ;
void g_string_prepend() {} ;
void g_string_prepend_c() {} ;
void g_string_prepend_len() {} ;
void g_string_prepend_unichar() {} ;
void g_string_printf() {} ;
void g_string_set_size() {} ;
void g_string_sized_new() {} ;
void g_string_truncate() {} ;
void g_strip_context() {} ;
void g_strjoin() {} ;
void g_strjoinv() {} ;
void g_strlcat() {} ;
void g_strlcpy() {} ;
void g_strndup() {} ;
void g_strnfill() {} ;
void g_strreverse() {} ;
void g_strrstr() {} ;
void g_strrstr_len() {} ;
void g_strsignal() {} ;
void g_strsplit() {} ;
void g_strsplit_set() {} ;
void g_strstr_len() {} ;
void g_strtod() {} ;
void g_strv_length() {} ;
void g_thread_create_full() {} ;
void g_thread_error_quark() {} ;
void g_thread_exit() {} ;
void g_thread_join() {} ;
void g_thread_pool_free() {} ;
void g_thread_pool_get_max_threads() {} ;
void g_thread_pool_get_max_unused_threads() {} ;
void g_thread_pool_get_num_threads() {} ;
void g_thread_pool_get_num_unused_threads() {} ;
void g_thread_pool_new() {} ;
void g_thread_pool_push() {} ;
void g_thread_pool_set_max_threads() {} ;
void g_thread_pool_set_max_unused_threads() {} ;
void g_thread_pool_stop_unused_threads() {} ;
void g_thread_pool_unprocessed() {} ;
void g_thread_self() {} ;
void g_thread_set_priority() {} ;
void g_time_val_add() {} ;
void g_timeout_add() {} ;
void g_timeout_add_full() {} ;
void g_timeout_source_new() {} ;
void g_timer_continue() {} ;
void g_timer_destroy() {} ;
void g_timer_elapsed() {} ;
void g_timer_new() {} ;
void g_timer_reset() {} ;
void g_timer_start() {} ;
void g_timer_stop() {} ;
void g_trash_stack_height() {} ;
void g_trash_stack_peek() {} ;
void g_trash_stack_pop() {} ;
void g_trash_stack_push() {} ;
void g_tree_destroy() {} ;
void g_tree_foreach() {} ;
void g_tree_height() {} ;
void g_tree_insert() {} ;
void g_tree_lookup() {} ;
void g_tree_lookup_extended() {} ;
void g_tree_new() {} ;
void g_tree_new_full() {} ;
void g_tree_new_with_data() {} ;
void g_tree_nnodes() {} ;
void g_tree_remove() {} ;
void g_tree_replace() {} ;
void g_tree_search() {} ;
void g_tree_steal() {} ;
void g_try_malloc() {} ;
void g_try_realloc() {} ;
void g_tuples_destroy() {} ;
void g_tuples_index() {} ;
void g_ucs4_to_utf16() {} ;
void g_ucs4_to_utf8() {} ;
void g_unichar_break_type() {} ;
void g_unichar_digit_value() {} ;
void g_unichar_get_mirror_char() {} ;
void g_unichar_isalnum() {} ;
void g_unichar_isalpha() {} ;
void g_unichar_iscntrl() {} ;
void g_unichar_isdefined() {} ;
void g_unichar_isdigit() {} ;
void g_unichar_isgraph() {} ;
void g_unichar_islower() {} ;
void g_unichar_isprint() {} ;
void g_unichar_ispunct() {} ;
void g_unichar_isspace() {} ;
void g_unichar_istitle() {} ;
void g_unichar_isupper() {} ;
void g_unichar_iswide() {} ;
void g_unichar_isxdigit() {} ;
void g_unichar_to_utf8() {} ;
void g_unichar_tolower() {} ;
void g_unichar_totitle() {} ;
void g_unichar_toupper() {} ;
void g_unichar_type() {} ;
void g_unichar_validate() {} ;
void g_unichar_xdigit_value() {} ;
void g_unicode_canonical_decomposition() {} ;
void g_unicode_canonical_ordering() {} ;
void g_unsetenv() {} ;
void g_uri_list_extract_uris() {} ;
void g_usleep() {} ;
void g_utf16_to_ucs4() {} ;
void g_utf16_to_utf8() {} ;
void g_utf8_casefold() {} ;
void g_utf8_collate() {} ;
void g_utf8_collate_key() {} ;
void g_utf8_find_next_char() {} ;
void g_utf8_find_prev_char() {} ;
void g_utf8_get_char() {} ;
void g_utf8_get_char_validated() {} ;
void g_utf8_normalize() {} ;
void g_utf8_offset_to_pointer() {} ;
void g_utf8_pointer_to_offset() {} ;
void g_utf8_prev_char() {} ;
void g_utf8_strchr() {} ;
void g_utf8_strdown() {} ;
void g_utf8_strlen() {} ;
void g_utf8_strncpy() {} ;
void g_utf8_strrchr() {} ;
void g_utf8_strreverse() {} ;
void g_utf8_strup() {} ;
void g_utf8_to_ucs4() {} ;
void g_utf8_to_ucs4_fast() {} ;
void g_utf8_to_utf16() {} ;
void g_utf8_validate() {} ;
void g_vasprintf() {} ;
void g_vfprintf() {} ;
void g_vprintf() {} ;
void g_vsnprintf() {} ;
void g_vsprintf() {} ;
void glib_check_version() {} ;
__asm__(".globl g_ascii_table; .pushsection .data; .type g_ascii_table,@object; .size g_ascii_table, 4; g_ascii_table: .long 0; .popsection");
__asm__(".globl g_child_watch_funcs; .pushsection .data; .type g_child_watch_funcs,@object; .size g_child_watch_funcs, 24; g_child_watch_funcs: .long 0; .popsection");
__asm__(".globl g_idle_funcs; .pushsection .data; .type g_idle_funcs,@object; .size g_idle_funcs, 24; g_idle_funcs: .long 0; .popsection");
__asm__(".globl g_io_watch_funcs; .pushsection .data; .type g_io_watch_funcs,@object; .size g_io_watch_funcs, 24; g_io_watch_funcs: .long 0; .popsection");
__asm__(".globl g_thread_functions_for_glib_use; .pushsection .data; .type g_thread_functions_for_glib_use,@object; .size g_thread_functions_for_glib_use, 84; g_thread_functions_for_glib_use: .long 0; .popsection");
__asm__(".globl g_thread_use_default_impl; .pushsection .data; .type g_thread_use_default_impl,@object; .size g_thread_use_default_impl, 4; g_thread_use_default_impl: .long 0; .popsection");
__asm__(".globl g_threads_got_initialized; .pushsection .data; .type g_threads_got_initialized,@object; .size g_threads_got_initialized, 4; g_threads_got_initialized: .long 0; .popsection");
__asm__(".globl g_timeout_funcs; .pushsection .data; .type g_timeout_funcs,@object; .size g_timeout_funcs, 24; g_timeout_funcs: .long 0; .popsection");
__asm__(".globl g_utf8_skip; .pushsection .data; .type g_utf8_skip,@object; .size g_utf8_skip, 4; g_utf8_skip: .long 0; .popsection");
__asm__(".globl glib_binary_age; .pushsection .data; .type glib_binary_age,@object; .size glib_binary_age, 4; glib_binary_age: .long 0; .popsection");
__asm__(".globl glib_interface_age; .pushsection .data; .type glib_interface_age,@object; .size glib_interface_age, 4; glib_interface_age: .long 0; .popsection");
__asm__(".globl glib_major_version; .pushsection .data; .type glib_major_version,@object; .size glib_major_version, 4; glib_major_version: .long 0; .popsection");
__asm__(".globl glib_mem_profiler_table; .pushsection .data; .type glib_mem_profiler_table,@object; .size glib_mem_profiler_table, 4; glib_mem_profiler_table: .long 0; .popsection");
__asm__(".globl glib_micro_version; .pushsection .data; .type glib_micro_version,@object; .size glib_micro_version, 4; glib_micro_version: .long 0; .popsection");
__asm__(".globl glib_minor_version; .pushsection .data; .type glib_minor_version,@object; .size glib_minor_version, 4; glib_minor_version: .long 0; .popsection");

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

View File

@ -0,0 +1,315 @@
void g_boxed_copy() {} ;
void g_boxed_free() {} ;
void g_boxed_type_register_static() {} ;
void g_cclosure_marshal_BOOLEAN__FLAGS() {} ;
void g_cclosure_marshal_STRING__OBJECT_POINTER() {} ;
void g_cclosure_marshal_VOID__BOOLEAN() {} ;
void g_cclosure_marshal_VOID__BOXED() {} ;
void g_cclosure_marshal_VOID__CHAR() {} ;
void g_cclosure_marshal_VOID__DOUBLE() {} ;
void g_cclosure_marshal_VOID__ENUM() {} ;
void g_cclosure_marshal_VOID__FLAGS() {} ;
void g_cclosure_marshal_VOID__FLOAT() {} ;
void g_cclosure_marshal_VOID__INT() {} ;
void g_cclosure_marshal_VOID__LONG() {} ;
void g_cclosure_marshal_VOID__OBJECT() {} ;
void g_cclosure_marshal_VOID__PARAM() {} ;
void g_cclosure_marshal_VOID__POINTER() {} ;
void g_cclosure_marshal_VOID__STRING() {} ;
void g_cclosure_marshal_VOID__UCHAR() {} ;
void g_cclosure_marshal_VOID__UINT() {} ;
void g_cclosure_marshal_VOID__UINT_POINTER() {} ;
void g_cclosure_marshal_VOID__ULONG() {} ;
void g_cclosure_marshal_VOID__VOID() {} ;
void g_cclosure_new() {} ;
void g_cclosure_new_object() {} ;
void g_cclosure_new_object_swap() {} ;
void g_cclosure_new_swap() {} ;
void g_closure_add_finalize_notifier() {} ;
void g_closure_add_invalidate_notifier() {} ;
void g_closure_add_marshal_guards() {} ;
void g_closure_get_type() {} ;
void g_closure_invalidate() {} ;
void g_closure_invoke() {} ;
void g_closure_new_object() {} ;
void g_closure_new_simple() {} ;
void g_closure_ref() {} ;
void g_closure_remove_finalize_notifier() {} ;
void g_closure_remove_invalidate_notifier() {} ;
void g_closure_set_marshal() {} ;
void g_closure_set_meta_marshal() {} ;
void g_closure_sink() {} ;
void g_closure_unref() {} ;
void g_enum_complete_type_info() {} ;
void g_enum_get_value() {} ;
void g_enum_get_value_by_name() {} ;
void g_enum_get_value_by_nick() {} ;
void g_enum_register_static() {} ;
void g_flags_complete_type_info() {} ;
void g_flags_get_first_value() {} ;
void g_flags_get_value_by_name() {} ;
void g_flags_get_value_by_nick() {} ;
void g_flags_register_static() {} ;
void g_gstring_get_type() {} ;
void g_io_channel_get_type() {} ;
void g_io_condition_get_type() {} ;
void g_object_add_weak_pointer() {} ;
void g_object_class_find_property() {} ;
void g_object_class_install_property() {} ;
void g_object_class_list_properties() {} ;
void g_object_class_override_property() {} ;
void g_object_connect() {} ;
void g_object_disconnect() {} ;
void g_object_freeze_notify() {} ;
void g_object_get() {} ;
void g_object_get_data() {} ;
void g_object_get_property() {} ;
void g_object_get_qdata() {} ;
void g_object_get_valist() {} ;
void g_object_interface_find_property() {} ;
void g_object_interface_install_property() {} ;
void g_object_interface_list_properties() {} ;
void g_object_new() {} ;
void g_object_new_valist() {} ;
void g_object_newv() {} ;
void g_object_notify() {} ;
void g_object_ref() {} ;
void g_object_remove_weak_pointer() {} ;
void g_object_run_dispose() {} ;
void g_object_set() {} ;
void g_object_set_data() {} ;
void g_object_set_data_full() {} ;
void g_object_set_property() {} ;
void g_object_set_qdata() {} ;
void g_object_set_qdata_full() {} ;
void g_object_set_valist() {} ;
void g_object_steal_data() {} ;
void g_object_steal_qdata() {} ;
void g_object_thaw_notify() {} ;
void g_object_unref() {} ;
void g_object_watch_closure() {} ;
void g_object_weak_ref() {} ;
void g_object_weak_unref() {} ;
void g_param_spec_boolean() {} ;
void g_param_spec_boxed() {} ;
void g_param_spec_char() {} ;
void g_param_spec_double() {} ;
void g_param_spec_enum() {} ;
void g_param_spec_flags() {} ;
void g_param_spec_float() {} ;
void g_param_spec_get_blurb() {} ;
void g_param_spec_get_name() {} ;
void g_param_spec_get_nick() {} ;
void g_param_spec_get_qdata() {} ;
void g_param_spec_get_redirect_target() {} ;
void g_param_spec_int() {} ;
void g_param_spec_int64() {} ;
void g_param_spec_internal() {} ;
void g_param_spec_long() {} ;
void g_param_spec_object() {} ;
void g_param_spec_override() {} ;
void g_param_spec_param() {} ;
void g_param_spec_pointer() {} ;
void g_param_spec_pool_insert() {} ;
void g_param_spec_pool_list() {} ;
void g_param_spec_pool_list_owned() {} ;
void g_param_spec_pool_lookup() {} ;
void g_param_spec_pool_new() {} ;
void g_param_spec_pool_remove() {} ;
void g_param_spec_ref() {} ;
void g_param_spec_set_qdata() {} ;
void g_param_spec_set_qdata_full() {} ;
void g_param_spec_sink() {} ;
void g_param_spec_steal_qdata() {} ;
void g_param_spec_string() {} ;
void g_param_spec_uchar() {} ;
void g_param_spec_uint() {} ;
void g_param_spec_uint64() {} ;
void g_param_spec_ulong() {} ;
void g_param_spec_unichar() {} ;
void g_param_spec_unref() {} ;
void g_param_spec_value_array() {} ;
void g_param_type_register_static() {} ;
void g_param_value_convert() {} ;
void g_param_value_defaults() {} ;
void g_param_value_set_default() {} ;
void g_param_value_validate() {} ;
void g_param_values_cmp() {} ;
void g_pointer_type_register_static() {} ;
void g_signal_accumulator_true_handled() {} ;
void g_signal_add_emission_hook() {} ;
void g_signal_chain_from_overridden() {} ;
void g_signal_connect_closure() {} ;
void g_signal_connect_closure_by_id() {} ;
void g_signal_connect_data() {} ;
void g_signal_connect_object() {} ;
void g_signal_emit() {} ;
void g_signal_emit_by_name() {} ;
void g_signal_emit_valist() {} ;
void g_signal_emitv() {} ;
void g_signal_get_invocation_hint() {} ;
void g_signal_handler_block() {} ;
void g_signal_handler_disconnect() {} ;
void g_signal_handler_find() {} ;
void g_signal_handler_is_connected() {} ;
void g_signal_handler_unblock() {} ;
void g_signal_handlers_block_matched() {} ;
void g_signal_handlers_destroy() {} ;
void g_signal_handlers_disconnect_matched() {} ;
void g_signal_handlers_unblock_matched() {} ;
void g_signal_has_handler_pending() {} ;
void g_signal_list_ids() {} ;
void g_signal_lookup() {} ;
void g_signal_name() {} ;
void g_signal_new() {} ;
void g_signal_new_valist() {} ;
void g_signal_newv() {} ;
void g_signal_override_class_closure() {} ;
void g_signal_parse_name() {} ;
void g_signal_query() {} ;
void g_signal_remove_emission_hook() {} ;
void g_signal_stop_emission() {} ;
void g_signal_stop_emission_by_name() {} ;
void g_signal_type_cclosure_new() {} ;
void g_source_set_closure() {} ;
void g_strdup_value_contents() {} ;
void g_strv_get_type() {} ;
void g_type_add_class_cache_func() {} ;
void g_type_add_interface_check() {} ;
void g_type_add_interface_dynamic() {} ;
void g_type_add_interface_static() {} ;
void g_type_check_class_cast() {} ;
void g_type_check_class_is_a() {} ;
void g_type_check_instance() {} ;
void g_type_check_instance_cast() {} ;
void g_type_check_instance_is_a() {} ;
void g_type_check_is_value_type() {} ;
void g_type_check_value() {} ;
void g_type_check_value_holds() {} ;
void g_type_children() {} ;
void g_type_class_add_private() {} ;
void g_type_class_peek() {} ;
void g_type_class_peek_parent() {} ;
void g_type_class_peek_static() {} ;
void g_type_class_ref() {} ;
void g_type_class_unref() {} ;
void g_type_class_unref_uncached() {} ;
void g_type_create_instance() {} ;
void g_type_default_interface_peek() {} ;
void g_type_default_interface_ref() {} ;
void g_type_default_interface_unref() {} ;
void g_type_depth() {} ;
void g_type_free_instance() {} ;
void g_type_from_name() {} ;
void g_type_fundamental() {} ;
void g_type_fundamental_next() {} ;
void g_type_get_plugin() {} ;
void g_type_get_qdata() {} ;
void g_type_init() {} ;
void g_type_init_with_debug_flags() {} ;
void g_type_instance_get_private() {} ;
void g_type_interface_add_prerequisite() {} ;
void g_type_interface_get_plugin() {} ;
void g_type_interface_peek() {} ;
void g_type_interface_peek_parent() {} ;
void g_type_interface_prerequisites() {} ;
void g_type_interfaces() {} ;
void g_type_is_a() {} ;
void g_type_module_add_interface() {} ;
void g_type_module_get_type() {} ;
void g_type_module_register_enum() {} ;
void g_type_module_register_flags() {} ;
void g_type_module_register_type() {} ;
void g_type_module_set_name() {} ;
void g_type_module_unuse() {} ;
void g_type_module_use() {} ;
void g_type_name() {} ;
void g_type_name_from_class() {} ;
void g_type_name_from_instance() {} ;
void g_type_next_base() {} ;
void g_type_parent() {} ;
void g_type_plugin_complete_interface_info() {} ;
void g_type_plugin_complete_type_info() {} ;
void g_type_plugin_get_type() {} ;
void g_type_plugin_unuse() {} ;
void g_type_plugin_use() {} ;
void g_type_qname() {} ;
void g_type_query() {} ;
void g_type_register_dynamic() {} ;
void g_type_register_fundamental() {} ;
void g_type_register_static() {} ;
void g_type_remove_class_cache_func() {} ;
void g_type_remove_interface_check() {} ;
void g_type_set_qdata() {} ;
void g_type_test_flags() {} ;
void g_type_value_table_peek() {} ;
void g_value_array_append() {} ;
void g_value_array_copy() {} ;
void g_value_array_free() {} ;
void g_value_array_get_nth() {} ;
void g_value_array_get_type() {} ;
void g_value_array_insert() {} ;
void g_value_array_new() {} ;
void g_value_array_prepend() {} ;
void g_value_array_remove() {} ;
void g_value_array_sort() {} ;
void g_value_array_sort_with_data() {} ;
void g_value_copy() {} ;
void g_value_dup_boxed() {} ;
void g_value_dup_object() {} ;
void g_value_dup_param() {} ;
void g_value_dup_string() {} ;
void g_value_fits_pointer() {} ;
void g_value_get_boolean() {} ;
void g_value_get_boxed() {} ;
void g_value_get_char() {} ;
void g_value_get_double() {} ;
void g_value_get_enum() {} ;
void g_value_get_flags() {} ;
void g_value_get_float() {} ;
void g_value_get_int() {} ;
void g_value_get_int64() {} ;
void g_value_get_long() {} ;
void g_value_get_object() {} ;
void g_value_get_param() {} ;
void g_value_get_pointer() {} ;
void g_value_get_string() {} ;
void g_value_get_type() {} ;
void g_value_get_uchar() {} ;
void g_value_get_uint() {} ;
void g_value_get_uint64() {} ;
void g_value_get_ulong() {} ;
void g_value_init() {} ;
void g_value_peek_pointer() {} ;
void g_value_register_transform_func() {} ;
void g_value_reset() {} ;
void g_value_set_boolean() {} ;
void g_value_set_boxed() {} ;
void g_value_set_char() {} ;
void g_value_set_double() {} ;
void g_value_set_enum() {} ;
void g_value_set_flags() {} ;
void g_value_set_float() {} ;
void g_value_set_instance() {} ;
void g_value_set_int() {} ;
void g_value_set_int64() {} ;
void g_value_set_long() {} ;
void g_value_set_object() {} ;
void g_value_set_param() {} ;
void g_value_set_pointer() {} ;
void g_value_set_static_boxed() {} ;
void g_value_set_static_string() {} ;
void g_value_set_string() {} ;
void g_value_set_uchar() {} ;
void g_value_set_uint() {} ;
void g_value_set_uint64() {} ;
void g_value_set_ulong() {} ;
void g_value_take_boxed() {} ;
void g_value_take_object() {} ;
void g_value_take_param() {} ;
void g_value_take_string() {} ;
void g_value_transform() {} ;
void g_value_type_compatible() {} ;
void g_value_type_transformable() {} ;
void g_value_unset() {} ;
__asm__(".globl g_param_spec_types; .pushsection .data; .type g_param_spec_types,@object; .size g_param_spec_types, 4; g_param_spec_types: .long 0; .popsection");

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

View File

@ -0,0 +1,2 @@
void g_thread_init() {} ;
void g_thread_init_with_errorcheck_mutexes() {} ;

View File

@ -0,0 +1 @@
LSB_DUMMY { __LSB_DUMMY; };

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,107 @@
LSB_DUMMY { __LSB_DUMMY; };
GLIBC_2.0 {
_pthread_cleanup_pop;
_pthread_cleanup_push;
pthread_attr_destroy;
pthread_attr_getdetachstate;
pthread_attr_getinheritsched;
pthread_attr_getschedparam;
pthread_attr_getschedpolicy;
pthread_attr_getscope;
pthread_attr_setdetachstate;
pthread_attr_setinheritsched;
pthread_attr_setschedparam;
pthread_attr_setschedpolicy;
pthread_attr_setscope;
pthread_cancel;
pthread_condattr_destroy;
pthread_condattr_init;
pthread_detach;
pthread_equal;
pthread_exit;
pthread_getschedparam;
pthread_getspecific;
pthread_join;
pthread_key_create;
pthread_key_delete;
pthread_kill;
pthread_mutex_destroy;
pthread_mutex_init;
pthread_mutex_lock;
pthread_mutex_trylock;
pthread_mutex_unlock;
pthread_mutexattr_destroy;
pthread_mutexattr_init;
pthread_once;
pthread_self;
pthread_setcancelstate;
pthread_setcanceltype;
pthread_setschedparam;
pthread_setspecific;
pthread_sigmask;
pthread_testcancel;
};
GLIBC_2.1 {
pthread_attr_getguardsize;
pthread_attr_getstackaddr;
pthread_attr_getstacksize;
pthread_attr_init;
pthread_attr_setguardsize;
pthread_attr_setstackaddr;
pthread_attr_setstacksize;
pthread_create;
pthread_getconcurrency;
pthread_mutexattr_gettype;
pthread_mutexattr_settype;
pthread_rwlock_destroy;
pthread_rwlock_init;
pthread_rwlock_rdlock;
pthread_rwlock_tryrdlock;
pthread_rwlock_trywrlock;
pthread_rwlock_unlock;
pthread_rwlock_wrlock;
pthread_rwlockattr_destroy;
pthread_rwlockattr_getpshared;
pthread_rwlockattr_init;
pthread_rwlockattr_setpshared;
pthread_setconcurrency;
sem_destroy;
sem_getvalue;
sem_init;
sem_post;
sem_trywait;
sem_wait;
};
GLIBC_2.1.1 {
sem_close;
sem_open;
sem_unlink;
};
GLIBC_2.2 {
lseek64;
open64;
pread;
pread64;
pthread_attr_getstack;
pthread_attr_setstack;
pthread_condattr_getpshared;
pthread_condattr_setpshared;
pthread_mutexattr_getpshared;
pthread_mutexattr_setpshared;
pthread_rwlock_timedrdlock;
pthread_rwlock_timedwrlock;
pwrite;
pwrite64;
sem_timedwait;
};
GLIBC_2.3.2 {
pthread_cond_broadcast;
pthread_cond_destroy;
pthread_cond_init;
pthread_cond_signal;
pthread_cond_timedwait;
pthread_cond_wait;
};
GLIBC_2.3.4 {
pthread_setschedprio;
};

View File

@ -0,0 +1,94 @@
void _pthread_cleanup_pop() {} ;
void _pthread_cleanup_push() {} ;
void lseek64() {} ;
void open64() {} ;
void pread() {} ;
void pread64() {} ;
void pthread_attr_destroy() {} ;
void pthread_attr_getdetachstate() {} ;
void pthread_attr_getguardsize() {} ;
void pthread_attr_getinheritsched() {} ;
void pthread_attr_getschedparam() {} ;
void pthread_attr_getschedpolicy() {} ;
void pthread_attr_getscope() {} ;
void pthread_attr_getstack() {} ;
void pthread_attr_getstackaddr() {} ;
void pthread_attr_getstacksize() {} ;
void pthread_attr_init() {} ;
void pthread_attr_setdetachstate() {} ;
void pthread_attr_setguardsize() {} ;
void pthread_attr_setinheritsched() {} ;
void pthread_attr_setschedparam() {} ;
void pthread_attr_setschedpolicy() {} ;
void pthread_attr_setscope() {} ;
void pthread_attr_setstack() {} ;
void pthread_attr_setstackaddr() {} ;
void pthread_attr_setstacksize() {} ;
void pthread_cancel() {} ;
void pthread_cond_broadcast() {} ;
void pthread_cond_destroy() {} ;
void pthread_cond_init() {} ;
void pthread_cond_signal() {} ;
void pthread_cond_timedwait() {} ;
void pthread_cond_wait() {} ;
void pthread_condattr_destroy() {} ;
void pthread_condattr_getpshared() {} ;
void pthread_condattr_init() {} ;
void pthread_condattr_setpshared() {} ;
void pthread_create() {} ;
void pthread_detach() {} ;
void pthread_equal() {} ;
void pthread_exit() {} ;
void pthread_getconcurrency() {} ;
void pthread_getschedparam() {} ;
void pthread_getspecific() {} ;
void pthread_join() {} ;
void pthread_key_create() {} ;
void pthread_key_delete() {} ;
void pthread_kill() {} ;
void pthread_mutex_destroy() {} ;
void pthread_mutex_init() {} ;
void pthread_mutex_lock() {} ;
void pthread_mutex_trylock() {} ;
void pthread_mutex_unlock() {} ;
void pthread_mutexattr_destroy() {} ;
void pthread_mutexattr_getpshared() {} ;
void pthread_mutexattr_gettype() {} ;
void pthread_mutexattr_init() {} ;
void pthread_mutexattr_setpshared() {} ;
void pthread_mutexattr_settype() {} ;
void pthread_once() {} ;
void pthread_rwlock_destroy() {} ;
void pthread_rwlock_init() {} ;
void pthread_rwlock_rdlock() {} ;
void pthread_rwlock_timedrdlock() {} ;
void pthread_rwlock_timedwrlock() {} ;
void pthread_rwlock_tryrdlock() {} ;
void pthread_rwlock_trywrlock() {} ;
void pthread_rwlock_unlock() {} ;
void pthread_rwlock_wrlock() {} ;
void pthread_rwlockattr_destroy() {} ;
void pthread_rwlockattr_getpshared() {} ;
void pthread_rwlockattr_init() {} ;
void pthread_rwlockattr_setpshared() {} ;
void pthread_self() {} ;
void pthread_setcancelstate() {} ;
void pthread_setcanceltype() {} ;
void pthread_setconcurrency() {} ;
void pthread_setschedparam() {} ;
void pthread_setschedprio() {} ;
void pthread_setspecific() {} ;
void pthread_sigmask() {} ;
void pthread_testcancel() {} ;
void pwrite() {} ;
void pwrite64() {} ;
void sem_close() {} ;
void sem_destroy() {} ;
void sem_getvalue() {} ;
void sem_init() {} ;
void sem_open() {} ;
void sem_post() {} ;
void sem_timedwait() {} ;
void sem_trywait() {} ;
void sem_unlink() {} ;
void sem_wait() {} ;

1810
npapi/jni.h Normal file

File diff suppressed because it is too large Load Diff

182
npapi/jni_md.h Normal file
View File

@ -0,0 +1,182 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
*
* This Original Code has been modified by IBM Corporation.
* Modifications made by IBM described herein are
* Copyright (c) International Business Machines
* Corporation, 2000
*
* Modifications to Mozilla code or documentation
* identified per MPL Section 3.3
*
* Date Modified by Description of modification
* 03/27/2000 IBM Corp. Set JNICALL to Optlink for
* use in OS2
*/
/*******************************************************************************
* Netscape version of jni_md.h -- depends on jri_md.h
******************************************************************************/
#ifndef JNI_MD_H
#define JNI_MD_H
#include "prtypes.h" /* needed for _declspec */
/*******************************************************************************
* WHAT'S UP WITH THIS FILE?
*
* This is where we define the mystical JNI_PUBLIC_API macro that works on all
* platforms. If you're running with Visual C++, Symantec C, or Borland's
* development environment on the PC, you're all set. Or if you're on the Mac
* with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't
* matter.
* Changes by sailesh on 9/26
* There are two symbols used in the declaration of the JNI functions
* and native code that uses the JNI:
* JNICALL - specifies the calling convention
* JNIEXPORT - specifies export status of the function
*
* The syntax to specify calling conventions is different in Win16 and
* Win32 - the brains at Micro$oft at work here. JavaSoft in their
* infinite wisdom cares for no platform other than Win32, and so they
* just define these two symbols as:
#define JNIEXPORT __declspec(dllexport)
#define JNICALL __stdcall
* We deal with this, in the way JRI defines the JRI_PUBLIC_API, by
* defining a macro called JNI_PUBLIC_API. Any of our developers who
* wish to use code for Win16 and Win32, _must_ use JNI_PUBLIC_API to
* be able to export functions properly.
* Since we must also maintain compatibility with JavaSoft, we
* continue to define the symbol JNIEXPORT. However, use of this
* internally is deprecated, since it will cause a mess on Win16.
* We _do not_ need a new symbol called JNICALL. Instead we
* redefine JNICALL in the same way JRI_CALLBACK was defined.
******************************************************************************/
/* DLL Entry modifiers... */
#if defined(XP_OS2)
# ifdef XP_OS2_VACPP
# define JNI_PUBLIC_API(ResultType) ResultType _System
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNICALL _Optlink
# define JNIEXPORT
# else
# define JNI_PUBLIC_API(ResultType) ResultType
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNICALL
# define JNIEXPORT
# endif
/* Win32 */
#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
# include <windows.h>
# if defined(_MSC_VER) || defined(__GNUC__)
# if defined(WIN32) || defined(_WIN32)
# define JNI_PUBLIC_API(ResultType) _declspec(dllexport) ResultType __stdcall
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) _declspec(dllexport) ResultType
# define JNICALL __stdcall
# else /* !_WIN32 */
# if defined(_WINDLL)
# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds
# define JNICALL __loadds
# else /* !WINDLL */
# define JNI_PUBLIC_API(ResultType) ResultType __cdecl __export
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType __cdecl __export
# define JNICALL __export
# endif /* !WINDLL */
# endif /* !_WIN32 */
# elif defined(__BORLANDC__)
# if defined(WIN32) || defined(_WIN32)
# define JNI_PUBLIC_API(ResultType) __export ResultType
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) __export ResultType
# define JNICALL
# else /* !_WIN32 */
# define JNI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds
# define JNICALL _loadds
# endif
# else
# error Unsupported PC development environment.
# endif
# ifndef IS_LITTLE_ENDIAN
# define IS_LITTLE_ENDIAN
# endif
/* This is the stuff inherited from JavaSoft .. */
# define JNIEXPORT __declspec(dllexport)
/* Mac */
#elif macintosh || Macintosh || THINK_C
# if defined(__MWERKS__) /* Metrowerks */
# if !__option(enumsalwaysint)
# error You need to define 'Enums Always Int' for your project.
# endif
# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM
# if !__option(fourbyteints)
# error You need to define 'Struct Alignment: 68k' for your project.
# endif
# endif /* !GENERATINGCFM */
# define JNI_PUBLIC_API(ResultType) __declspec(export) ResultType
# define JNI_PUBLIC_VAR(VarType) JNI_PUBLIC_API(VarType)
# define JNI_NATIVE_STUB(ResultType) JNI_PUBLIC_API(ResultType)
# elif defined(__SC__) /* Symantec */
# error What are the Symantec defines? (warren@netscape.com)
# elif macintosh && applec /* MPW */
# error Please upgrade to the latest MPW compiler (SC).
# else
# error Unsupported Mac development environment.
# endif
# define JNICALL
/* This is the stuff inherited from JavaSoft .. */
# define JNIEXPORT
/* Unix or else */
#else
# define JNI_PUBLIC_API(ResultType) ResultType
# define JNI_PUBLIC_VAR(VarType) VarType
# define JNI_NATIVE_STUB(ResultType) ResultType
# define JNICALL
/* This is the stuff inherited from JavaSoft .. */
# define JNIEXPORT
#endif
#ifndef FAR /* for non-Win16 */
#define FAR
#endif
/* Get the rest of the stuff from jri_md.h */
#include "jri_md.h"
#endif /* JNI_MD_H */

689
npapi/jri.h Normal file
View File

@ -0,0 +1,689 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*******************************************************************************
* Java Runtime Interface
******************************************************************************/
#ifndef JRI_H
#define JRI_H
#include "jritypes.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/*******************************************************************************
* JRIEnv
******************************************************************************/
/* The type of the JRIEnv interface. */
typedef struct JRIEnvInterface JRIEnvInterface;
/* The type of a JRIEnv instance. */
typedef const JRIEnvInterface* JRIEnv;
/*******************************************************************************
* JRIEnv Operations
******************************************************************************/
#define JRI_DefineClass(env, classLoader, buf, bufLen) \
(((*(env))->DefineClass)(env, JRI_DefineClass_op, classLoader, buf, bufLen))
#define JRI_FindClass(env, name) \
(((*(env))->FindClass)(env, JRI_FindClass_op, name))
#define JRI_Throw(env, obj) \
(((*(env))->Throw)(env, JRI_Throw_op, obj))
#define JRI_ThrowNew(env, clazz, message) \
(((*(env))->ThrowNew)(env, JRI_ThrowNew_op, clazz, message))
#define JRI_ExceptionOccurred(env) \
(((*(env))->ExceptionOccurred)(env, JRI_ExceptionOccurred_op))
#define JRI_ExceptionDescribe(env) \
(((*(env))->ExceptionDescribe)(env, JRI_ExceptionDescribe_op))
#define JRI_ExceptionClear(env) \
(((*(env))->ExceptionClear)(env, JRI_ExceptionClear_op))
#define JRI_NewGlobalRef(env, ref) \
(((*(env))->NewGlobalRef)(env, JRI_NewGlobalRef_op, ref))
#define JRI_DisposeGlobalRef(env, gref) \
(((*(env))->DisposeGlobalRef)(env, JRI_DisposeGlobalRef_op, gref))
#define JRI_GetGlobalRef(env, gref) \
(((*(env))->GetGlobalRef)(env, JRI_GetGlobalRef_op, gref))
#define JRI_SetGlobalRef(env, gref, ref) \
(((*(env))->SetGlobalRef)(env, JRI_SetGlobalRef_op, gref, ref))
#define JRI_IsSameObject(env, a, b) \
(((*(env))->IsSameObject)(env, JRI_IsSameObject_op, a, b))
#define JRI_NewObject(env) ((*(env))->NewObject)
#define JRI_NewObjectV(env, clazz, methodID, args) \
(((*(env))->NewObjectV)(env, JRI_NewObject_op_va_list, clazz, methodID, args))
#define JRI_NewObjectA(env, clazz, method, args) \
(((*(env))->NewObjectA)(env, JRI_NewObject_op_array, clazz, methodID, args))
#define JRI_GetObjectClass(env, obj) \
(((*(env))->GetObjectClass)(env, JRI_GetObjectClass_op, obj))
#define JRI_IsInstanceOf(env, obj, clazz) \
(((*(env))->IsInstanceOf)(env, JRI_IsInstanceOf_op, obj, clazz))
#define JRI_GetMethodID(env, clazz, name, sig) \
(((*(env))->GetMethodID)(env, JRI_GetMethodID_op, clazz, name, sig))
#define JRI_CallMethod(env) ((*(env))->CallMethod)
#define JRI_CallMethodV(env, obj, methodID, args) \
(((*(env))->CallMethodV)(env, JRI_CallMethod_op_va_list, obj, methodID, args))
#define JRI_CallMethodA(env, obj, methodID, args) \
(((*(env))->CallMethodA)(env, JRI_CallMethod_op_array, obj, methodID, args))
#define JRI_CallMethodBoolean(env) ((*(env))->CallMethodBoolean)
#define JRI_CallMethodBooleanV(env, obj, methodID, args) \
(((*(env))->CallMethodBooleanV)(env, JRI_CallMethodBoolean_op_va_list, obj, methodID, args))
#define JRI_CallMethodBooleanA(env, obj, methodID, args) \
(((*(env))->CallMethodBooleanA)(env, JRI_CallMethodBoolean_op_array, obj, methodID, args))
#define JRI_CallMethodByte(env) ((*(env))->CallMethodByte)
#define JRI_CallMethodByteV(env, obj, methodID, args) \
(((*(env))->CallMethodByteV)(env, JRI_CallMethodByte_op_va_list, obj, methodID, args))
#define JRI_CallMethodByteA(env, obj, methodID, args) \
(((*(env))->CallMethodByteA)(env, JRI_CallMethodByte_op_array, obj, methodID, args))
#define JRI_CallMethodChar(env) ((*(env))->CallMethodChar)
#define JRI_CallMethodCharV(env, obj, methodID, args) \
(((*(env))->CallMethodCharV)(env, JRI_CallMethodChar_op_va_list, obj, methodID, args))
#define JRI_CallMethodCharA(env, obj, methodID, args) \
(((*(env))->CallMethodCharA)(env, JRI_CallMethodChar_op_array, obj, methodID, args))
#define JRI_CallMethodShort(env) ((*(env))->CallMethodShort)
#define JRI_CallMethodShortV(env, obj, methodID, args) \
(((*(env))->CallMethodShortV)(env, JRI_CallMethodShort_op_va_list, obj, methodID, args))
#define JRI_CallMethodShortA(env, obj, methodID, args) \
(((*(env))->CallMethodShortA)(env, JRI_CallMethodShort_op_array, obj, methodID, args))
#define JRI_CallMethodInt(env) ((*(env))->CallMethodInt)
#define JRI_CallMethodIntV(env, obj, methodID, args) \
(((*(env))->CallMethodIntV)(env, JRI_CallMethodInt_op_va_list, obj, methodID, args))
#define JRI_CallMethodIntA(env, obj, methodID, args) \
(((*(env))->CallMethodIntA)(env, JRI_CallMethodInt_op_array, obj, methodID, args))
#define JRI_CallMethodLong(env) ((*(env))->CallMethodLong)
#define JRI_CallMethodLongV(env, obj, methodID, args) \
(((*(env))->CallMethodLongV)(env, JRI_CallMethodLong_op_va_list, obj, methodID, args))
#define JRI_CallMethodLongA(env, obj, methodID, args) \
(((*(env))->CallMethodLongA)(env, JRI_CallMethodLong_op_array, obj, methodID, args))
#define JRI_CallMethodFloat(env) ((*(env))->CallMethodFloat)
#define JRI_CallMethodFloatV(env, obj, methodID, args) \
(((*(env))->CallMethodFloatV)(env, JRI_CallMethodFloat_op_va_list, obj, methodID, args))
#define JRI_CallMethodFloatA(env, obj, methodID, args) \
(((*(env))->CallMethodFloatA)(env, JRI_CallMethodFloat_op_array, obj, methodID, args))
#define JRI_CallMethodDouble(env) ((*(env))->CallMethodDouble)
#define JRI_CallMethodDoubleV(env, obj, methodID, args) \
(((*(env))->CallMethodDoubleV)(env, JRI_CallMethodDouble_op_va_list, obj, methodID, args))
#define JRI_CallMethodDoubleA(env, obj, methodID, args) \
(((*(env))->CallMethodDoubleA)(env, JRI_CallMethodDouble_op_array, obj, methodID, args))
#define JRI_GetFieldID(env, clazz, name, sig) \
(((*(env))->GetFieldID)(env, JRI_GetFieldID_op, clazz, name, sig))
#define JRI_GetField(env, obj, fieldID) \
(((*(env))->GetField)(env, JRI_GetField_op, obj, fieldID))
#define JRI_GetFieldBoolean(env, obj, fieldID) \
(((*(env))->GetFieldBoolean)(env, JRI_GetFieldBoolean_op, obj, fieldID))
#define JRI_GetFieldByte(env, obj, fieldID) \
(((*(env))->GetFieldByte)(env, JRI_GetFieldByte_op, obj, fieldID))
#define JRI_GetFieldChar(env, obj, fieldID) \
(((*(env))->GetFieldChar)(env, JRI_GetFieldChar_op, obj, fieldID))
#define JRI_GetFieldShort(env, obj, fieldID) \
(((*(env))->GetFieldShort)(env, JRI_GetFieldShort_op, obj, fieldID))
#define JRI_GetFieldInt(env, obj, fieldID) \
(((*(env))->GetFieldInt)(env, JRI_GetFieldInt_op, obj, fieldID))
#define JRI_GetFieldLong(env, obj, fieldID) \
(((*(env))->GetFieldLong)(env, JRI_GetFieldLong_op, obj, fieldID))
#define JRI_GetFieldFloat(env, obj, fieldID) \
(((*(env))->GetFieldFloat)(env, JRI_GetFieldFloat_op, obj, fieldID))
#define JRI_GetFieldDouble(env, obj, fieldID) \
(((*(env))->GetFieldDouble)(env, JRI_GetFieldDouble_op, obj, fieldID))
#define JRI_SetField(env, obj, fieldID, value) \
(((*(env))->SetField)(env, JRI_SetField_op, obj, fieldID, value))
#define JRI_SetFieldBoolean(env, obj, fieldID, value) \
(((*(env))->SetFieldBoolean)(env, JRI_SetFieldBoolean_op, obj, fieldID, value))
#define JRI_SetFieldByte(env, obj, fieldID, value) \
(((*(env))->SetFieldByte)(env, JRI_SetFieldByte_op, obj, fieldID, value))
#define JRI_SetFieldChar(env, obj, fieldID, value) \
(((*(env))->SetFieldChar)(env, JRI_SetFieldChar_op, obj, fieldID, value))
#define JRI_SetFieldShort(env, obj, fieldID, value) \
(((*(env))->SetFieldShort)(env, JRI_SetFieldShort_op, obj, fieldID, value))
#define JRI_SetFieldInt(env, obj, fieldID, value) \
(((*(env))->SetFieldInt)(env, JRI_SetFieldInt_op, obj, fieldID, value))
#define JRI_SetFieldLong(env, obj, fieldID, value) \
(((*(env))->SetFieldLong)(env, JRI_SetFieldLong_op, obj, fieldID, value))
#define JRI_SetFieldFloat(env, obj, fieldID, value) \
(((*(env))->SetFieldFloat)(env, JRI_SetFieldFloat_op, obj, fieldID, value))
#define JRI_SetFieldDouble(env, obj, fieldID, value) \
(((*(env))->SetFieldDouble)(env, JRI_SetFieldDouble_op, obj, fieldID, value))
#define JRI_IsSubclassOf(env, a, b) \
(((*(env))->IsSubclassOf)(env, JRI_IsSubclassOf_op, a, b))
#define JRI_GetStaticMethodID(env, clazz, name, sig) \
(((*(env))->GetStaticMethodID)(env, JRI_GetStaticMethodID_op, clazz, name, sig))
#define JRI_CallStaticMethod(env) ((*(env))->CallStaticMethod)
#define JRI_CallStaticMethodV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodV)(env, JRI_CallStaticMethod_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodA)(env, JRI_CallStaticMethod_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodBoolean(env) ((*(env))->CallStaticMethodBoolean)
#define JRI_CallStaticMethodBooleanV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodBooleanV)(env, JRI_CallStaticMethodBoolean_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodBooleanA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodBooleanA)(env, JRI_CallStaticMethodBoolean_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodByte(env) ((*(env))->CallStaticMethodByte)
#define JRI_CallStaticMethodByteV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodByteV)(env, JRI_CallStaticMethodByte_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodByteA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodByteA)(env, JRI_CallStaticMethodByte_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodChar(env) ((*(env))->CallStaticMethodChar)
#define JRI_CallStaticMethodCharV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodCharV)(env, JRI_CallStaticMethodChar_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodCharA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodCharA)(env, JRI_CallStaticMethodChar_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodShort(env) ((*(env))->CallStaticMethodShort)
#define JRI_CallStaticMethodShortV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodShortV)(env, JRI_CallStaticMethodShort_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodShortA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodShortA)(env, JRI_CallStaticMethodShort_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodInt(env) ((*(env))->CallStaticMethodInt)
#define JRI_CallStaticMethodIntV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodIntV)(env, JRI_CallStaticMethodInt_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodIntA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodIntA)(env, JRI_CallStaticMethodInt_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodLong(env) ((*(env))->CallStaticMethodLong)
#define JRI_CallStaticMethodLongV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodLongV)(env, JRI_CallStaticMethodLong_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodLongA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodLongA)(env, JRI_CallStaticMethodLong_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodFloat(env) ((*(env))->CallStaticMethodFloat)
#define JRI_CallStaticMethodFloatV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodFloatV)(env, JRI_CallStaticMethodFloat_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodFloatA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodFloatA)(env, JRI_CallStaticMethodFloat_op_array, clazz, methodID, args))
#define JRI_CallStaticMethodDouble(env) ((*(env))->CallStaticMethodDouble)
#define JRI_CallStaticMethodDoubleV(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodDoubleV)(env, JRI_CallStaticMethodDouble_op_va_list, clazz, methodID, args))
#define JRI_CallStaticMethodDoubleA(env, clazz, methodID, args) \
(((*(env))->CallStaticMethodDoubleA)(env, JRI_CallStaticMethodDouble_op_array, clazz, methodID, args))
#define JRI_GetStaticFieldID(env, clazz, name, sig) \
(((*(env))->GetStaticFieldID)(env, JRI_GetStaticFieldID_op, clazz, name, sig))
#define JRI_GetStaticField(env, clazz, fieldID) \
(((*(env))->GetStaticField)(env, JRI_GetStaticField_op, clazz, fieldID))
#define JRI_GetStaticFieldBoolean(env, clazz, fieldID) \
(((*(env))->GetStaticFieldBoolean)(env, JRI_GetStaticFieldBoolean_op, clazz, fieldID))
#define JRI_GetStaticFieldByte(env, clazz, fieldID) \
(((*(env))->GetStaticFieldByte)(env, JRI_GetStaticFieldByte_op, clazz, fieldID))
#define JRI_GetStaticFieldChar(env, clazz, fieldID) \
(((*(env))->GetStaticFieldChar)(env, JRI_GetStaticFieldChar_op, clazz, fieldID))
#define JRI_GetStaticFieldShort(env, clazz, fieldID) \
(((*(env))->GetStaticFieldShort)(env, JRI_GetStaticFieldShort_op, clazz, fieldID))
#define JRI_GetStaticFieldInt(env, clazz, fieldID) \
(((*(env))->GetStaticFieldInt)(env, JRI_GetStaticFieldInt_op, clazz, fieldID))
#define JRI_GetStaticFieldLong(env, clazz, fieldID) \
(((*(env))->GetStaticFieldLong)(env, JRI_GetStaticFieldLong_op, clazz, fieldID))
#define JRI_GetStaticFieldFloat(env, clazz, fieldID) \
(((*(env))->GetStaticFieldFloat)(env, JRI_GetStaticFieldFloat_op, clazz, fieldID))
#define JRI_GetStaticFieldDouble(env, clazz, fieldID) \
(((*(env))->GetStaticFieldDouble)(env, JRI_GetStaticFieldDouble_op, clazz, fieldID))
#define JRI_SetStaticField(env, clazz, fieldID, value) \
(((*(env))->SetStaticField)(env, JRI_SetStaticField_op, clazz, fieldID, value))
#define JRI_SetStaticFieldBoolean(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldBoolean)(env, JRI_SetStaticFieldBoolean_op, clazz, fieldID, value))
#define JRI_SetStaticFieldByte(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldByte)(env, JRI_SetStaticFieldByte_op, clazz, fieldID, value))
#define JRI_SetStaticFieldChar(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldChar)(env, JRI_SetStaticFieldChar_op, clazz, fieldID, value))
#define JRI_SetStaticFieldShort(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldShort)(env, JRI_SetStaticFieldShort_op, clazz, fieldID, value))
#define JRI_SetStaticFieldInt(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldInt)(env, JRI_SetStaticFieldInt_op, clazz, fieldID, value))
#define JRI_SetStaticFieldLong(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldLong)(env, JRI_SetStaticFieldLong_op, clazz, fieldID, value))
#define JRI_SetStaticFieldFloat(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldFloat)(env, JRI_SetStaticFieldFloat_op, clazz, fieldID, value))
#define JRI_SetStaticFieldDouble(env, clazz, fieldID, value) \
(((*(env))->SetStaticFieldDouble)(env, JRI_SetStaticFieldDouble_op, clazz, fieldID, value))
#define JRI_NewString(env, unicode, len) \
(((*(env))->NewString)(env, JRI_NewString_op, unicode, len))
#define JRI_GetStringLength(env, string) \
(((*(env))->GetStringLength)(env, JRI_GetStringLength_op, string))
#define JRI_GetStringChars(env, string) \
(((*(env))->GetStringChars)(env, JRI_GetStringChars_op, string))
#define JRI_NewStringUTF(env, utf, len) \
(((*(env))->NewStringUTF)(env, JRI_NewStringUTF_op, utf, len))
#define JRI_GetStringUTFLength(env, string) \
(((*(env))->GetStringUTFLength)(env, JRI_GetStringUTFLength_op, string))
#define JRI_GetStringUTFChars(env, string) \
(((*(env))->GetStringUTFChars)(env, JRI_GetStringUTFChars_op, string))
#define JRI_NewScalarArray(env, length, elementSig, initialElements) \
(((*(env))->NewScalarArray)(env, JRI_NewScalarArray_op, length, elementSig, initialElements))
#define JRI_GetScalarArrayLength(env, array) \
(((*(env))->GetScalarArrayLength)(env, JRI_GetScalarArrayLength_op, array))
#define JRI_GetScalarArrayElements(env, array) \
(((*(env))->GetScalarArrayElements)(env, JRI_GetScalarArrayElements_op, array))
#define JRI_NewObjectArray(env, length, elementClass, initialElement) \
(((*(env))->NewObjectArray)(env, JRI_NewObjectArray_op, length, elementClass, initialElement))
#define JRI_GetObjectArrayLength(env, array) \
(((*(env))->GetObjectArrayLength)(env, JRI_GetObjectArrayLength_op, array))
#define JRI_GetObjectArrayElement(env, array, index) \
(((*(env))->GetObjectArrayElement)(env, JRI_GetObjectArrayElement_op, array, index))
#define JRI_SetObjectArrayElement(env, array, index, value) \
(((*(env))->SetObjectArrayElement)(env, JRI_SetObjectArrayElement_op, array, index, value))
#define JRI_RegisterNatives(env, clazz, nameAndSigArray, nativeProcArray) \
(((*(env))->RegisterNatives)(env, JRI_RegisterNatives_op, clazz, nameAndSigArray, nativeProcArray))
#define JRI_UnregisterNatives(env, clazz) \
(((*(env))->UnregisterNatives)(env, JRI_UnregisterNatives_op, clazz))
#define JRI_NewStringPlatform(env, string, len, encoding, encodingLength) \
(((*(env))->NewStringPlatform)(env, JRI_NewStringPlatform_op, string, len, encoding, encodingLength))
#define JRI_GetStringPlatformChars(env, string, encoding, encodingLength) \
(((*(env))->GetStringPlatformChars)(env, JRI_GetStringPlatformChars_op, string, encoding, encodingLength))
/*******************************************************************************
* JRIEnv Interface
******************************************************************************/
struct java_lang_ClassLoader;
struct java_lang_Class;
struct java_lang_Throwable;
struct java_lang_Object;
struct java_lang_String;
struct JRIEnvInterface {
void* reserved0;
void* reserved1;
void* reserved2;
void* reserved3;
struct java_lang_Class* (*FindClass)(JRIEnv* env, jint op, const char* a);
void (*Throw)(JRIEnv* env, jint op, struct java_lang_Throwable* a);
void (*ThrowNew)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b);
struct java_lang_Throwable* (*ExceptionOccurred)(JRIEnv* env, jint op);
void (*ExceptionDescribe)(JRIEnv* env, jint op);
void (*ExceptionClear)(JRIEnv* env, jint op);
jglobal (*NewGlobalRef)(JRIEnv* env, jint op, void* a);
void (*DisposeGlobalRef)(JRIEnv* env, jint op, jglobal a);
void* (*GetGlobalRef)(JRIEnv* env, jint op, jglobal a);
void (*SetGlobalRef)(JRIEnv* env, jint op, jglobal a, void* b);
jbool (*IsSameObject)(JRIEnv* env, jint op, void* a, void* b);
void* (*NewObject)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
void* (*NewObjectV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
void* (*NewObjectA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
struct java_lang_Class* (*GetObjectClass)(JRIEnv* env, jint op, void* a);
jbool (*IsInstanceOf)(JRIEnv* env, jint op, void* a, struct java_lang_Class* b);
jint (*GetMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
void* (*CallMethod)(JRIEnv* env, jint op, void* a, jint b, ...);
void* (*CallMethodV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
void* (*CallMethodA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jbool (*CallMethodBoolean)(JRIEnv* env, jint op, void* a, jint b, ...);
jbool (*CallMethodBooleanV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jbool (*CallMethodBooleanA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jbyte (*CallMethodByte)(JRIEnv* env, jint op, void* a, jint b, ...);
jbyte (*CallMethodByteV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jbyte (*CallMethodByteA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jchar (*CallMethodChar)(JRIEnv* env, jint op, void* a, jint b, ...);
jchar (*CallMethodCharV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jchar (*CallMethodCharA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jshort (*CallMethodShort)(JRIEnv* env, jint op, void* a, jint b, ...);
jshort (*CallMethodShortV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jshort (*CallMethodShortA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jint (*CallMethodInt)(JRIEnv* env, jint op, void* a, jint b, ...);
jint (*CallMethodIntV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jint (*CallMethodIntA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jlong (*CallMethodLong)(JRIEnv* env, jint op, void* a, jint b, ...);
jlong (*CallMethodLongV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jlong (*CallMethodLongA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jfloat (*CallMethodFloat)(JRIEnv* env, jint op, void* a, jint b, ...);
jfloat (*CallMethodFloatV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jfloat (*CallMethodFloatA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jdouble (*CallMethodDouble)(JRIEnv* env, jint op, void* a, jint b, ...);
jdouble (*CallMethodDoubleV)(JRIEnv* env, jint op, void* a, jint b, va_list c);
jdouble (*CallMethodDoubleA)(JRIEnv* env, jint op, void* a, jint b, JRIValue* c);
jint (*GetFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
void* (*GetField)(JRIEnv* env, jint op, void* a, jint b);
jbool (*GetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b);
jbyte (*GetFieldByte)(JRIEnv* env, jint op, void* a, jint b);
jchar (*GetFieldChar)(JRIEnv* env, jint op, void* a, jint b);
jshort (*GetFieldShort)(JRIEnv* env, jint op, void* a, jint b);
jint (*GetFieldInt)(JRIEnv* env, jint op, void* a, jint b);
jlong (*GetFieldLong)(JRIEnv* env, jint op, void* a, jint b);
jfloat (*GetFieldFloat)(JRIEnv* env, jint op, void* a, jint b);
jdouble (*GetFieldDouble)(JRIEnv* env, jint op, void* a, jint b);
void (*SetField)(JRIEnv* env, jint op, void* a, jint b, void* c);
void (*SetFieldBoolean)(JRIEnv* env, jint op, void* a, jint b, jbool c);
void (*SetFieldByte)(JRIEnv* env, jint op, void* a, jint b, jbyte c);
void (*SetFieldChar)(JRIEnv* env, jint op, void* a, jint b, jchar c);
void (*SetFieldShort)(JRIEnv* env, jint op, void* a, jint b, jshort c);
void (*SetFieldInt)(JRIEnv* env, jint op, void* a, jint b, jint c);
void (*SetFieldLong)(JRIEnv* env, jint op, void* a, jint b, jlong c);
void (*SetFieldFloat)(JRIEnv* env, jint op, void* a, jint b, jfloat c);
void (*SetFieldDouble)(JRIEnv* env, jint op, void* a, jint b, jdouble c);
jbool (*IsSubclassOf)(JRIEnv* env, jint op, struct java_lang_Class* a, struct java_lang_Class* b);
jint (*GetStaticMethodID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
void* (*CallStaticMethod)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
void* (*CallStaticMethodV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
void* (*CallStaticMethodA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jbool (*CallStaticMethodBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jbool (*CallStaticMethodBooleanV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jbool (*CallStaticMethodBooleanA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jbyte (*CallStaticMethodByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jbyte (*CallStaticMethodByteV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jbyte (*CallStaticMethodByteA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jchar (*CallStaticMethodChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jchar (*CallStaticMethodCharV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jchar (*CallStaticMethodCharA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jshort (*CallStaticMethodShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jshort (*CallStaticMethodShortV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jshort (*CallStaticMethodShortA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jint (*CallStaticMethodInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jint (*CallStaticMethodIntV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jint (*CallStaticMethodIntA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jlong (*CallStaticMethodLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jlong (*CallStaticMethodLongV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jlong (*CallStaticMethodLongA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jfloat (*CallStaticMethodFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jfloat (*CallStaticMethodFloatV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jfloat (*CallStaticMethodFloatA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jdouble (*CallStaticMethodDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, ...);
jdouble (*CallStaticMethodDoubleV)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, va_list c);
jdouble (*CallStaticMethodDoubleA)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, JRIValue* c);
jint (*GetStaticFieldID)(JRIEnv* env, jint op, struct java_lang_Class* a, const char* b, const char* c);
void* (*GetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jbool (*GetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jbyte (*GetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jchar (*GetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jshort (*GetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jint (*GetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jlong (*GetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jfloat (*GetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
jdouble (*GetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b);
void (*SetStaticField)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, void* c);
void (*SetStaticFieldBoolean)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbool c);
void (*SetStaticFieldByte)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jbyte c);
void (*SetStaticFieldChar)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jchar c);
void (*SetStaticFieldShort)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jshort c);
void (*SetStaticFieldInt)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jint c);
void (*SetStaticFieldLong)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jlong c);
void (*SetStaticFieldFloat)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jfloat c);
void (*SetStaticFieldDouble)(JRIEnv* env, jint op, struct java_lang_Class* a, jint b, jdouble c);
struct java_lang_String* (*NewString)(JRIEnv* env, jint op, const jchar* a, jint b);
jint (*GetStringLength)(JRIEnv* env, jint op, struct java_lang_String* a);
const jchar* (*GetStringChars)(JRIEnv* env, jint op, struct java_lang_String* a);
struct java_lang_String* (*NewStringUTF)(JRIEnv* env, jint op, const jbyte* a, jint b);
jint (*GetStringUTFLength)(JRIEnv* env, jint op, struct java_lang_String* a);
const jbyte* (*GetStringUTFChars)(JRIEnv* env, jint op, struct java_lang_String* a);
void* (*NewScalarArray)(JRIEnv* env, jint op, jint a, const char* b, const jbyte* c);
jint (*GetScalarArrayLength)(JRIEnv* env, jint op, void* a);
jbyte* (*GetScalarArrayElements)(JRIEnv* env, jint op, void* a);
void* (*NewObjectArray)(JRIEnv* env, jint op, jint a, struct java_lang_Class* b, void* c);
jint (*GetObjectArrayLength)(JRIEnv* env, jint op, void* a);
void* (*GetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b);
void (*SetObjectArrayElement)(JRIEnv* env, jint op, void* a, jint b, void* c);
void (*RegisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a, char** b, void** c);
void (*UnregisterNatives)(JRIEnv* env, jint op, struct java_lang_Class* a);
struct java_lang_Class* (*DefineClass)(JRIEnv* env, jint op, struct java_lang_ClassLoader* a, jbyte* b, jsize bLen);
struct java_lang_String* (*NewStringPlatform)(JRIEnv* env, jint op, const jbyte* a, jint b, const jbyte* c, jint d);
const jbyte* (*GetStringPlatformChars)(JRIEnv* env, jint op, struct java_lang_String* a, const jbyte* b, jint c);
};
/*
** ****************************************************************************
** JRIEnv Operation IDs
** ***************************************************************************
*/
typedef enum JRIEnvOperations {
JRI_Reserved0_op,
JRI_Reserved1_op,
JRI_Reserved2_op,
JRI_Reserved3_op,
JRI_FindClass_op,
JRI_Throw_op,
JRI_ThrowNew_op,
JRI_ExceptionOccurred_op,
JRI_ExceptionDescribe_op,
JRI_ExceptionClear_op,
JRI_NewGlobalRef_op,
JRI_DisposeGlobalRef_op,
JRI_GetGlobalRef_op,
JRI_SetGlobalRef_op,
JRI_IsSameObject_op,
JRI_NewObject_op,
JRI_NewObject_op_va_list,
JRI_NewObject_op_array,
JRI_GetObjectClass_op,
JRI_IsInstanceOf_op,
JRI_GetMethodID_op,
JRI_CallMethod_op,
JRI_CallMethod_op_va_list,
JRI_CallMethod_op_array,
JRI_CallMethodBoolean_op,
JRI_CallMethodBoolean_op_va_list,
JRI_CallMethodBoolean_op_array,
JRI_CallMethodByte_op,
JRI_CallMethodByte_op_va_list,
JRI_CallMethodByte_op_array,
JRI_CallMethodChar_op,
JRI_CallMethodChar_op_va_list,
JRI_CallMethodChar_op_array,
JRI_CallMethodShort_op,
JRI_CallMethodShort_op_va_list,
JRI_CallMethodShort_op_array,
JRI_CallMethodInt_op,
JRI_CallMethodInt_op_va_list,
JRI_CallMethodInt_op_array,
JRI_CallMethodLong_op,
JRI_CallMethodLong_op_va_list,
JRI_CallMethodLong_op_array,
JRI_CallMethodFloat_op,
JRI_CallMethodFloat_op_va_list,
JRI_CallMethodFloat_op_array,
JRI_CallMethodDouble_op,
JRI_CallMethodDouble_op_va_list,
JRI_CallMethodDouble_op_array,
JRI_GetFieldID_op,
JRI_GetField_op,
JRI_GetFieldBoolean_op,
JRI_GetFieldByte_op,
JRI_GetFieldChar_op,
JRI_GetFieldShort_op,
JRI_GetFieldInt_op,
JRI_GetFieldLong_op,
JRI_GetFieldFloat_op,
JRI_GetFieldDouble_op,
JRI_SetField_op,
JRI_SetFieldBoolean_op,
JRI_SetFieldByte_op,
JRI_SetFieldChar_op,
JRI_SetFieldShort_op,
JRI_SetFieldInt_op,
JRI_SetFieldLong_op,
JRI_SetFieldFloat_op,
JRI_SetFieldDouble_op,
JRI_IsSubclassOf_op,
JRI_GetStaticMethodID_op,
JRI_CallStaticMethod_op,
JRI_CallStaticMethod_op_va_list,
JRI_CallStaticMethod_op_array,
JRI_CallStaticMethodBoolean_op,
JRI_CallStaticMethodBoolean_op_va_list,
JRI_CallStaticMethodBoolean_op_array,
JRI_CallStaticMethodByte_op,
JRI_CallStaticMethodByte_op_va_list,
JRI_CallStaticMethodByte_op_array,
JRI_CallStaticMethodChar_op,
JRI_CallStaticMethodChar_op_va_list,
JRI_CallStaticMethodChar_op_array,
JRI_CallStaticMethodShort_op,
JRI_CallStaticMethodShort_op_va_list,
JRI_CallStaticMethodShort_op_array,
JRI_CallStaticMethodInt_op,
JRI_CallStaticMethodInt_op_va_list,
JRI_CallStaticMethodInt_op_array,
JRI_CallStaticMethodLong_op,
JRI_CallStaticMethodLong_op_va_list,
JRI_CallStaticMethodLong_op_array,
JRI_CallStaticMethodFloat_op,
JRI_CallStaticMethodFloat_op_va_list,
JRI_CallStaticMethodFloat_op_array,
JRI_CallStaticMethodDouble_op,
JRI_CallStaticMethodDouble_op_va_list,
JRI_CallStaticMethodDouble_op_array,
JRI_GetStaticFieldID_op,
JRI_GetStaticField_op,
JRI_GetStaticFieldBoolean_op,
JRI_GetStaticFieldByte_op,
JRI_GetStaticFieldChar_op,
JRI_GetStaticFieldShort_op,
JRI_GetStaticFieldInt_op,
JRI_GetStaticFieldLong_op,
JRI_GetStaticFieldFloat_op,
JRI_GetStaticFieldDouble_op,
JRI_SetStaticField_op,
JRI_SetStaticFieldBoolean_op,
JRI_SetStaticFieldByte_op,
JRI_SetStaticFieldChar_op,
JRI_SetStaticFieldShort_op,
JRI_SetStaticFieldInt_op,
JRI_SetStaticFieldLong_op,
JRI_SetStaticFieldFloat_op,
JRI_SetStaticFieldDouble_op,
JRI_NewString_op,
JRI_GetStringLength_op,
JRI_GetStringChars_op,
JRI_NewStringUTF_op,
JRI_GetStringUTFLength_op,
JRI_GetStringUTFChars_op,
JRI_NewScalarArray_op,
JRI_GetScalarArrayLength_op,
JRI_GetScalarArrayElements_op,
JRI_NewObjectArray_op,
JRI_GetObjectArrayLength_op,
JRI_GetObjectArrayElement_op,
JRI_SetObjectArrayElement_op,
JRI_RegisterNatives_op,
JRI_UnregisterNatives_op,
JRI_DefineClass_op,
JRI_NewStringPlatform_op,
JRI_GetStringPlatformChars_op
} JRIEnvOperations;
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* JRI_H */
/******************************************************************************/

565
npapi/jri_md.h Normal file
View File

@ -0,0 +1,565 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*******************************************************************************
* Java Runtime Interface - Machine Dependent Types
******************************************************************************/
#ifndef JRI_MD_H
#define JRI_MD_H
#include <assert.h>
#include "prtypes.h" /* Needed for HAS_LONG_LONG ifdefs */
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
* WHAT'S UP WITH THIS FILE?
*
* This is where we define the mystical JRI_PUBLIC_API macro that works on all
* platforms. If you're running with Visual C++, Symantec C, or Borland's
* development environment on the PC, you're all set. Or if you're on the Mac
* with Metrowerks, Symantec or MPW with SC you're ok too. For UNIX it shouldn't
* matter.
*
* On UNIX though you probably care about a couple of other symbols though:
* IS_LITTLE_ENDIAN must be defined for little-endian systems
* HAVE_LONG_LONG must be defined on systems that have 'long long' integers
* HAVE_ALIGNED_LONGLONGS must be defined if long-longs must be 8 byte aligned
* HAVE_ALIGNED_DOUBLES must be defined if doubles must be 8 byte aligned
* IS_64 must be defined on 64-bit machines (like Dec Alpha)
******************************************************************************/
/* DLL Entry modifiers... */
/* PC */
#if defined(XP_OS2)
# ifdef XP_OS2_VACPP
# define JRI_PUBLIC_API(ResultType) ResultType _Optlink
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_CALLBACK
# else
# define JRI_PUBLIC_API(ResultType) ResultType
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_CALLBACK
# endif
#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
# include <windows.h>
# if defined(_MSC_VER) || defined(__GNUC__)
# if defined(WIN32) || defined(_WIN32)
# define JRI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_PUBLIC_VAR_EXP(VarType) __declspec(dllexport) VarType
# define JRI_PUBLIC_VAR_IMP(VarType) __declspec(dllimport) VarType
# define JRI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType
# define JRI_CALLBACK
# else /* !_WIN32 */
# if defined(_WINDLL)
# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export __loadds
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType)
# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType)
# define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __loadds
# define JRI_CALLBACK __loadds
# else /* !WINDLL */
# define JRI_PUBLIC_API(ResultType) ResultType __cdecl __export
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType)
# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType)
# define JRI_NATIVE_STUB(ResultType) ResultType __cdecl __export
# define JRI_CALLBACK __export
# endif /* !WINDLL */
# endif /* !_WIN32 */
# elif defined(__BORLANDC__)
# if defined(WIN32) || defined(_WIN32)
# define JRI_PUBLIC_API(ResultType) __export ResultType
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_PUBLIC_VAR_EXP(VarType) __export VarType
# define JRI_PUBLIC_VAR_IMP(VarType) __import VarType
# define JRI_NATIVE_STUB(ResultType) __export ResultType
# define JRI_CALLBACK
# else /* !_WIN32 */
# define JRI_PUBLIC_API(ResultType) ResultType _cdecl _export _loadds
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_PUBLIC_VAR_EXP(VarType) __cdecl __export VarType
# define JRI_PUBLIC_VAR_IMP(VarType) __cdecl __import VarType
# define JRI_NATIVE_STUB(ResultType) ResultType _cdecl _loadds
# define JRI_CALLBACK _loadds
# endif
# else
# error Unsupported PC development environment.
# endif
# ifndef IS_LITTLE_ENDIAN
# define IS_LITTLE_ENDIAN
# endif
/* Mac */
#elif defined (macintosh) || Macintosh || THINK_C
# if defined(__MWERKS__) /* Metrowerks */
# if !__option(enumsalwaysint)
# error You need to define 'Enums Always Int' for your project.
# endif
# if defined(TARGET_CPU_68K) && !TARGET_RT_MAC_CFM
# if !__option(fourbyteints)
# error You need to define 'Struct Alignment: 68k' for your project.
# endif
# endif /* !GENERATINGCFM */
# define JRI_PUBLIC_API(ResultType) __declspec(export) ResultType
# define JRI_PUBLIC_VAR(VarType) JRI_PUBLIC_API(VarType)
# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_API(VarType)
# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_API(VarType)
# define JRI_NATIVE_STUB(ResultType) JRI_PUBLIC_API(ResultType)
# elif defined(__SC__) /* Symantec */
# error What are the Symantec defines? (warren@netscape.com)
# elif macintosh && applec /* MPW */
# error Please upgrade to the latest MPW compiler (SC).
# else
# error Unsupported Mac development environment.
# endif
# define JRI_CALLBACK
/* Unix or else */
#else
# define JRI_PUBLIC_API(ResultType) ResultType
# define JRI_PUBLIC_VAR(VarType) VarType
# define JRI_PUBLIC_VAR_EXP(VarType) JRI_PUBLIC_VAR(VarType)
# define JRI_PUBLIC_VAR_IMP(VarType) JRI_PUBLIC_VAR(VarType)
# define JRI_NATIVE_STUB(ResultType) ResultType
# define JRI_CALLBACK
#endif
#ifndef FAR /* for non-Win16 */
#define FAR
#endif
/******************************************************************************/
/* Java Scalar Types */
#if 0 /* now in jni.h */
typedef short jchar;
typedef short jshort;
typedef float jfloat;
typedef double jdouble;
typedef juint jsize;
#endif
/* moved from jni.h -- Sun's new jni.h doesn't have this anymore */
#ifdef __cplusplus
typedef class _jobject *jref;
#else
typedef struct _jobject *jref;
#endif
typedef unsigned char jbool;
typedef signed char jbyte;
#ifdef IS_64 /* XXX ok for alpha, but not right on all 64-bit architectures */
typedef unsigned int juint;
typedef int jint;
#else
typedef unsigned long juint;
typedef long jint;
#endif
/*******************************************************************************
* jlong : long long (64-bit signed integer type) support.
******************************************************************************/
/*
** Bit masking macros. (n must be <= 31 to be portable)
*/
#define JRI_BIT(n) ((juint)1 << (n))
#define JRI_BITMASK(n) (JRI_BIT(n) - 1)
#ifdef HAVE_LONG_LONG
#ifdef OSF1
/* long is default 64-bit on OSF1, -std1 does not allow long long */
typedef long jlong;
typedef unsigned long julong;
#define jlong_MAXINT 0x7fffffffffffffffL
#define jlong_MININT 0x8000000000000000L
#define jlong_ZERO 0x0L
#elif (defined(WIN32) || defined(_WIN32))
typedef LONGLONG jlong;
typedef DWORDLONG julong;
#define jlong_MAXINT 0x7fffffffffffffffi64
#define jlong_MININT 0x8000000000000000i64
#define jlong_ZERO 0x0i64
#else
typedef long long jlong;
typedef unsigned long long julong;
#define jlong_MAXINT 0x7fffffffffffffffLL
#define jlong_MININT 0x8000000000000000LL
#define jlong_ZERO 0x0LL
#endif
#define jlong_IS_ZERO(a) ((a) == 0)
#define jlong_EQ(a, b) ((a) == (b))
#define jlong_NE(a, b) ((a) != (b))
#define jlong_GE_ZERO(a) ((a) >= 0)
#define jlong_CMP(a, op, b) ((a) op (b))
#define jlong_AND(r, a, b) ((r) = (a) & (b))
#define jlong_OR(r, a, b) ((r) = (a) | (b))
#define jlong_XOR(r, a, b) ((r) = (a) ^ (b))
#define jlong_OR2(r, a) ((r) = (r) | (a))
#define jlong_NOT(r, a) ((r) = ~(a))
#define jlong_NEG(r, a) ((r) = -(a))
#define jlong_ADD(r, a, b) ((r) = (a) + (b))
#define jlong_SUB(r, a, b) ((r) = (a) - (b))
#define jlong_MUL(r, a, b) ((r) = (a) * (b))
#define jlong_DIV(r, a, b) ((r) = (a) / (b))
#define jlong_MOD(r, a, b) ((r) = (a) % (b))
#define jlong_SHL(r, a, b) ((r) = (a) << (b))
#define jlong_SHR(r, a, b) ((r) = (a) >> (b))
#define jlong_USHR(r, a, b) ((r) = (julong)(a) >> (b))
#define jlong_ISHL(r, a, b) ((r) = ((jlong)(a)) << (b))
#define jlong_L2I(i, l) ((i) = (int)(l))
#define jlong_L2UI(ui, l) ((ui) =(unsigned int)(l))
#define jlong_L2F(f, l) ((f) = (l))
#define jlong_L2D(d, l) ((d) = (l))
#define jlong_I2L(l, i) ((l) = (i))
#define jlong_UI2L(l, ui) ((l) = (ui))
#define jlong_F2L(l, f) ((l) = (f))
#define jlong_D2L(l, d) ((l) = (d))
#define jlong_UDIVMOD(qp, rp, a, b) \
(*(qp) = ((julong)(a) / (b)), \
*(rp) = ((julong)(a) % (b)))
#else /* !HAVE_LONG_LONG */
typedef struct {
#ifdef IS_LITTLE_ENDIAN
juint lo, hi;
#else
juint hi, lo;
#endif
} jlong;
typedef jlong julong;
extern jlong jlong_MAXINT, jlong_MININT, jlong_ZERO;
#define jlong_IS_ZERO(a) (((a).hi == 0) && ((a).lo == 0))
#define jlong_EQ(a, b) (((a).hi == (b).hi) && ((a).lo == (b).lo))
#define jlong_NE(a, b) (((a).hi != (b).hi) || ((a).lo != (b).lo))
#define jlong_GE_ZERO(a) (((a).hi >> 31) == 0)
/*
* NB: jlong_CMP and jlong_UCMP work only for strict relationals (<, >).
*/
#define jlong_CMP(a, op, b) (((int32)(a).hi op (int32)(b).hi) || \
(((a).hi == (b).hi) && ((a).lo op (b).lo)))
#define jlong_UCMP(a, op, b) (((a).hi op (b).hi) || \
(((a).hi == (b).hi) && ((a).lo op (b).lo)))
#define jlong_AND(r, a, b) ((r).lo = (a).lo & (b).lo, \
(r).hi = (a).hi & (b).hi)
#define jlong_OR(r, a, b) ((r).lo = (a).lo | (b).lo, \
(r).hi = (a).hi | (b).hi)
#define jlong_XOR(r, a, b) ((r).lo = (a).lo ^ (b).lo, \
(r).hi = (a).hi ^ (b).hi)
#define jlong_OR2(r, a) ((r).lo = (r).lo | (a).lo, \
(r).hi = (r).hi | (a).hi)
#define jlong_NOT(r, a) ((r).lo = ~(a).lo, \
(r).hi = ~(a).hi)
#define jlong_NEG(r, a) ((r).lo = -(int32)(a).lo, \
(r).hi = -(int32)(a).hi - ((r).lo != 0))
#define jlong_ADD(r, a, b) { \
jlong _a, _b; \
_a = a; _b = b; \
(r).lo = _a.lo + _b.lo; \
(r).hi = _a.hi + _b.hi + ((r).lo < _b.lo); \
}
#define jlong_SUB(r, a, b) { \
jlong _a, _b; \
_a = a; _b = b; \
(r).lo = _a.lo - _b.lo; \
(r).hi = _a.hi - _b.hi - (_a.lo < _b.lo); \
} \
/*
* Multiply 64-bit operands a and b to get 64-bit result r.
* First multiply the low 32 bits of a and b to get a 64-bit result in r.
* Then add the outer and inner products to r.hi.
*/
#define jlong_MUL(r, a, b) { \
jlong _a, _b; \
_a = a; _b = b; \
jlong_MUL32(r, _a.lo, _b.lo); \
(r).hi += _a.hi * _b.lo + _a.lo * _b.hi; \
}
/* XXX _jlong_lo16(a) = ((a) << 16 >> 16) is better on some archs (not on mips) */
#define _jlong_lo16(a) ((a) & JRI_BITMASK(16))
#define _jlong_hi16(a) ((a) >> 16)
/*
* Multiply 32-bit operands a and b to get 64-bit result r.
* Use polynomial expansion based on primitive field element (1 << 16).
*/
#define jlong_MUL32(r, a, b) { \
juint _a1, _a0, _b1, _b0, _y0, _y1, _y2, _y3; \
_a1 = _jlong_hi16(a), _a0 = _jlong_lo16(a); \
_b1 = _jlong_hi16(b), _b0 = _jlong_lo16(b); \
_y0 = _a0 * _b0; \
_y1 = _a0 * _b1; \
_y2 = _a1 * _b0; \
_y3 = _a1 * _b1; \
_y1 += _jlong_hi16(_y0); /* can't carry */ \
_y1 += _y2; /* might carry */ \
if (_y1 < _y2) _y3 += 1 << 16; /* propagate */ \
(r).lo = (_jlong_lo16(_y1) << 16) + _jlong_lo16(_y0); \
(r).hi = _y3 + _jlong_hi16(_y1); \
}
/*
* Divide 64-bit unsigned operand a by 64-bit unsigned operand b, setting *qp
* to the 64-bit unsigned quotient, and *rp to the 64-bit unsigned remainder.
* Minimize effort if one of qp and rp is null.
*/
#define jlong_UDIVMOD(qp, rp, a, b) jlong_udivmod(qp, rp, a, b)
extern JRI_PUBLIC_API(void)
jlong_udivmod(julong *qp, julong *rp, julong a, julong b);
#define jlong_DIV(r, a, b) { \
jlong _a, _b; \
juint _negative = (int32)(a).hi < 0; \
if (_negative) { \
jlong_NEG(_a, a); \
} else { \
_a = a; \
} \
if ((int32)(b).hi < 0) { \
_negative ^= 1; \
jlong_NEG(_b, b); \
} else { \
_b = b; \
} \
jlong_UDIVMOD(&(r), 0, _a, _b); \
if (_negative) \
jlong_NEG(r, r); \
}
#define jlong_MOD(r, a, b) { \
jlong _a, _b; \
juint _negative = (int32)(a).hi < 0; \
if (_negative) { \
jlong_NEG(_a, a); \
} else { \
_a = a; \
} \
if ((int32)(b).hi < 0) { \
jlong_NEG(_b, b); \
} else { \
_b = b; \
} \
jlong_UDIVMOD(0, &(r), _a, _b); \
if (_negative) \
jlong_NEG(r, r); \
}
/*
* NB: b is a juint, not jlong or julong, for the shift ops.
*/
#define jlong_SHL(r, a, b) { \
if (b) { \
jlong _a; \
_a = a; \
if ((b) < 32) { \
(r).lo = _a.lo << (b); \
(r).hi = (_a.hi << (b)) | (_a.lo >> (32 - (b))); \
} else { \
(r).lo = 0; \
(r).hi = _a.lo << ((b) & 31); \
} \
} else { \
(r) = (a); \
} \
}
/* a is an int32, b is int32, r is jlong */
#define jlong_ISHL(r, a, b) { \
if (b) { \
jlong _a; \
_a.lo = (a); \
_a.hi = 0; \
if ((b) < 32) { \
(r).lo = (a) << (b); \
(r).hi = ((a) >> (32 - (b))); \
} else { \
(r).lo = 0; \
(r).hi = (a) << ((b) & 31); \
} \
} else { \
(r).lo = (a); \
(r).hi = 0; \
} \
}
#define jlong_SHR(r, a, b) { \
if (b) { \
jlong _a; \
_a = a; \
if ((b) < 32) { \
(r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b)); \
(r).hi = (int32)_a.hi >> (b); \
} else { \
(r).lo = (int32)_a.hi >> ((b) & 31); \
(r).hi = (int32)_a.hi >> 31; \
} \
} else { \
(r) = (a); \
} \
}
#define jlong_USHR(r, a, b) { \
if (b) { \
jlong _a; \
_a = a; \
if ((b) < 32) { \
(r).lo = (_a.hi << (32 - (b))) | (_a.lo >> (b)); \
(r).hi = _a.hi >> (b); \
} else { \
(r).lo = _a.hi >> ((b) & 31); \
(r).hi = 0; \
} \
} else { \
(r) = (a); \
} \
}
#define jlong_L2I(i, l) ((i) = (l).lo)
#define jlong_L2UI(ui, l) ((ui) = (l).lo)
#define jlong_L2F(f, l) { double _d; jlong_L2D(_d, l); (f) = (float) _d; }
#define jlong_L2D(d, l) { \
int32 _negative; \
jlong _absval; \
\
_negative = (l).hi >> 31; \
if (_negative) { \
jlong_NEG(_absval, l); \
} else { \
_absval = l; \
} \
(d) = (double)_absval.hi * 4.294967296e9 + _absval.lo; \
if (_negative) \
(d) = -(d); \
}
#define jlong_I2L(l, i) ((l).hi = (i) >> 31, (l).lo = (i))
#define jlong_UI2L(l, ui) ((l).hi = 0, (l).lo = (ui))
#define jlong_F2L(l, f) { double _d = (double) f; jlong_D2L(l, _d); }
#define jlong_D2L(l, d) { \
int _negative; \
double _absval, _d_hi; \
jlong _lo_d; \
\
_negative = ((d) < 0); \
_absval = _negative ? -(d) : (d); \
\
(l).hi = (juint)(_absval / 4.294967296e9); \
(l).lo = 0; \
jlong_L2D(_d_hi, l); \
_absval -= _d_hi; \
_lo_d.hi = 0; \
if (_absval < 0) { \
_lo_d.lo = (juint) -_absval; \
jlong_SUB(l, l, _lo_d); \
} else { \
_lo_d.lo = (juint) _absval; \
jlong_ADD(l, l, _lo_d); \
} \
\
if (_negative) \
jlong_NEG(l, l); \
}
#endif /* !HAVE_LONG_LONG */
/******************************************************************************/
#ifdef HAVE_ALIGNED_LONGLONGS
#define JRI_GET_INT64(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \
((_t).x[1] = ((jint*)(_addr))[1]), \
(_t).l )
#define JRI_SET_INT64(_t, _addr, _v) ( (_t).l = (_v), \
((jint*)(_addr))[0] = (_t).x[0], \
((jint*)(_addr))[1] = (_t).x[1] )
#else
#define JRI_GET_INT64(_t,_addr) (*(jlong*)(_addr))
#define JRI_SET_INT64(_t, _addr, _v) (*(jlong*)(_addr) = (_v))
#endif
/* If double's must be aligned on doubleword boundaries then define this */
#ifdef HAVE_ALIGNED_DOUBLES
#define JRI_GET_DOUBLE(_t,_addr) ( ((_t).x[0] = ((jint*)(_addr))[0]), \
((_t).x[1] = ((jint*)(_addr))[1]), \
(_t).d )
#define JRI_SET_DOUBLE(_t, _addr, _v) ( (_t).d = (_v), \
((jint*)(_addr))[0] = (_t).x[0], \
((jint*)(_addr))[1] = (_t).x[1] )
#else
#define JRI_GET_DOUBLE(_t,_addr) (*(jdouble*)(_addr))
#define JRI_SET_DOUBLE(_t, _addr, _v) (*(jdouble*)(_addr) = (_v))
#endif
/******************************************************************************/
#ifdef __cplusplus
}
#endif
#endif /* JRI_MD_H */
/******************************************************************************/

243
npapi/jritypes.h Normal file
View File

@ -0,0 +1,243 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*******************************************************************************
* Java Runtime Interface
******************************************************************************/
#ifndef JRITYPES_H
#define JRITYPES_H
#include "jri_md.h"
#include "jni.h"
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
* Types
******************************************************************************/
struct JRIEnvInterface;
typedef void* JRIRef;
typedef void* JRIGlobalRef;
typedef jint JRIFieldID;
typedef jint JRIMethodID;
/* synonyms: */
typedef JRIGlobalRef jglobal;
typedef union JRIValue {
jbool z;
jbyte b;
jchar c;
jshort s;
jint i;
jlong l;
jfloat f;
jdouble d;
jref r;
} JRIValue;
typedef enum JRIBoolean {
JRIFalse = 0,
JRITrue = 1
} JRIBoolean;
typedef enum JRIConstant {
JRIUninitialized = -1
} JRIConstant;
/* convenience types (these must be distinct struct types for c++ overloading): */
#if 0 /* now in jni.h */
typedef struct jbooleanArrayStruct* jbooleanArray;
typedef struct jbyteArrayStruct* jbyteArray;
typedef struct jcharArrayStruct* jcharArray;
typedef struct jshortArrayStruct* jshortArray;
typedef struct jintArrayStruct* jintArray;
typedef struct jlongArrayStruct* jlongArray;
typedef struct jfloatArrayStruct* jfloatArray;
typedef struct jdoubleArrayStruct* jdoubleArray;
typedef struct jobjectArrayStruct* jobjectArray;
#endif
typedef struct jstringArrayStruct* jstringArray;
typedef struct jarrayArrayStruct* jarrayArray;
#define JRIConstructorMethodName "<init>"
/*******************************************************************************
* Signature Construction Macros
******************************************************************************/
/*
** These macros can be used to construct signature strings. Hopefully their names
** are a little easier to remember than the single character they correspond to.
** For example, to specify the signature of the method:
**
** public int read(byte b[], int off, int len);
**
** you could write something like this in C:
**
** char* readSig = JRISigMethod(JRISigArray(JRISigByte)
** JRISigInt
** JRISigInt) JRISigInt;
**
** Of course, don't put commas between the types.
*/
#define JRISigArray(T) "[" T
#define JRISigByte "B"
#define JRISigChar "C"
#define JRISigClass(name) "L" name ";"
#define JRISigFloat "F"
#define JRISigDouble "D"
#define JRISigMethod(args) "(" args ")"
#define JRISigNoArgs ""
#define JRISigInt "I"
#define JRISigLong "J"
#define JRISigShort "S"
#define JRISigVoid "V"
#define JRISigBoolean "Z"
/*******************************************************************************
* Environments
******************************************************************************/
extern JRI_PUBLIC_API(const struct JRIEnvInterface**)
JRI_GetCurrentEnv(void);
/*******************************************************************************
* Specific Scalar Array Types
******************************************************************************/
/*
** The JRI Native Method Interface does not support boolean arrays. This
** is to allow Java runtime implementations to optimize boolean array
** storage. Using the ScalarArray operations on boolean arrays is bound
** to fail, so convert any boolean arrays to byte arrays in Java before
** passing them to a native method.
*/
#define JRI_NewByteArray(env, length, initialValues) \
JRI_NewScalarArray(env, length, JRISigByte, (jbyte*)(initialValues))
#define JRI_GetByteArrayLength(env, array) \
JRI_GetScalarArrayLength(env, array)
#define JRI_GetByteArrayElements(env, array) \
JRI_GetScalarArrayElements(env, array)
#define JRI_NewCharArray(env, length, initialValues) \
JRI_NewScalarArray(env, ((length) * sizeof(jchar)), JRISigChar, (jbyte*)(initialValues))
#define JRI_GetCharArrayLength(env, array) \
JRI_GetScalarArrayLength(env, array)
#define JRI_GetCharArrayElements(env, array) \
((jchar*)JRI_GetScalarArrayElements(env, array))
#define JRI_NewShortArray(env, length, initialValues) \
JRI_NewScalarArray(env, ((length) * sizeof(jshort)), JRISigShort, (jbyte*)(initialValues))
#define JRI_GetShortArrayLength(env, array) \
JRI_GetScalarArrayLength(env, array)
#define JRI_GetShortArrayElements(env, array) \
((jshort*)JRI_GetScalarArrayElements(env, array))
#define JRI_NewIntArray(env, length, initialValues) \
JRI_NewScalarArray(env, ((length) * sizeof(jint)), JRISigInt, (jbyte*)(initialValues))
#define JRI_GetIntArrayLength(env, array) \
JRI_GetScalarArrayLength(env, array)
#define JRI_GetIntArrayElements(env, array) \
((jint*)JRI_GetScalarArrayElements(env, array))
#define JRI_NewLongArray(env, length, initialValues) \
JRI_NewScalarArray(env, ((length) * sizeof(jlong)), JRISigLong, (jbyte*)(initialValues))
#define JRI_GetLongArrayLength(env, array) \
JRI_GetScalarArrayLength(env, array)
#define JRI_GetLongArrayElements(env, array) \
((jlong*)JRI_GetScalarArrayElements(env, array))
#define JRI_NewFloatArray(env, length, initialValues) \
JRI_NewScalarArray(env, ((length) * sizeof(jfloat)), JRISigFloat, (jbyte*)(initialValues))
#define JRI_GetFloatArrayLength(env, array) \
JRI_GetScalarArrayLength(env, array)
#define JRI_GetFloatArrayElements(env, array) \
((jfloat*)JRI_GetScalarArrayElements(env, array))
#define JRI_NewDoubleArray(env, length, initialValues) \
JRI_NewScalarArray(env, ((length) * sizeof(jdouble)), JRISigDouble, (jbyte*)(initialValues))
#define JRI_GetDoubleArrayLength(env, array) \
JRI_GetScalarArrayLength(env, array)
#define JRI_GetDoubleArrayElements(env, array) \
((jdouble*)JRI_GetScalarArrayElements(env, array))
/******************************************************************************/
/*
** JDK Stuff -- This stuff is still needed while we're using the JDK
** dynamic linking strategy to call native methods.
*/
typedef union JRI_JDK_stack_item {
/* Non pointer items */
jint i;
jfloat f;
jint o;
/* Pointer items */
void *h;
void *p;
unsigned char *addr;
#ifdef IS_64
double d;
long l; /* == 64bits! */
#endif
} JRI_JDK_stack_item;
typedef union JRI_JDK_Java8Str {
jint x[2];
jdouble d;
jlong l;
void *p;
float f;
} JRI_JDK_Java8;
/******************************************************************************/
#ifdef __cplusplus
}
#endif
#endif /* JRITYPES_H */
/******************************************************************************/

717
npapi/npapi.h Normal file
View File

@ -0,0 +1,717 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* npapi.h $Revision: 3.33.6.1 $
* Netscape client plug-in API spec
*/
#ifndef _NPAPI_H_
#define _NPAPI_H_
#ifdef __OS2__
#pragma pack(1)
#endif
#include "prtypes.h"
/* Copied from xp_core.h */
/* removed #ifdef for hpux defined in /usr/include/model.h */
#ifndef XP_MAC
#ifndef _INT16
#define _INT16
#endif
#ifndef _INT32
#define _INT32
#endif
#ifndef _UINT16
#define _UINT16
#endif
#ifndef _UINT32
#define _UINT32
#endif
#endif
/*
* NO_NSPR_10_SUPPORT disables the inclusion
* of obsolete/protypes.h, whose int16, uint16,
* int32, and uint32 typedefs conflict with those
* in this file.
*/
#ifndef NO_NSPR_10_SUPPORT
#define NO_NSPR_10_SUPPORT
#endif
#ifdef OJI
#include "jri.h" /* Java Runtime Interface */
#endif
#if defined (__OS2__ ) || defined (OS2)
# ifndef XP_OS2
# define XP_OS2 1
# endif /* XP_OS2 */
#endif /* __OS2__ */
#ifdef _WINDOWS
# include <windef.h>
# ifndef XP_WIN
# define XP_WIN 1
# endif /* XP_WIN */
#endif /* _WINDOWS */
#ifdef __MWERKS__
# define _declspec __declspec
# ifdef macintosh
# ifndef XP_MAC
# define XP_MAC 1
# endif /* XP_MAC */
# endif /* macintosh */
# ifdef __INTEL__
# undef NULL
# ifndef XP_WIN
# define XP_WIN 1
# endif /* XP_WIN */
# endif /* __INTEL__ */
#endif /* __MWERKS__ */
#if defined(XP_MAC) || defined(XP_MACOSX)
#include <Quickdraw.h>
#include <Events.h>
#endif
#if defined(XP_UNIX)
# include <stdio.h>
# if defined(MOZ_X11)
# include <X11/Xlib.h>
# include <X11/Xutil.h>
# endif
#endif
/*----------------------------------------------------------------------*/
/* Plugin Version Constants */
/*----------------------------------------------------------------------*/
#define NP_VERSION_MAJOR 0
#define NP_VERSION_MINOR 14
/* The OS/2 version of Netscape uses RC_DATA to define the
mime types, file extensions, etc that are required.
Use a vertical bar to separate types, end types with \0.
FileVersion and ProductVersion are 32bit ints, all other
entries are strings the MUST be terminated wwith a \0.
AN EXAMPLE:
RCDATA NP_INFO_ProductVersion { 1,0,0,1,}
RCDATA NP_INFO_MIMEType { "video/x-video|",
"video/x-flick\0" }
RCDATA NP_INFO_FileExtents { "avi|",
"flc\0" }
RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|",
"MMOS2 Flc/Fli player(*.flc)\0" }
RCDATA NP_INFO_FileVersion { 1,0,0,1 }
RCDATA NP_INFO_CompanyName { "Netscape Communications\0" }
RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0"
RCDATA NP_INFO_InternalName { "NPAVI32\0" )
RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0"
RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" }
RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" }
*/
/* RC_DATA types for version info - required */
#define NP_INFO_ProductVersion 1
#define NP_INFO_MIMEType 2
#define NP_INFO_FileOpenName 3
#define NP_INFO_FileExtents 4
/* RC_DATA types for version info - used if found */
#define NP_INFO_FileDescription 5
#define NP_INFO_ProductName 6
/* RC_DATA types for version info - optional */
#define NP_INFO_CompanyName 7
#define NP_INFO_FileVersion 8
#define NP_INFO_InternalName 9
#define NP_INFO_LegalCopyright 10
#define NP_INFO_OriginalFilename 11
#ifndef RC_INVOKED
/*----------------------------------------------------------------------*/
/* Definition of Basic Types */
/*----------------------------------------------------------------------*/
#ifndef _UINT16
typedef unsigned short uint16;
#endif
#ifndef _UINT32
# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__)
typedef unsigned int uint32;
# else /* __alpha */
typedef unsigned long uint32;
# endif /* __alpha */
#endif
/*
* AIX defines these in sys/inttypes.h included from sys/types.h
*/
#ifndef AIX
#ifndef _INT16
typedef short int16;
#endif
#ifndef _INT32
# if defined(__alpha) || defined(__amd64__) || defined(__x86_64__)
typedef int int32;
# else /* __alpha */
typedef long int32;
# endif /* __alpha */
#endif
#endif
#ifndef FALSE
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE (1)
#endif
#ifndef NULL
#define NULL (0L)
#endif
typedef unsigned char NPBool;
typedef int16 NPError;
typedef int16 NPReason;
typedef char* NPMIMEType;
/*----------------------------------------------------------------------*/
/* Structures and definitions */
/*----------------------------------------------------------------------*/
#ifdef XP_MAC
#pragma options align=mac68k
#endif
/*
* NPP is a plug-in's opaque instance handle
*/
typedef struct _NPP
{
void* pdata; /* plug-in private data */
void* ndata; /* netscape private data */
} NPP_t;
typedef NPP_t* NPP;
typedef struct _NPStream
{
void* pdata; /* plug-in private data */
void* ndata; /* netscape private data */
const char* url;
uint32 end;
uint32 lastmodified;
void* notifyData;
} NPStream;
typedef struct _NPByteRange
{
int32 offset; /* negative offset means from the end */
uint32 length;
struct _NPByteRange* next;
} NPByteRange;
typedef struct _NPSavedData
{
int32 len;
void* buf;
} NPSavedData;
typedef struct _NPRect
{
uint16 top;
uint16 left;
uint16 bottom;
uint16 right;
} NPRect;
typedef struct _NPSize
{
int32 width;
int32 height;
} NPSize;
#ifdef XP_UNIX
/*
* Unix specific structures and definitions
*/
/*
* Callback Structures.
*
* These are used to pass additional platform specific information.
*/
enum {
NP_SETWINDOW = 1,
NP_PRINT
};
typedef struct
{
int32 type;
} NPAnyCallbackStruct;
typedef struct
{
int32 type;
#ifdef MOZ_X11
Display* display;
Visual* visual;
Colormap colormap;
unsigned int depth;
#endif
} NPSetWindowCallbackStruct;
typedef struct
{
int32 type;
FILE* fp;
} NPPrintCallbackStruct;
#endif /* XP_UNIX */
/*
* The following masks are applied on certain platforms to NPNV and
* NPPV selectors that pass around pointers to COM interfaces. Newer
* compilers on some platforms may generate vtables that are not
* compatible with older compilers. To prevent older plugins from
* not understanding a new browser's ABI, these masks change the
* values of those selectors on those platforms. To remain backwards
* compatible with differenet versions of the browser, plugins can
* use these masks to dynamically determine and use the correct C++
* ABI that the browser is expecting. This does not apply to Windows
* as Microsoft's COM ABI will likely not change.
*/
#define NP_ABI_GCC3_MASK 0x10000000
/*
* gcc 3.x generated vtables on UNIX and OSX are incompatible with
* previous compilers.
*/
#if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
#define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
#else
#define _NP_ABI_MIXIN_FOR_GCC3 0
#endif
#define NP_ABI_MACHO_MASK 0x01000000
/*
* On OSX, the Mach-O executable format is significantly
* different than CFM. In addition to having a different
* C++ ABI, it also has has different C calling convention.
* You must use glue code when calling between CFM and
* Mach-O C functions.
*/
#if (defined(TARGET_RT_MAC_MACHO))
#define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK
#else
#define _NP_ABI_MIXIN_FOR_MACHO 0
#endif
#define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO)
/*
* List of variable names for which NPP_GetValue shall be implemented
*/
typedef enum {
NPPVpluginNameString = 1,
NPPVpluginDescriptionString,
NPPVpluginWindowBool,
NPPVpluginTransparentBool,
NPPVjavaClass, /* Not implemented in Mozilla 1.0 */
NPPVpluginWindowSize,
NPPVpluginTimerInterval,
NPPVpluginScriptableInstance = (10 | NP_ABI_MASK),
NPPVpluginScriptableIID = 11,
/* 12 and over are available on Mozilla builds starting with 0.9.9 */
NPPVjavascriptPushCallerBool = 12,
NPPVpluginKeepLibraryInMemory = 13, /* available in Mozilla 1.0 */
NPPVpluginNeedsXEmbed = 14,
/* Get the NPObject for scripting the plugin. */
NPPVpluginScriptableNPObject = 15
} NPPVariable;
/*
* List of variable names for which NPN_GetValue is implemented by Mozilla
*/
typedef enum {
NPNVxDisplay = 1,
NPNVxtAppContext,
NPNVnetscapeWindow,
NPNVjavascriptEnabledBool,
NPNVasdEnabledBool,
NPNVisOfflineBool,
/* 10 and over are available on Mozilla builds starting with 0.9.4 */
NPNVserviceManager = (10 | NP_ABI_MASK),
NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */
NPNVDOMWindow = (12 | NP_ABI_MASK),
NPNVToolkit = (13 | NP_ABI_MASK),
NPNVSupportsXEmbedBool = 14,
/* Get the NPObject wrapper for the browser window. */
NPNVWindowNPObject = 15,
/* Get the NPObject wrapper for the plugins DOM element. */
NPNVPluginElementNPObject = 16
} NPNVariable;
/*
* The type of Tookkit the widgets use
*/
typedef enum {
NPNVGtk12 = 1,
NPNVGtk2
} NPNToolkitType;
/*
* The type of a NPWindow - it specifies the type of the data structure
* returned in the window field.
*/
typedef enum {
NPWindowTypeWindow = 1,
NPWindowTypeDrawable
} NPWindowType;
typedef struct _NPWindow
{
void* window; /* Platform specific window handle */
/* OS/2: x - Position of bottom left corner */
/* OS/2: y - relative to visible netscape window */
int32 x; /* Position of top left corner relative */
int32 y; /* to a netscape page. */
uint32 width; /* Maximum window size */
uint32 height;
NPRect clipRect; /* Clipping rectangle in port coordinates */
/* Used by MAC only. */
#if defined(XP_UNIX) && !defined(XP_MACOSX)
void * ws_info; /* Platform-dependent additonal data */
#endif /* XP_UNIX */
NPWindowType type; /* Is this a window or a drawable? */
} NPWindow;
typedef struct _NPFullPrint
{
NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */
NPBool printOne; /* TRUE if plugin should print one copy to default printer */
void* platformPrint; /* Platform-specific printing info */
} NPFullPrint;
typedef struct _NPEmbedPrint
{
NPWindow window;
void* platformPrint; /* Platform-specific printing info */
} NPEmbedPrint;
typedef struct _NPPrint
{
uint16 mode; /* NP_FULL or NP_EMBED */
union
{
NPFullPrint fullPrint; /* if mode is NP_FULL */
NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
} print;
} NPPrint;
#if defined(XP_MAC) || defined(XP_MACOSX)
typedef EventRecord NPEvent;
#elif defined(XP_WIN)
typedef struct _NPEvent
{
uint16 event;
uint32 wParam;
uint32 lParam;
} NPEvent;
#elif defined(XP_OS2)
typedef struct _NPEvent
{
uint32 event;
uint32 wParam;
uint32 lParam;
} NPEvent;
#elif defined (XP_UNIX) && defined(MOZ_X11)
typedef XEvent NPEvent;
#else
typedef void* NPEvent;
#endif /* XP_MAC */
#if defined(XP_MAC) || defined(XP_MACOSX)
typedef RgnHandle NPRegion;
#elif defined(XP_WIN)
typedef HRGN NPRegion;
#elif defined(XP_UNIX) && defined(MOZ_X11)
typedef Region NPRegion;
#else
typedef void *NPRegion;
#endif /* XP_MAC */
#if defined(XP_MAC) || defined(XP_MACOSX)
/*
* Mac-specific structures and definitions.
*/
typedef struct NP_Port
{
CGrafPtr port; /* Grafport */
int32 portx; /* position inside the topmost window */
int32 porty;
} NP_Port;
/*
* Non-standard event types that can be passed to HandleEvent
*/
enum NPEventType {
NPEventType_GetFocusEvent = (osEvt + 16),
NPEventType_LoseFocusEvent,
NPEventType_AdjustCursorEvent,
NPEventType_MenuCommandEvent,
NPEventType_ClippingChangedEvent,
NPEventType_ScrollingBeginsEvent = 1000,
NPEventType_ScrollingEndsEvent
};
#ifdef OBSOLETE
#define getFocusEvent (osEvt + 16)
#define loseFocusEvent (osEvt + 17)
#define adjustCursorEvent (osEvt + 18)
#endif
#endif /* XP_MAC */
/*
* Values for mode passed to NPP_New:
*/
#define NP_EMBED 1
#define NP_FULL 2
/*
* Values for stream type passed to NPP_NewStream:
*/
#define NP_NORMAL 1
#define NP_SEEK 2
#define NP_ASFILE 3
#define NP_ASFILEONLY 4
#define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
#ifdef XP_MAC
#pragma options align=reset
#endif
/*----------------------------------------------------------------------*/
/* Error and Reason Code definitions */
/*----------------------------------------------------------------------*/
/*
* Values of type NPError:
*/
#define NPERR_BASE 0
#define NPERR_NO_ERROR (NPERR_BASE + 0)
#define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
#define NPERR_INVALID_PARAM (NPERR_BASE + 9)
#define NPERR_INVALID_URL (NPERR_BASE + 10)
#define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11)
#define NPERR_NO_DATA (NPERR_BASE + 12)
#define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13)
/*
* Values of type NPReason:
*/
#define NPRES_BASE 0
#define NPRES_DONE (NPRES_BASE + 0)
#define NPRES_NETWORK_ERR (NPRES_BASE + 1)
#define NPRES_USER_BREAK (NPRES_BASE + 2)
/*
* Don't use these obsolete error codes any more.
*/
#define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR
#define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR
#define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK
/*
* Version feature information
*/
#define NPVERS_HAS_STREAMOUTPUT 8
#define NPVERS_HAS_NOTIFICATION 9
#define NPVERS_HAS_LIVECONNECT 9
#define NPVERS_WIN16_HAS_LIVECONNECT 9
#define NPVERS_68K_HAS_LIVECONNECT 11
#define NPVERS_HAS_WINDOWLESS 11
#define NPVERS_HAS_XPCONNECT_SCRIPTING 13
/*----------------------------------------------------------------------*/
/* Function Prototypes */
/*----------------------------------------------------------------------*/
#if defined(_WINDOWS) && !defined(WIN32)
#define NP_LOADDS _loadds
#else
#if defined(__OS2__)
#define NP_LOADDS _System
#else
#define NP_LOADDS
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* NPP_* functions are provided by the plugin and called by the navigator.
*/
#ifdef XP_UNIX
char* NPP_GetMIMEDescription(void);
#endif /* XP_UNIX */
NPError NP_LOADDS NPP_Initialize(void);
void NP_LOADDS NPP_Shutdown(void);
NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
uint16 mode, int16 argc, char* argn[],
char* argv[], NPSavedData* saved);
NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
NPStream* stream, NPBool seekable,
uint16* stype);
NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream,
NPReason reason);
int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset,
int32 len, void* buffer);
void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
const char* fname);
void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event);
void NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
NPReason reason, void* notifyData);
#ifdef OJI
jref NP_LOADDS NPP_GetJavaClass(void);
#endif
NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
/*
* Uh, shouldn't NPP_SetValue() take an NPPVariable and not an NPNVariable?
*/
NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
/*
* NPN_* functions are provided by the navigator and called by the plugin.
*/
void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
int* netscape_major, int* netscape_minor);
NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
const char* target, void* notifyData);
NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url,
const char* target);
NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url,
const char* target, uint32 len,
const char* buf, NPBool file,
void* notifyData);
NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url,
const char* target, uint32 len,
const char* buf, NPBool file);
NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type,
const char* target, NPStream** stream);
int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer);
NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
void NP_LOADDS NPN_Status(NPP instance, const char* message);
const char* NP_LOADDS NPN_UserAgent(NPP instance);
void* NP_LOADDS NPN_MemAlloc(uint32 size);
void NP_LOADDS NPN_MemFree(void* ptr);
uint32 NP_LOADDS NPN_MemFlush(uint32 size);
void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
#ifdef OJI
JRIEnv* NP_LOADDS NPN_GetJavaEnv(void);
jref NP_LOADDS NPN_GetJavaPeer(NPP instance);
#endif
NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value);
NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value);
void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion);
void NP_LOADDS NPN_ForceRedraw(NPP instance);
#ifdef __cplusplus
} /* end extern "C" */
#endif
#endif /* RC_INVOKED */
#ifdef __OS2__
#pragma pack()
#endif
#endif /* _NPAPI_H_ */

397
npapi/npruntime.h Normal file
View File

@ -0,0 +1,397 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* Copyright © 2004, Apple Computer, Inc. and The Mozilla Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla
* Foundation ("Mozilla") nor the names of their contributors may be used
* to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR
* THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Revision 1 (March 4, 2004):
* Initial proposal.
*
* Revision 2 (March 10, 2004):
* All calls into script were made asynchronous. Results are
* provided via the NPScriptResultFunctionPtr callback.
*
* Revision 3 (March 10, 2004):
* Corrected comments to not refer to class retain/release FunctionPtrs.
*
* Revision 4 (March 11, 2004):
* Added additional convenience NPN_SetExceptionWithUTF8().
* Changed NPHasPropertyFunctionPtr and NPHasMethodFunctionPtr to take NPClass
* pointers instead of NPObject pointers.
* Added NPIsValidIdentifier().
*
* Revision 5 (March 17, 2004):
* Added context parameter to result callbacks from ScriptObject functions.
*
* Revision 6 (March 29, 2004):
* Renamed functions implemented by user agent to NPN_*. Removed _ from
* type names.
* Renamed "JavaScript" types to "Script".
*
* Revision 7 (April 21, 2004):
* NPIdentifier becomes a void*, was int32_t
* Remove NP_IsValidIdentifier, renamed NP_IdentifierFromUTF8 to NP_GetIdentifier
* Added NPVariant and modified functions to use this new type.
*
* Revision 8 (July 9, 2004):
* Updated to joint Apple-Mozilla license.
*
*/
#ifndef _NP_RUNTIME_H_
#define _NP_RUNTIME_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "nptypes.h"
/*
This API is used to facilitate binding code written in C to script
objects. The API in this header does not assume the presence of a
user agent. That is, it can be used to bind C code to scripting
environments outside of the context of a user agent.
However, the normal use of the this API is in the context of a
scripting environment running in a browser or other user agent.
In particular it is used to support the extended Netscape
script-ability API for plugins (NP-SAP). NP-SAP is an extension
of the Netscape plugin API. As such we have adopted the use of
the "NP" prefix for this API.
The following NP{N|P}Variables were added to the Netscape plugin
API (in npapi.h):
NPNVWindowNPObject
NPNVPluginElementNPObject
NPPVpluginScriptableNPObject
These variables are exposed through NPN_GetValue() and
NPP_GetValue() (respectively) and are used to establish the
initial binding between the user agent and native code. The DOM
objects in the user agent can be examined and manipulated using
the NPN_ functions that operate on NPObjects described in this
header.
To the extent possible the assumptions about the scripting
language used by the scripting environment have been minimized.
*/
#define NP_BEGIN_MACRO do {
#define NP_END_MACRO } while (0)
/*
Objects (non-primitive data) passed between 'C' and script is
always wrapped in an NPObject. The 'interface' of an NPObject is
described by an NPClass.
*/
typedef struct NPObject NPObject;
typedef struct NPClass NPClass;
typedef char NPUTF8;
typedef struct _NPString {
const NPUTF8 *utf8characters;
uint32_t utf8length;
} NPString;
typedef enum {
NPVariantType_Void,
NPVariantType_Null,
NPVariantType_Bool,
NPVariantType_Int32,
NPVariantType_Double,
NPVariantType_String,
NPVariantType_Object
} NPVariantType;
typedef struct _NPVariant {
NPVariantType type;
union {
bool boolValue;
uint32_t intValue;
double doubleValue;
NPString stringValue;
NPObject *objectValue;
} value;
} NPVariant;
/*
NPN_ReleaseVariantValue is called on all 'out' parameters
references. Specifically it is to be called on variants that own
their value, as is the case with all non-const NPVariant*
arguments after a successful call to any methods (except this one)
in this API.
After calling NPN_ReleaseVariantValue, the type of the variant
will be NPVariantType_Void.
*/
void NPN_ReleaseVariantValue(NPVariant *variant);
#define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void)
#define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null)
#define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool)
#define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32)
#define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double)
#define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String)
#define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object)
#define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue)
#define NPVARIANT_TO_INT32(_v) ((_v).value.intValue)
#define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue)
#define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue)
#define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue)
#define VOID_TO_NPVARIANT(_v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Void; \
(_v).value.objectValue = NULL; \
NP_END_MACRO
#define NULL_TO_NPVARIANT(_v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Null; \
(_v).value.objectValue = NULL; \
NP_END_MACRO
#define BOOLEAN_TO_NPVARIANT(_val, _v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Bool; \
(_v).value.boolValue = !!(_val); \
NP_END_MACRO
#define INT32_TO_NPVARIANT(_val, _v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Int32; \
(_v).value.intValue = _val; \
NP_END_MACRO
#define DOUBLE_TO_NPVARIANT(_val, _v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Double; \
(_v).value.doubleValue = _val; \
NP_END_MACRO
#define STRINGZ_TO_NPVARIANT(_val, _v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_String; \
NPString str = { _val, strlen(_val) }; \
(_v).value.stringValue = str; \
NP_END_MACRO
#define STRINGN_TO_NPVARIANT(_val, _len, _v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_String; \
NPString str = { _val, _len }; \
(_v).value.stringValue = str; \
NP_END_MACRO
#define OBJECT_TO_NPVARIANT(_val, _v) \
NP_BEGIN_MACRO \
(_v).type = NPVariantType_Object; \
(_v).value.objectValue = _val; \
NP_END_MACRO
/*
Type mappings (JavaScript types have been used for illustration
purposes):
JavaScript to C (NPVariant with type:)
undefined NPVariantType_Void
null NPVariantType_Null
Boolean NPVariantType_Bool
Number NPVariantType_Double or NPVariantType_Int32
String NPVariantType_String
Object NPVariantType_Object
C (NPVariant with type:) to JavaScript
NPVariantType_Void undefined
NPVariantType_Null null
NPVariantType_Bool Boolean
NPVariantType_Int32 Number
NPVariantType_Double Number
NPVariantType_String String
NPVariantType_Object Object
*/
typedef void *NPIdentifier;
/*
NPObjects have methods and properties. Methods and properties are
identified with NPIdentifiers. These identifiers may be reflected
in script. NPIdentifiers can be either strings or integers, IOW,
methods and properties can be identified by either strings or
integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be
compared using ==. In case of any errors, the requested
NPIdentifier(s) will be NULL.
*/
NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name);
void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount,
NPIdentifier *identifiers);
NPIdentifier NPN_GetIntIdentifier(int32_t intid);
bool NPN_IdentifierIsString(NPIdentifier identifier);
/*
The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed.
*/
NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier);
/*
Get the integer represented by identifier. If identifier is not an
integer identifier, the behaviour is undefined.
*/
int32_t NPN_IntFromIdentifier(NPIdentifier identifier);
/*
NPObject behavior is implemented using the following set of
callback functions.
The NPVariant *result argument of these functions (where
applicable) should be released using NPN_ReleaseVariantValue().
*/
typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass);
typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj);
typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj);
typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name);
typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name,
const NPVariant *args, uint32_t argCount,
NPVariant *result);
typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj,
const NPVariant *args,
uint32_t argCount,
NPVariant *result);
typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name);
typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name,
NPVariant *result);
typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name,
const NPVariant *value);
typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj,
NPIdentifier name);
/*
NPObjects returned by create, retain, invoke, and getProperty pass
a reference count to the caller. That is, the callee adds a
reference count which passes to the caller. It is the caller's
responsibility to release the returned object.
NPInvokeFunctionPtr function may return 0 to indicate a void
result.
NPInvalidateFunctionPtr is called by the scripting environment
when the native code is shutdown. Any attempt to message a
NPObject instance after the invalidate callback has been
called will result in undefined behavior, even if the native code
is still retaining those NPObject instances. (The runtime
will typically return immediately, with 0 or NULL, from an attempt
to dispatch to a NPObject, but this behavior should not be
depended upon.)
*/
struct NPClass
{
uint32_t structVersion;
NPAllocateFunctionPtr allocate;
NPDeallocateFunctionPtr deallocate;
NPInvalidateFunctionPtr invalidate;
NPHasMethodFunctionPtr hasMethod;
NPInvokeFunctionPtr invoke;
NPInvokeDefaultFunctionPtr invokeDefault;
NPHasPropertyFunctionPtr hasProperty;
NPGetPropertyFunctionPtr getProperty;
NPSetPropertyFunctionPtr setProperty;
NPRemovePropertyFunctionPtr removeProperty;
};
#define NP_CLASS_STRUCT_VERSION 1
struct NPObject {
NPClass *_class;
uint32_t referenceCount;
/*
* Additional space may be allocated here by types of NPObjects
*/
};
/*
If the class has an allocate function, NPN_CreateObject invokes
that function, otherwise a NPObject is allocated and
returned. This method will initialize the referenceCount member of
the NPObject to 1.
*/
NPObject *NPN_CreateObject(NPP npp, NPClass *aClass);
/*
Increment the NPObject's reference count.
*/
NPObject *NPN_RetainObject(NPObject *npobj);
/*
Decremented the NPObject's reference count. If the reference
count goes to zero, the class's destroy function is invoke if
specified, otherwise the object is freed directly.
*/
void NPN_ReleaseObject(NPObject *npobj);
/*
Functions to access script objects represented by NPObject.
Calls to script objects are synchronous. If a function returns a
value, it will be supplied via the result NPVariant
argument. Successful calls will return true, false will be
returned in case of an error.
Calls made from plugin code to script must be made from the thread
on which the plugin was initialized.
*/
bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName,
const NPVariant *args, uint32_t argCount, NPVariant *result);
bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args,
uint32_t argCount, NPVariant *result);
bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script,
NPVariant *result);
bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
NPVariant *result);
bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
const NPVariant *value);
bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);
bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName);
/*
NPN_SetException may be called to trigger a script exception upon
return from entry points into NPObjects. Typical usage:
NPN_SetException (npobj, message);
*/
void NPN_SetException(NPObject *npobj, const NPUTF8 *message);
#ifdef __cplusplus
}
#endif
#endif

109
npapi/nptypes.h Normal file
View File

@ -0,0 +1,109 @@
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* mozilla.org.
* Portions created by the Initial Developer are Copyright (C) 2004
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Johnny Stenback <jst@mozilla.org> (Original author)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* Header file for ensuring that C99 types ([u]int32_t and bool) are
* available.
*/
#if defined(WIN32) || defined(OS2)
/*
* Win32 and OS/2 don't know C99, so define [u]int_32 here. The bool
* is predefined tho, both in C and C++.
*/
typedef int int32_t;
typedef unsigned int uint32_t;
#elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX)
/*
* AIX and SunOS ship a inttypes.h header that defines [u]int32_t,
* but not bool for C.
*/
#include <inttypes.h>
#ifndef __cplusplus
typedef int bool;
#endif
#elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
/*
* BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and
* u_int32_t.
*/
#include <sys/types.h>
/*
* BSD/OS ships no header that defines uint32_t, nor bool (for C)
* OpenBSD ships no header that defines uint32_t, but provides bool as a
* macro.
*/
#if defined(bsdi) || defined(OPENBSD)
typedef u_int32_t uint32_t;
#if defined(bsdi)
#if !defined(__cplusplus)
typedef int bool;
#endif
#else /* OPENBSD is defined, so use its bool */
#include <stdbool.h>
#endif
#else
/*
* FreeBSD defines uint32_t and bool.
*/
#include <inttypes.h>
#include <stdbool.h>
#endif
#elif defined(BEOS)
#include <inttypes.h>
#else
/*
* For those that ship a standard C99 stdint.h header file, include
* it. Can't do the same for stdbool.h tho, since some systems ship
* with a stdbool.h file that doesn't compile!
*/
#include <stdint.h>
#if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95)
#include <stdbool.h>
#else
/*
* GCC 2.91 can't deal with a typedef for bool, but a #define
* works.
*/
#define bool int
#endif
#endif

1836
npapi/npupp.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,251 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Netscape Portable Runtime (NSPR).
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*/
/*
* This header typedefs the old 'native' types to the new PR<type>s.
* These definitions are scheduled to be eliminated at the earliest
* possible time. The NSPR API is implemented and documented using
* the new definitions.
*/
#if !defined(PROTYPES_H)
#define PROTYPES_H
typedef PRUintn uintn;
#ifndef _XP_Core_
typedef PRIntn intn;
#endif
/*
* It is trickier to define uint, int8, uint8, int16, uint16,
* int32, uint32, int64, and uint64 because some of these int
* types are defined by standard header files on some platforms.
* Our strategy here is to include all such standard headers
* first, and then define these int types only if they are not
* defined by those standard headers.
*/
/*
* BeOS defines all the int types below in its standard header
* file SupportDefs.h.
*/
#ifdef XP_BEOS
#include <support/SupportDefs.h>
#endif
/*
* OpenVMS defines all the int types below in its standard
* header files ints.h and types.h.
*/
#ifdef VMS
#include <ints.h>
#include <types.h>
#endif
/*
* SVR4 typedef of uint is commonly found on UNIX machines.
*
* On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
* defines the types int8, int16, int32, and int64.
*/
#ifdef XP_UNIX
#include <sys/types.h>
#endif
/* model.h on HP-UX defines int8, int16, and int32. */
#ifdef HPUX
#include <model.h>
#endif
/*
* uint
*/
#if !defined(XP_BEOS) && !defined(VMS) \
&& !defined(XP_UNIX) || defined(NTO)
typedef PRUintn uint;
#endif
/*
* uint64
*/
#if !defined(XP_BEOS) && !defined(VMS)
typedef PRUint64 uint64;
#endif
/*
* uint32
*/
#if !defined(XP_BEOS) && !defined(VMS)
#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
typedef PRUint32 uint32;
#else
typedef unsigned long uint32;
#endif
#endif
/*
* uint16
*/
#if !defined(XP_BEOS) && !defined(VMS)
typedef PRUint16 uint16;
#endif
/*
* uint8
*/
#if !defined(XP_BEOS) && !defined(VMS)
typedef PRUint8 uint8;
#endif
/*
* int64
*/
#if !defined(XP_BEOS) && !defined(VMS) \
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
typedef PRInt64 int64;
#endif
/*
* int32
*/
#if !defined(XP_BEOS) && !defined(VMS) \
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
&& !defined(HPUX)
#if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */
#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
typedef PRInt32 int32;
#else
typedef long int32;
#endif
#endif
#endif
/*
* int16
*/
#if !defined(XP_BEOS) && !defined(VMS) \
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
&& !defined(HPUX)
typedef PRInt16 int16;
#endif
/*
* int8
*/
#if !defined(XP_BEOS) && !defined(VMS) \
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
&& !defined(HPUX)
typedef PRInt8 int8;
#endif
typedef PRFloat64 float64;
typedef PRUptrdiff uptrdiff_t;
typedef PRUword uprword_t;
typedef PRWord prword_t;
/* Re: prbit.h */
#define TEST_BIT PR_TEST_BIT
#define SET_BIT PR_SET_BIT
#define CLEAR_BIT PR_CLEAR_BIT
/* Re: prarena.h->plarena.h */
#define PRArena PLArena
#define PRArenaPool PLArenaPool
#define PRArenaStats PLArenaStats
#define PR_ARENA_ALIGN PL_ARENA_ALIGN
#define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL
#define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE
#define PR_ARENA_GROW PL_ARENA_GROW
#define PR_ARENA_MARK PL_ARENA_MARK
#define PR_CLEAR_UNUSED PL_CLEAR_UNUSED
#define PR_CLEAR_ARENA PL_CLEAR_ARENA
#define PR_ARENA_RELEASE PL_ARENA_RELEASE
#define PR_COUNT_ARENA PL_COUNT_ARENA
#define PR_ARENA_DESTROY PL_ARENA_DESTROY
#define PR_InitArenaPool PL_InitArenaPool
#define PR_FreeArenaPool PL_FreeArenaPool
#define PR_FinishArenaPool PL_FinishArenaPool
#define PR_CompactArenaPool PL_CompactArenaPool
#define PR_ArenaFinish PL_ArenaFinish
#define PR_ArenaAllocate PL_ArenaAllocate
#define PR_ArenaGrow PL_ArenaGrow
#define PR_ArenaRelease PL_ArenaRelease
#define PR_ArenaCountAllocation PL_ArenaCountAllocation
#define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth
#define PR_ArenaCountGrowth PL_ArenaCountGrowth
#define PR_ArenaCountRelease PL_ArenaCountRelease
#define PR_ArenaCountRetract PL_ArenaCountRetract
/* Re: prhash.h->plhash.h */
#define PRHashEntry PLHashEntry
#define PRHashTable PLHashTable
#define PRHashNumber PLHashNumber
#define PRHashFunction PLHashFunction
#define PRHashComparator PLHashComparator
#define PRHashEnumerator PLHashEnumerator
#define PRHashAllocOps PLHashAllocOps
#define PR_NewHashTable PL_NewHashTable
#define PR_HashTableDestroy PL_HashTableDestroy
#define PR_HashTableRawLookup PL_HashTableRawLookup
#define PR_HashTableRawAdd PL_HashTableRawAdd
#define PR_HashTableRawRemove PL_HashTableRawRemove
#define PR_HashTableAdd PL_HashTableAdd
#define PR_HashTableRemove PL_HashTableRemove
#define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
#define PR_HashTableLookup PL_HashTableLookup
#define PR_HashTableDump PL_HashTableDump
#define PR_HashString PL_HashString
#define PR_CompareStrings PL_CompareStrings
#define PR_CompareValues PL_CompareValues
#if defined(XP_MAC)
#ifndef TRUE /* Mac standard is lower case true */
#define TRUE 1
#endif
#ifndef FALSE /* Mac standard is lower case false */
#define FALSE 0
#endif
#endif
#endif /* !defined(PROTYPES_H) */

707
npapi/nspr/prcpucfg.h Normal file
View File

@ -0,0 +1,707 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Netscape Portable Runtime (NSPR).
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*/
#ifndef nspr_cpucfg___
#define nspr_cpucfg___
#ifndef XP_UNIX
#define XP_UNIX
#endif
#ifndef LINUX
#define LINUX
#endif
#define PR_AF_INET6 10 /* same as AF_INET6 */
#ifdef __powerpc64__
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
#define IS_64
#define IS_LIB64
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__powerpc__)
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 4
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__alpha)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#define IS_64
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__ia64__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#define IS_64
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__x86_64__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#define IS_64
#define IS_LIB64
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__mc68000__)
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 2
#define PR_ALIGN_OF_LONG 2
#define PR_ALIGN_OF_INT64 2
#define PR_ALIGN_OF_FLOAT 2
#define PR_ALIGN_OF_DOUBLE 2
#define PR_ALIGN_OF_POINTER 2
#define PR_ALIGN_OF_WORD 2
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__sparc__)
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 4
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__i386__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 4
#define PR_ALIGN_OF_INT64 4
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__mips__)
#ifdef __MIPSEB__
#define IS_BIG_ENDIAN 1
#undef IS_LITTLE_ENDIAN
#elif defined(__MIPSEL__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#else
#error "Unknown MIPS endianness."
#endif
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 4
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__arm__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 4
#define PR_ALIGN_OF_INT64 4
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__hppa__)
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 4
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__s390__)
#define IS_BIG_ENDIAN 1
#undef IS_LITTLE_ENDIAN
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 4
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 4
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 32
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 32
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 5
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 5
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 4
#define PR_ALIGN_OF_INT64 4
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
#define PR_ALIGN_OF_WORD 4
#define PR_BYTES_PER_WORD_LOG2 2
#define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__s390x__)
#define IS_BIG_ENDIAN 1
#undef IS_LITTLE_ENDIAN
#define IS_64
#define IS_LIB64
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#else
#error "Unknown CPU architecture"
#endif
#define HAVE_LONG_LONG
#if PR_ALIGN_OF_DOUBLE == 8
#define HAVE_ALIGNED_DOUBLES
#endif
#if PR_ALIGN_OF_INT64 == 8
#define HAVE_ALIGNED_LONGLONGS
#endif
#ifndef NO_NSPR_10_SUPPORT
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
#define BYTES_PER_INT PR_BYTES_PER_INT
#define BYTES_PER_INT64 PR_BYTES_PER_INT64
#define BYTES_PER_LONG PR_BYTES_PER_LONG
#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
#define BYTES_PER_WORD PR_BYTES_PER_WORD
#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
#define BITS_PER_BYTE PR_BITS_PER_BYTE
#define BITS_PER_SHORT PR_BITS_PER_SHORT
#define BITS_PER_INT PR_BITS_PER_INT
#define BITS_PER_INT64 PR_BITS_PER_INT64
#define BITS_PER_LONG PR_BITS_PER_LONG
#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
#define BITS_PER_WORD PR_BITS_PER_WORD
#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
#define ALIGN_OF_INT PR_ALIGN_OF_INT
#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
#endif /* NO_NSPR_10_SUPPORT */
#endif /* nspr_cpucfg___ */

523
npapi/nspr/prtypes.h Normal file
View File

@ -0,0 +1,523 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is the Netscape Portable Runtime (NSPR).
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998-2000 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your
* version of this file only under the terms of the GPL and not to
* allow others to use your version of this file under the MPL,
* indicate your decision by deleting the provisions above and
* replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient
* may use your version of this file under either the MPL or the
* GPL.
*/
/*
** File: prtypes.h
** Description: Definitions of NSPR's basic types
**
** Prototypes and macros used to make up for deficiencies in ANSI environments
** that we have found.
**
** Since we do not wrap <stdlib.h> and all the other standard headers, authors
** of portable code will not know in general that they need these definitions.
** Instead of requiring these authors to find the dependent uses in their code
** and take the following steps only in those C files, we take steps once here
** for all C files.
**/
#ifndef prtypes_h___
#define prtypes_h___
#ifdef MDCPUCFG
#include MDCPUCFG
#else
#include "prcpucfg.h"
#endif
#include <stddef.h>
/***********************************************************************
** MACROS: PR_EXTERN
** PR_IMPLEMENT
** DESCRIPTION:
** These are only for externally visible routines and globals. For
** internal routines, just use "extern" for type checking and that
** will not export internal cross-file or forward-declared symbols.
** Define a macro for declaring procedures return types. We use this to
** deal with windoze specific type hackery for DLL definitions. Use
** PR_EXTERN when the prototype for the method is declared. Use
** PR_IMPLEMENT for the implementation of the method.
**
** Example:
** in dowhim.h
** PR_EXTERN( void ) DoWhatIMean( void );
** in dowhim.c
** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; }
**
**
***********************************************************************/
#if defined(WIN32)
#define PR_EXPORT(__type) extern __declspec(dllexport) __type
#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
#define PR_IMPORT(__type) __declspec(dllimport) __type
#define PR_IMPORT_DATA(__type) __declspec(dllimport) __type
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
#define PR_CALLBACK
#define PR_CALLBACK_DECL
#define PR_STATIC_CALLBACK(__x) static __x
#elif defined(XP_BEOS)
#define PR_EXPORT(__type) extern __declspec(dllexport) __type
#define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
#define PR_IMPORT(__type) extern __declspec(dllexport) __type
#define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type
#define PR_EXTERN(__type) extern __declspec(dllexport) __type
#define PR_IMPLEMENT(__type) __declspec(dllexport) __type
#define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
#define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
#define PR_CALLBACK
#define PR_CALLBACK_DECL
#define PR_STATIC_CALLBACK(__x) static __x
#elif defined(WIN16)
#define PR_CALLBACK_DECL __cdecl
#if defined(_WINDLL)
#define PR_EXPORT(__type) extern __type _cdecl _export _loadds
#define PR_IMPORT(__type) extern __type _cdecl _export _loadds
#define PR_EXPORT_DATA(__type) extern __type _export
#define PR_IMPORT_DATA(__type) extern __type _export
#define PR_EXTERN(__type) extern __type _cdecl _export _loadds
#define PR_IMPLEMENT(__type) __type _cdecl _export _loadds
#define PR_EXTERN_DATA(__type) extern __type _export
#define PR_IMPLEMENT_DATA(__type) __type _export
#define PR_CALLBACK __cdecl __loadds
#define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK
#else /* this must be .EXE */
#define PR_EXPORT(__type) extern __type _cdecl _export
#define PR_IMPORT(__type) extern __type _cdecl _export
#define PR_EXPORT_DATA(__type) extern __type _export
#define PR_IMPORT_DATA(__type) extern __type _export
#define PR_EXTERN(__type) extern __type _cdecl _export
#define PR_IMPLEMENT(__type) __type _cdecl _export
#define PR_EXTERN_DATA(__type) extern __type _export
#define PR_IMPLEMENT_DATA(__type) __type _export
#define PR_CALLBACK __cdecl __loadds
#define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK
#endif /* _WINDLL */
#elif defined(XP_MAC)
#define PR_EXPORT(__type) extern __declspec(export) __type
#define PR_EXPORT_DATA(__type) extern __declspec(export) __type
#define PR_IMPORT(__type) extern __declspec(export) __type
#define PR_IMPORT_DATA(__type) extern __declspec(export) __type
#define PR_EXTERN(__type) extern __declspec(export) __type
#define PR_IMPLEMENT(__type) __declspec(export) __type
#define PR_EXTERN_DATA(__type) extern __declspec(export) __type
#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type
#define PR_CALLBACK
#define PR_CALLBACK_DECL
#define PR_STATIC_CALLBACK(__x) static __x
#else /* Unix */
#define PR_EXPORT(__type) extern __type
#define PR_EXPORT_DATA(__type) extern __type
#define PR_IMPORT(__type) extern __type
#define PR_IMPORT_DATA(__type) extern __type
#define PR_EXTERN(__type) extern __type
#define PR_IMPLEMENT(__type) __type
#define PR_EXTERN_DATA(__type) extern __type
#define PR_IMPLEMENT_DATA(__type) __type
#define PR_CALLBACK
#define PR_CALLBACK_DECL
#define PR_STATIC_CALLBACK(__x) static __x
#endif
#if defined(_NSPR_BUILD_)
#define NSPR_API(__type) PR_EXPORT(__type)
#define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type)
#else
#define NSPR_API(__type) PR_IMPORT(__type)
#define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type)
#endif
/***********************************************************************
** MACROS: PR_BEGIN_MACRO
** PR_END_MACRO
** DESCRIPTION:
** Macro body brackets so that macros with compound statement definitions
** behave syntactically more like functions when called.
***********************************************************************/
#define PR_BEGIN_MACRO do {
#define PR_END_MACRO } while (0)
/***********************************************************************
** MACROS: PR_BEGIN_EXTERN_C
** PR_END_EXTERN_C
** DESCRIPTION:
** Macro shorthands for conditional C++ extern block delimiters.
***********************************************************************/
#ifdef __cplusplus
#define PR_BEGIN_EXTERN_C extern "C" {
#define PR_END_EXTERN_C }
#else
#define PR_BEGIN_EXTERN_C
#define PR_END_EXTERN_C
#endif
/***********************************************************************
** MACROS: PR_BIT
** PR_BITMASK
** DESCRIPTION:
** Bit masking macros. XXX n must be <= 31 to be portable
***********************************************************************/
#define PR_BIT(n) ((PRUint32)1 << (n))
#define PR_BITMASK(n) (PR_BIT(n) - 1)
/***********************************************************************
** MACROS: PR_ROUNDUP
** PR_MIN
** PR_MAX
** PR_ABS
** DESCRIPTION:
** Commonly used macros for operations on compatible types.
***********************************************************************/
#define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y))
#define PR_MIN(x,y) ((x)<(y)?(x):(y))
#define PR_MAX(x,y) ((x)>(y)?(x):(y))
#define PR_ABS(x) ((x)<0?-(x):(x))
PR_BEGIN_EXTERN_C
/************************************************************************
** TYPES: PRUint8
** PRInt8
** DESCRIPTION:
** The int8 types are known to be 8 bits each. There is no type that
** is equivalent to a plain "char".
************************************************************************/
#if PR_BYTES_PER_BYTE == 1
typedef unsigned char PRUint8;
/*
** Some cfront-based C++ compilers do not like 'signed char' and
** issue the warning message:
** warning: "signed" not implemented (ignored)
** For these compilers, we have to define PRInt8 as plain 'char'.
** Make sure that plain 'char' is indeed signed under these compilers.
*/
#if (defined(HPUX) && defined(__cplusplus) \
&& !defined(__GNUC__) && __cplusplus < 199707L) \
|| (defined(SCO) && defined(__cplusplus) \
&& !defined(__GNUC__) && __cplusplus == 1L)
typedef char PRInt8;
#else
typedef signed char PRInt8;
#endif
#else
#error No suitable type for PRInt8/PRUint8
#endif
/************************************************************************
* MACROS: PR_INT8_MAX
* PR_INT8_MIN
* PR_UINT8_MAX
* DESCRIPTION:
* The maximum and minimum values of a PRInt8 or PRUint8.
************************************************************************/
#define PR_INT8_MAX 127
#define PR_INT8_MIN (-128)
#define PR_UINT8_MAX 255U
/************************************************************************
** TYPES: PRUint16
** PRInt16
** DESCRIPTION:
** The int16 types are known to be 16 bits each.
************************************************************************/
#if PR_BYTES_PER_SHORT == 2
typedef unsigned short PRUint16;
typedef short PRInt16;
#else
#error No suitable type for PRInt16/PRUint16
#endif
/************************************************************************
* MACROS: PR_INT16_MAX
* PR_INT16_MIN
* PR_UINT16_MAX
* DESCRIPTION:
* The maximum and minimum values of a PRInt16 or PRUint16.
************************************************************************/
#define PR_INT16_MAX 32767
#define PR_INT16_MIN (-32768)
#define PR_UINT16_MAX 65535U
/************************************************************************
** TYPES: PRUint32
** PRInt32
** DESCRIPTION:
** The int32 types are known to be 32 bits each.
************************************************************************/
#if PR_BYTES_PER_INT == 4
typedef unsigned int PRUint32;
typedef int PRInt32;
#define PR_INT32(x) x
#define PR_UINT32(x) x ## U
#elif PR_BYTES_PER_LONG == 4
typedef unsigned long PRUint32;
typedef long PRInt32;
#define PR_INT32(x) x ## L
#define PR_UINT32(x) x ## UL
#else
#error No suitable type for PRInt32/PRUint32
#endif
/************************************************************************
* MACROS: PR_INT32_MAX
* PR_INT32_MIN
* PR_UINT32_MAX
* DESCRIPTION:
* The maximum and minimum values of a PRInt32 or PRUint32.
************************************************************************/
#define PR_INT32_MAX PR_INT32(2147483647)
#define PR_INT32_MIN (-PR_INT32_MAX - 1)
#define PR_UINT32_MAX PR_UINT32(4294967295)
/************************************************************************
** TYPES: PRUint64
** PRInt64
** DESCRIPTION:
** The int64 types are known to be 64 bits each. Care must be used when
** declaring variables of type PRUint64 or PRInt64. Different hardware
** architectures and even different compilers have varying support for
** 64 bit values. The only guaranteed portability requires the use of
** the LL_ macros (see prlong.h).
************************************************************************/
#ifdef HAVE_LONG_LONG
#if PR_BYTES_PER_LONG == 8
typedef long PRInt64;
typedef unsigned long PRUint64;
#elif defined(WIN16)
typedef __int64 PRInt64;
typedef unsigned __int64 PRUint64;
#elif defined(WIN32) && !defined(__GNUC__)
typedef __int64 PRInt64;
typedef unsigned __int64 PRUint64;
#else
typedef long long PRInt64;
typedef unsigned long long PRUint64;
#endif /* PR_BYTES_PER_LONG == 8 */
#else /* !HAVE_LONG_LONG */
typedef struct {
#ifdef IS_LITTLE_ENDIAN
PRUint32 lo, hi;
#else
PRUint32 hi, lo;
#endif
} PRInt64;
typedef PRInt64 PRUint64;
#endif /* !HAVE_LONG_LONG */
/************************************************************************
** TYPES: PRUintn
** PRIntn
** DESCRIPTION:
** The PRIntn types are most appropriate for automatic variables. They are
** guaranteed to be at least 16 bits, though various architectures may
** define them to be wider (e.g., 32 or even 64 bits). These types are
** never valid for fields of a structure.
************************************************************************/
#if PR_BYTES_PER_INT >= 2
typedef int PRIntn;
typedef unsigned int PRUintn;
#else
#error 'sizeof(int)' not sufficient for platform use
#endif
/************************************************************************
** TYPES: PRFloat64
** DESCRIPTION:
** NSPR's floating point type is always 64 bits.
************************************************************************/
typedef double PRFloat64;
/************************************************************************
** TYPES: PRSize
** DESCRIPTION:
** A type for representing the size of objects.
************************************************************************/
typedef size_t PRSize;
/************************************************************************
** TYPES: PROffset32, PROffset64
** DESCRIPTION:
** A type for representing byte offsets from some location.
************************************************************************/
typedef PRInt32 PROffset32;
typedef PRInt64 PROffset64;
/************************************************************************
** TYPES: PRPtrDiff
** DESCRIPTION:
** A type for pointer difference. Variables of this type are suitable
** for storing a pointer or pointer sutraction.
************************************************************************/
typedef ptrdiff_t PRPtrdiff;
/************************************************************************
** TYPES: PRUptrdiff
** DESCRIPTION:
** A type for pointer difference. Variables of this type are suitable
** for storing a pointer or pointer sutraction.
************************************************************************/
typedef unsigned long PRUptrdiff;
/************************************************************************
** TYPES: PRBool
** DESCRIPTION:
** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE
** for clarity of target type in assignments and actual arguments. Use
** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans
** juast as you would C int-valued conditions.
************************************************************************/
typedef PRIntn PRBool;
#define PR_TRUE 1
#define PR_FALSE 0
/************************************************************************
** TYPES: PRPackedBool
** DESCRIPTION:
** Use PRPackedBOol within structs where bitfields are not desireable
** but minimum and consistant overhead matters.
************************************************************************/
typedef PRUint8 PRPackedBool;
/*
** Status code used by some routines that have a single point of failure or
** special status return.
*/
typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
#ifdef MOZ_UNICODE
/*
* EXPERIMENTAL: This type may be removed in a future release.
*/
#ifndef __PRUNICHAR__
#define __PRUNICHAR__
#if defined(WIN32) || defined(XP_MAC)
typedef wchar_t PRUnichar;
#else
typedef PRUint16 PRUnichar;
#endif
#endif
#endif /* MOZ_UNICODE */
/*
** WARNING: The undocumented data types PRWord and PRUword are
** only used in the garbage collection and arena code. Do not
** use PRWord and PRUword in new code.
**
** A PRWord is an integer that is the same size as a void*.
** It implements the notion of a "word" in the Java Virtual
** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine
** Specification, Addison-Wesley, September 1996.
** http://java.sun.com/docs/books/vmspec/index.html.)
*/
typedef long PRWord;
typedef unsigned long PRUword;
#if defined(NO_NSPR_10_SUPPORT)
#else
/********* ???????????????? FIX ME ??????????????????????????? *****/
/********************** Some old definitions until pr=>ds transition is done ***/
/********************** Also, we are still using NSPR 1.0. GC ******************/
/*
** Fundamental NSPR macros, used nearly everywhere.
*/
#define PR_PUBLIC_API PR_IMPLEMENT
/*
** Macro body brackets so that macros with compound statement definitions
** behave syntactically more like functions when called.
*/
#define NSPR_BEGIN_MACRO do {
#define NSPR_END_MACRO } while (0)
/*
** Macro shorthands for conditional C++ extern block delimiters.
*/
#ifdef NSPR_BEGIN_EXTERN_C
#undef NSPR_BEGIN_EXTERN_C
#endif
#ifdef NSPR_END_EXTERN_C
#undef NSPR_END_EXTERN_C
#endif
#ifdef __cplusplus
#define NSPR_BEGIN_EXTERN_C extern "C" {
#define NSPR_END_EXTERN_C }
#else
#define NSPR_BEGIN_EXTERN_C
#define NSPR_END_EXTERN_C
#endif
#ifdef XP_MAC
#include "protypes.h"
#else
#include "obsolete/protypes.h"
#endif
/********* ????????????? End Fix me ?????????????????????????????? *****/
#endif /* NO_NSPR_10_SUPPORT */
PR_END_EXTERN_C
#endif /* prtypes_h___ */

183
nspluginwrapper.spec Normal file
View File

@ -0,0 +1,183 @@
%define name nspluginwrapper
%define version 0.9.91.1
%define release 1
#define svndate 20061227
# define 32-bit arch of multiarch platforms
%define arch_32 %{nil}
%ifarch x86_64
%define arch_32 i386
%endif
%ifarch ppc64
%define arch_32 ppc
%endif
%ifarch sparc64
%define arch_32 sparc
%endif
# define target architecture of plugins we want to support
%define target_arch i386
# define target operating system of plugins we want to support
%define target_os linux
# define nspluginswrapper libdir (invariant, including libdir)
%define pkglibdir %{_prefix}/lib/%{name}
# define mozilla plugin dir
%define plugindir %{_libdir}/mozilla/plugins
# define to build a biarch package
# XXX really build one package and handle upgrades
%define build_biarch 0
%if "%{_arch}:%{arch_32}" == "x86_64:i386"
%define build_biarch 1
%endif
%{expand: %{?_with_biarch: %%global build_biarch 1}}
%{expand: %{?_without_biarch: %%global build_biarch 0}}
Summary: A compatibility layer for Netscape 4 plugins
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2
License: GPL
Group: Networking/WWW
Url: http://gwenole.beauchesne.info/projects/nspluginwrapper/
BuildRequires: gtk+2-devel
Provides: %{name}-%{_arch} = %{version}-%{release}
Requires: %{name}-%{target_arch} = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
%description
nspluginwrapper makes it possible to use Netscape 4 compatible plugins
compiled for %{target_arch} into Mozilla for another architecture, e.g. x86_64.
This package consists in:
* npviewer: the plugin viewer
* npwrapper.so: the browser-side plugin
* nspluginwrapper: a tool to manage plugins installation and update
%if %{build_biarch}
%package %{target_arch}
Summary: A viewer for %{target_arch} compiled Netscape 4 plugins
Group: Networking/WWW
%description %{target_arch}
nspluginwrapper makes it possible to use Netscape 4 compatible plugins
compiled for %{target_arch} into Mozilla for another architecture, e.g. x86_64.
This package consists in:
* npviewer: the plugin viewer
* npwrapper.so: the browser-side plugin
* nspluginwrapper: a tool to manage plugins installation and update
This package provides the npviewer program for %{target_arch}.
%endif
%prep
%setup -q
%build
%if %{build_biarch}
biarch="--with-biarch"
%else
biarch="--without-biarch"
%endif
mkdir objs
pushd objs
../configure --prefix=%{_prefix} $biarch
make
popd
%install
rm -rf $RPM_BUILD_ROOT
make -C objs install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{plugindir}
ln -s %{pkglibdir}/%{_arch}/%{_os}/npwrapper.so $RPM_BUILD_ROOT%{plugindir}/npwrapper.so
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ $1 = 1 ]; then
%{_bindir}/%{name} -v -a -i
else
%{_bindir}/%{name} -v -a -u
fi
%preun
if [ $1 = 0 ]; then
%{_bindir}/%{name} -v -a -r
fi
%files
%defattr(-,root,root)
%doc README COPYING NEWS
%{_bindir}/%{name}
%{plugindir}/npwrapper.so
%dir %{pkglibdir}
%dir %{pkglibdir}/noarch
%{pkglibdir}/noarch/npviewer
%{pkglibdir}/noarch/mkruntime
%dir %{pkglibdir}/%{_arch}
%dir %{pkglibdir}/%{_arch}/%{_os}
%{pkglibdir}/%{_arch}/%{_os}/npconfig
%if ! %{build_biarch}
%{pkglibdir}/%{_arch}/%{_os}/npviewer
%{pkglibdir}/%{_arch}/%{_os}/npviewer.bin
%{pkglibdir}/%{_arch}/%{_os}/libxpcom.so
%endif
%{pkglibdir}/%{_arch}/%{_os}/npwrapper.so
%if %{build_biarch}
%files %{target_arch}
%defattr(-,root,root)
%dir %{pkglibdir}/%{target_arch}
%dir %{pkglibdir}/%{target_arch}/%{target_os}
%{pkglibdir}/%{target_arch}/%{target_os}/npviewer
%{pkglibdir}/%{target_arch}/%{target_os}/npviewer.bin
%{pkglibdir}/%{target_arch}/%{target_os}/libxpcom.so
%endif
%changelog
* Tue Dec 26 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.91.1-1
- fix NPRuntime bridge (VLC plugin)
- fix Mozilla plugins dir creation on NetBSD and FreeBSD hosts
- fix potential buffer overflow in RPC marshalers
- handle empty args for plugin creation (flasharcade.com)
* Thu Dec 21 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.91-1
- add scripting support through npruntime
- add XEMBED support (mplayer plug-in)
- add NPN_RequestRead() support (Acrobat Reader)
- add support for NetBSD, FreeBSD and non-x86 Linux hosts
- fix ppc64 / ppc32 support
- fix focus problems
- fix some rare hangs (add delayed requests)
- fix libstdc++2 compat glue for broken plugins
- create user mozilla plugins dir if it does not exist yet
* Wed Nov 18 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.90.4-1
- add printing support (NPP_Print)
- add initial support for Konqueror
- fix post data to a URL (NPN_PostURL, NPN_PostURLNotify)
- reduce plugin load times
- robustify error condition (Darryl L. Miles)
* Tue Sep 19 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.90.3-1
- fix acrobat reader 7 plugin
* Sun Sep 17 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.90.2-1
- use a bidirectional communication channel
* Sun Jun 4 2006 Gwenole Beauchesne <gb.public@free.fr> 0.9.90.1-1
- relicense under GPL
- don't use QEMU on IA-64
- handle SuSE Linux Mozilla paths
- portability fixes to non-Linux platforms
* Tue Oct 25 2005 Gwenole Beauchesne <gb.public@free.fr> 0.9.90-1
- first public beta version

80
src/cxxabi-compat.cpp Normal file
View File

@ -0,0 +1,80 @@
/*
* cxxabi-compat.cpp - Compatibility glue for older libg++ symbols
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* Original code from Mozilla */
// On x86 linux, the current builds of some popular plugins (notably
// flashplayer and real) expect a few builtin symbols from libgcc
// which were available in some older versions of gcc. However,
// they're _NOT_ available in newer versions of gcc (eg 3.1), so if we
// want those plugin to work with a gcc-3.1 built binary, we need to
// provide these symbols. MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS defaults
// to true on x86 linux, and false everywhere else.
//
// The fact that the new and free operators are mismatched mirrors the
// way the original functions in egcs 1.1.2 worked.
#include <stddef.h>
#include <stdlib.h>
#include <new>
#if defined(__linux__) && defined(__i386__)
extern "C" {
# ifndef HAVE___BUILTIN_VEC_NEW
void *__builtin_vec_new(size_t aSize, const std::nothrow_t &aNoThrow) throw()
{
return ::operator new(aSize, aNoThrow);
}
# endif
# ifndef HAVE___BUILTIN_VEC_DELETE
void __builtin_vec_delete(void *aPtr, const std::nothrow_t &) throw ()
{
free(aPtr);
}
# endif
# ifndef HAVE___BUILTIN_NEW
void *__builtin_new(int aSize)
{
return malloc(aSize);
}
# endif
# ifndef HAVE___BUILTIN_DELETE
void __builtin_delete(void *aPtr)
{
free(aPtr);
}
# endif
# ifndef HAVE___PURE_VIRTUAL
void __pure_virtual(void)
{
extern void __cxa_pure_virtual(void);
__cxa_pure_virtual();
}
# endif
}
#endif

102
src/debug.c Normal file
View File

@ -0,0 +1,102 @@
/*
* debug.c - Debugging utilities
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdeps.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <limits.h>
#include <errno.h>
#include "debug.h"
static int g_debug_level = -1;
void npw_dprintf(const char *format, ...)
{
if (g_debug_level < 0) {
g_debug_level = 0;
const char *debug_str = getenv("NPW_DEBUG");
if (debug_str) {
errno = 0;
long v = strtol(debug_str, NULL, 10);
if ((v != LONG_MIN && v != LONG_MAX) || errno != ERANGE)
g_debug_level = v;
}
}
if (g_debug_level > 0) {
va_list args;
va_start(args, format);
npw_vprintf(format, args);
va_end(args);
}
}
static FILE *g_log_file = NULL;
static FILE *npw_log_file(void)
{
if (g_log_file == NULL) {
const char *log_file = getenv("NPW_LOG");
if (log_file) {
const char *mode = "w";
#ifdef BUILD_VIEWER
/* the wrapper plugin has the responsability to create the file,
thus the viewer is only opening it for appending data. */
mode = "a";
#endif
g_log_file = fopen(log_file, mode);
}
if (log_file == NULL)
g_log_file = stderr;
}
if (g_log_file != stderr)
fseek(g_log_file, 0, SEEK_END);
return g_log_file;
}
static void __attribute__((destructor)) log_file_sentinel(void)
{
if (g_log_file && g_log_file != stderr) {
fclose(g_log_file);
g_log_file = stderr;
}
}
void npw_vprintf(const char *format, va_list args)
{
FILE *log_file = npw_log_file();
fprintf(log_file, "*** NSPlugin %s *** ", NPW_COMPONENT_NAME);
vfprintf(log_file, format, args);
fflush(log_file);
}
void npw_printf(const char *format, ...)
{
va_list args;
va_start(args, format);
npw_vprintf(format, args);
va_end(args);
}

38
src/debug.h Normal file
View File

@ -0,0 +1,38 @@
/*
* debug.h - Debugging utilities
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DEBUG_H
#define DEBUG_H
#include <stdarg.h>
extern void npw_dprintf(const char *format, ...) attribute_hidden;
extern void npw_printf(const char *format, ...) attribute_hidden;
extern void npw_vprintf(const char *format, va_list args) attribute_hidden;
#if DEBUG
#define bug npw_dprintf
#define D(x) x
#else
#define D(x) ;
#endif
#endif /* DEBUG_H */

26
src/libxpcom.c Normal file
View File

@ -0,0 +1,26 @@
/*
* libxpcom.c - Dummy XPCOM glue
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdeps.h"
#define DEBUG 1
#include "debug.h"
/* NOT IMPLEMENTED YET */

66
src/npruntime-impl.h Normal file
View File

@ -0,0 +1,66 @@
/*
* npruntime.c - Scripting plugins support
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef NPRUNTIME_IMPL_H
#define NPRUNTIME_IMPL_H
// NPObjectInfo is used to hold additional information for an NPObject instance
typedef struct {
NPObject *npobj;
uint32_t npobj_id;
} NPObjectInfo;
extern NPObjectInfo *npobject_info_new(NPObject *npobj) attribute_hidden;
extern void npobject_info_destroy(NPObjectInfo *npobj_info) attribute_hidden;
extern NPObjectInfo *npobject_info_lookup(NPObject *npobj) attribute_hidden;
extern NPObject *npobject_new(uint32_t npobj_id, NPP instance, NPClass *class) attribute_hidden;
extern void npobject_destroy(NPObject *npobj) attribute_hidden;
extern NPObject *npobject_lookup(uint32_t npobj_id) attribute_hidden;
extern void npobject_associate(NPObject *npobj, NPObjectInfo *npobj_info) attribute_hidden;
extern bool npobject_bridge_new(void) attribute_hidden;
extern void npobject_bridge_destroy(void) attribute_hidden;
extern NPClass npclass_bridge;
extern void npclass_invoke_Invalidate(NPObject *npobj) attribute_hidden;
extern bool npclass_invoke_HasMethod(NPObject *npobj, NPIdentifier name) attribute_hidden;
extern bool npclass_invoke_Invoke(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) attribute_hidden;
extern bool npclass_invoke_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result) attribute_hidden;
extern bool npclass_invoke_HasProperty(NPObject *npobj, NPIdentifier name) attribute_hidden;
extern bool npclass_invoke_GetProperty(NPObject *npobj, NPIdentifier name, NPVariant *result) attribute_hidden;
extern bool npclass_invoke_SetProperty(NPObject *npobj, NPIdentifier name, const NPVariant *value) attribute_hidden;
extern bool npclass_invoke_RemoveProperty(NPObject *npobj, NPIdentifier name) attribute_hidden;
extern int npclass_handle_Invalidate(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_HasMethod(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_Invoke(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_InvokeDefault(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_HasProperty(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_GetProperty(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_SetProperty(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_RemoveProperty(rpc_connection_t *connection) attribute_hidden;
extern int npclass_handle_Invalidate(rpc_connection_t *connection) attribute_hidden;
struct _NPNetscapeFuncs;
extern void npruntime_init_callbacks(struct _NPNetscapeFuncs *mozilla_funcs);
#endif /* NPRUNTIME_IMPL_H */

706
src/npruntime.c Normal file
View File

@ -0,0 +1,706 @@
/*
* npruntime.c - Scripting plugins support
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdeps.h"
#include <assert.h>
#include <glib.h> /* <glib/ghash.h> */
#include "utils.h"
#include "rpc.h"
#include "npw-rpc.h"
#define XP_UNIX 1
#define MOZ_X11 1
#include <npapi.h>
#include <npupp.h>
#include <npruntime.h>
#include "npruntime-impl.h"
#define DEBUG 1
#include "debug.h"
// Defined in npw-{wrapper,viewer}.c
extern rpc_connection_t *g_rpc_connection attribute_hidden;
/* ====================================================================== */
/* === NPClass Bridge === */
/* ====================================================================== */
NPClass npclass_bridge = {
NP_CLASS_STRUCT_VERSION,
NULL,
NULL,
npclass_invoke_Invalidate,
npclass_invoke_HasMethod,
npclass_invoke_Invoke,
npclass_invoke_InvokeDefault,
npclass_invoke_HasProperty,
npclass_invoke_GetProperty,
npclass_invoke_SetProperty,
npclass_invoke_RemoveProperty
};
// NPClass::Invalidate
int npclass_handle_Invalidate(rpc_connection_t *connection)
{
NPObject *npobj;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::Invalidate() get args", error);
return error;
}
if (npobj && npobj->_class && npobj->_class->invalidate) {
D(bug("NPClass::Invalidate(npobj %p)\n", npobj));
npobj->_class->invalidate(npobj);
D(bug(" done\n"));
}
return RPC_ERROR_NO_ERROR;
}
void npclass_invoke_Invalidate(NPObject *npobj)
{
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_INVALIDATE,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::Invalidate() invoke", error);
return;
}
error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::Invalidate() wait for reply", error);
return;
}
}
// NPClass::HasMethod
int npclass_handle_HasMethod(rpc_connection_t *connection)
{
NPObject *npobj;
NPIdentifier name;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_NP_IDENTIFIER, &name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::HasMethod() get args", error);
return error;
}
uint32_t ret = 0;
if (npobj && npobj->_class && npobj->_class->hasMethod) {
D(bug("NPClass::HasMethod(npobj %p, name id %p)\n", npobj, name));
ret = npobj->_class->hasMethod(npobj, name);
D(bug(" return: %d\n", ret));
}
return rpc_method_send_reply(connection, RPC_TYPE_UINT32, ret, RPC_TYPE_INVALID);
}
bool npclass_invoke_HasMethod(NPObject *npobj, NPIdentifier name)
{
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_HAS_METHOD,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_NP_IDENTIFIER, name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::HasMethod() invoke", error);
return false;
}
uint32_t ret;
error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::HasMethod() wait for reply", error);
return false;
}
return ret;
}
// NPClass::Invoke
int npclass_handle_Invoke(rpc_connection_t *connection)
{
NPObject *npobj;
NPIdentifier name;
uint32_t argCount;
NPVariant *args;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_NP_IDENTIFIER, &name,
RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, &argCount, &args,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::Invoke() get args", error);
return error;
}
uint32_t ret = 0;
NPVariant result;
VOID_TO_NPVARIANT(result);
if (npobj && npobj->_class && npobj->_class->invoke) {
D(bug("NPClass::Invoke(npobj %p, name id %p)\n", npobj, name));
ret = npobj->_class->invoke(npobj, name, args, argCount, &result);
D(bug(" return: %d\n", ret));
}
free(args);
return rpc_method_send_reply(connection,
RPC_TYPE_UINT32, ret,
RPC_TYPE_NP_VARIANT, &result,
RPC_TYPE_INVALID);
}
bool npclass_invoke_Invoke(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount,
NPVariant *result)
{
if (result == NULL)
return false;
VOID_TO_NPVARIANT(*result);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_INVOKE,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_NP_IDENTIFIER, name,
RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, argCount, args,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::Invoke() invoke", error);
return false;
}
uint32_t ret;
error = rpc_method_wait_for_reply(g_rpc_connection,
RPC_TYPE_UINT32, &ret,
RPC_TYPE_NP_VARIANT, result,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::Invoke() wait for reply", error);
return false;
}
return ret;
}
// NPClass::InvokeDefault
int npclass_handle_InvokeDefault(rpc_connection_t *connection)
{
NPObject *npobj;
uint32_t argCount;
NPVariant *args;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, &argCount, &args,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::InvokeDefault() get args", error);
return error;
}
uint32_t ret = 0;
NPVariant result;
VOID_TO_NPVARIANT(result);
if (npobj && npobj->_class && npobj->_class->invokeDefault) {
D(bug("NPClass::InvokeDefault(npobj %p)\n", npobj));
ret = npobj->_class->invokeDefault(npobj, args, argCount, &result);
D(bug(" return: %d\n", ret));
}
free(args);
return rpc_method_send_reply(connection,
RPC_TYPE_UINT32, ret,
RPC_TYPE_NP_VARIANT, &result,
RPC_TYPE_INVALID);
}
bool npclass_invoke_InvokeDefault(NPObject *npobj, const NPVariant *args, uint32_t argCount,
NPVariant *result)
{
if (result == NULL)
return false;
VOID_TO_NPVARIANT(*result);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_INVOKE_DEFAULT,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, argCount, args,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::InvokeDefault() invoke", error);
return false;
}
uint32_t ret;
error = rpc_method_wait_for_reply(g_rpc_connection,
RPC_TYPE_UINT32, &ret,
RPC_TYPE_NP_VARIANT, result,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::InvokeDefault() wait for reply", error);
return false;
}
return ret;
}
// NPClass::HasProperty
int npclass_handle_HasProperty(rpc_connection_t *connection)
{
NPObject *npobj;
NPIdentifier name;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_NP_IDENTIFIER, &name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::HasProperty() get args", error);
return error;
}
uint32_t ret = 0;
if (npobj && npobj->_class && npobj->_class->hasProperty) {
D(bug("NPClass::HasProperty(npobj %p, name id %p)\n", npobj, name));
ret = npobj->_class->hasProperty(npobj, name);
D(bug(" return: %d\n", ret));
}
return rpc_method_send_reply(connection, RPC_TYPE_UINT32, ret, RPC_TYPE_INVALID);
}
bool npclass_invoke_HasProperty(NPObject *npobj, NPIdentifier name)
{
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_HAS_PROPERTY,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_NP_IDENTIFIER, name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::HasProperty() invoke", error);
return false;
}
uint32_t ret;
error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::HasProperty() wait for reply", error);
return false;
}
return ret;
}
// NPClass::GetProperty
int npclass_handle_GetProperty(rpc_connection_t *connection)
{
NPObject *npobj;
NPIdentifier name;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_NP_IDENTIFIER, &name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::GetProperty() get args", error);
return error;
}
uint32_t ret = 0;
NPVariant result;
VOID_TO_NPVARIANT(result);
if (npobj && npobj->_class && npobj->_class->getProperty) {
D(bug("NPClass::GetProperty(npobj %p, name id %p)\n", npobj, name));
ret = npobj->_class->getProperty(npobj, name, &result);
D(bug(" return: %d\n", ret));
}
return rpc_method_send_reply(connection,
RPC_TYPE_UINT32, ret,
RPC_TYPE_NP_VARIANT, &result,
RPC_TYPE_INVALID);
}
bool npclass_invoke_GetProperty(NPObject *npobj, NPIdentifier name, NPVariant *result)
{
if (result == NULL)
return false;
VOID_TO_NPVARIANT(*result);
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_GET_PROPERTY,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_NP_IDENTIFIER, name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::GetProperty() invoke", error);
return false;
}
uint32_t ret;
error = rpc_method_wait_for_reply(g_rpc_connection,
RPC_TYPE_UINT32, &ret,
RPC_TYPE_NP_VARIANT, result,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::GetProperty() wait for reply", error);
return false;
}
return ret;
}
// NPClass::SetProperty
int npclass_handle_SetProperty(rpc_connection_t *connection)
{
NPObject *npobj;
NPIdentifier name;
NPVariant value;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_NP_IDENTIFIER, &name,
RPC_TYPE_NP_VARIANT, &value,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::SetProperty() get args", error);
return error;
}
uint32_t ret = 0;
if (npobj && npobj->_class && npobj->_class->setProperty) {
D(bug("NPClass::SetProperty(npobj %p, name id %p)\n", npobj, name));
ret = npobj->_class->setProperty(npobj, name, &value);
D(bug(" return: %d\n", ret));
}
return rpc_method_send_reply(connection,
RPC_TYPE_UINT32, ret,
RPC_TYPE_INVALID);
}
bool npclass_invoke_SetProperty(NPObject *npobj, NPIdentifier name, const NPVariant *value)
{
if (value == NULL)
return false;
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_SET_PROPERTY,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_NP_IDENTIFIER, name,
RPC_TYPE_NP_VARIANT, value,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::SetProperty() invoke", error);
return false;
}
uint32_t ret;
error = rpc_method_wait_for_reply(g_rpc_connection,
RPC_TYPE_UINT32, &ret,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::SetProperty() wait for reply", error);
return false;
}
return ret;
}
// NPClass::RemoveProperty
int npclass_handle_RemoveProperty(rpc_connection_t *connection)
{
NPObject *npobj;
NPIdentifier name;
int error = rpc_method_get_args(connection,
RPC_TYPE_NP_OBJECT, &npobj,
RPC_TYPE_NP_IDENTIFIER, &name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::RemoveProperty() get args", error);
return error;
}
uint32_t ret = 0;
if (npobj && npobj->_class && npobj->_class->removeProperty) {
D(bug("NPClass::RemoveProperty(npobj %p, name id %p)\n", npobj, name));
ret = npobj->_class->removeProperty(npobj, name);
D(bug(" return: %d\n", ret));
}
return rpc_method_send_reply(connection, RPC_TYPE_UINT32, ret, RPC_TYPE_INVALID);
}
bool npclass_invoke_RemoveProperty(NPObject *npobj, NPIdentifier name)
{
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPCLASS_REMOVE_PROPERTY,
RPC_TYPE_NP_OBJECT, npobj,
RPC_TYPE_NP_IDENTIFIER, name,
RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::RemoveProperty() invoke", error);
return false;
}
uint32_t ret;
error = rpc_method_wait_for_reply(g_rpc_connection, RPC_TYPE_UINT32, &ret, RPC_TYPE_INVALID);
if (error != RPC_ERROR_NO_ERROR) {
npw_perror("NPClass::RemoveProperty() wait for reply", error);
return false;
}
return ret;
}
/* ====================================================================== */
/* === NPObjectInfo === */
/* ====================================================================== */
NPObjectInfo *npobject_info_new(NPObject *npobj)
{
NPObjectInfo *npobj_info = malloc(sizeof(*npobj_info));
if (npobj_info) {
static uint32_t id;
npobj_info->npobj = npobj;
npobj_info->npobj_id = ++id;
}
return npobj_info;
}
void npobject_info_destroy(NPObjectInfo *npobj_info)
{
if (npobj_info)
free(npobj_info);
}
/* ====================================================================== */
/* === NPObject === */
/* ====================================================================== */
static void npobject_hash_table_insert(NPObject *npobj, NPObjectInfo *npobj_info);
static bool npobject_hash_table_remove(NPObject *npobj);
static NPObject *_npobject_new(NPP instance, NPClass *class)
{
NPObject *npobj;
if (class && class->allocate)
npobj = class->allocate(instance, class);
else
npobj = malloc(sizeof(*npobj));
if (npobj) {
npobj->_class = class ? class : &npclass_bridge;
npobj->referenceCount = 1;
}
return npobj;
}
static void _npobject_destroy(NPObject *npobj)
{
if (npobj) {
if (npobj->_class && npobj->_class->deallocate)
npobj->_class->deallocate(npobj);
else
free(npobj);
}
}
NPObject *npobject_new(uint32_t npobj_id, NPP instance, NPClass *class)
{
NPObject *npobj = _npobject_new(instance, class);
if (npobj == NULL)
return NULL;
NPObjectInfo *npobj_info = npobject_info_new(npobj);
if (npobj_info == NULL) {
_npobject_destroy(npobj);
return NULL;
}
npobj_info->npobj_id = npobj_id;
npobject_associate(npobj, npobj_info);
return npobj;
}
void npobject_destroy(NPObject *npobj)
{
if (npobj)
npobject_hash_table_remove(npobj);
_npobject_destroy(npobj);
}
void npobject_associate(NPObject *npobj, NPObjectInfo *npobj_info)
{
assert(npobj && npobj_info && npobj_info > 0);
npobject_hash_table_insert(npobj, npobj_info);
}
/* ====================================================================== */
/* === NPObject Repository === */
/* ====================================================================== */
// NOTE: those hashes must be maintained in a whole, not separately
static GHashTable *g_npobjects = NULL; // (NPObject *) -> (NPObjectInfo *)
static GHashTable *g_npobject_ids = NULL; // (NPObject ID) -> (NPObject *)
bool npobject_bridge_new(void)
{
if ((g_npobjects = g_hash_table_new_full(NULL, NULL, NULL, (GDestroyNotify)npobject_info_destroy)) == NULL)
return false;
if ((g_npobject_ids = g_hash_table_new(NULL, NULL)) == NULL)
return false;
return true;
}
void npobject_bridge_destroy(void)
{
g_hash_table_destroy(g_npobject_ids);
g_hash_table_destroy(g_npobjects);
}
void npobject_hash_table_insert(NPObject *npobj, NPObjectInfo *npobj_info)
{
g_hash_table_insert(g_npobjects, npobj, npobj_info);
g_hash_table_insert(g_npobject_ids, (void *)(uintptr_t)npobj_info->npobj_id, npobj);
}
bool npobject_hash_table_remove(NPObject *npobj)
{
NPObjectInfo *npobj_info = npobject_info_lookup(npobj);
assert(npobj_info != NULL);
bool removed_all = true;
if (!g_hash_table_remove(g_npobject_ids, (void *)(uintptr_t)npobj_info->npobj_id))
removed_all = false;
if (!g_hash_table_remove(g_npobjects, npobj))
removed_all = false;
return removed_all;
}
NPObjectInfo *npobject_info_lookup(NPObject *npobj)
{
return g_hash_table_lookup(g_npobjects, npobj);
}
NPObject *npobject_lookup(uint32_t npobj_id)
{
return g_hash_table_lookup(g_npobject_ids, (void *)(uintptr_t)npobj_id);
}
/* ====================================================================== */
/* === Dummy npruntime accessors === */
/* ====================================================================== */
static void dummy_function_do_nothing(void)
{
}
static int dummy_function_return_zero(void)
{
return 0;
}
static bool dummy_function_return_void_variant(NPVariant *variant)
{
if (variant)
VOID_TO_NPVARIANT(*variant);
return false;
}
static bool dummy_NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName,
const NPVariant *args, uint32_t argCount, NPVariant *result)
{
return dummy_function_return_void_variant(result);
}
static bool dummy_NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args,
uint32_t argCount, NPVariant *result)
{
return dummy_function_return_void_variant(result);
}
static bool dummy_NPN_Evaluate(NPP npp, NPObject* obj, NPString *script,
NPVariant *result)
{
return dummy_function_return_void_variant(result);
}
static bool dummy_NPN_GetProperty(NPP npp, NPObject* obj, NPIdentifier propertyName,
NPVariant *result)
{
return dummy_function_return_void_variant(result);
}
void npruntime_init_callbacks(NPNetscapeFuncs *mozilla_funcs)
{
mozilla_funcs->getstringidentifier = NewNPN_GetStringIdentifierProc(dummy_function_return_zero);
mozilla_funcs->getstringidentifiers = NewNPN_GetStringIdentifiersProc(dummy_function_do_nothing);
mozilla_funcs->getintidentifier = NewNPN_GetIntIdentifierProc(dummy_function_return_zero);
mozilla_funcs->identifierisstring = NewNPN_IdentifierIsStringProc(dummy_function_return_zero);
mozilla_funcs->utf8fromidentifier = NewNPN_UTF8FromIdentifierProc(dummy_function_return_zero);
mozilla_funcs->intfromidentifier = NewNPN_IntFromIdentifierProc(dummy_function_return_zero);
mozilla_funcs->createobject = NewNPN_CreateObjectProc(dummy_function_return_zero);
mozilla_funcs->retainobject = NewNPN_RetainObjectProc(dummy_function_return_zero);
mozilla_funcs->releaseobject = NewNPN_ReleaseObjectProc(dummy_function_do_nothing);
mozilla_funcs->invoke = NewNPN_InvokeProc(dummy_NPN_Invoke);
mozilla_funcs->invokeDefault = NewNPN_InvokeDefaultProc(dummy_NPN_InvokeDefault);
mozilla_funcs->evaluate = NewNPN_EvaluateProc(dummy_NPN_Evaluate);
mozilla_funcs->getproperty = NewNPN_GetPropertyProc(dummy_NPN_GetProperty);
mozilla_funcs->setproperty = NewNPN_SetPropertyProc(dummy_function_return_zero);
mozilla_funcs->removeproperty = NewNPN_RemovePropertyProc(dummy_function_return_zero);
mozilla_funcs->hasproperty = NewNPN_HasPropertyProc(dummy_function_return_zero);
mozilla_funcs->hasmethod = NewNPN_HasMethodProc(dummy_function_return_zero);
mozilla_funcs->releasevariantvalue = NewNPN_ReleaseVariantValueProc(dummy_function_do_nothing);
mozilla_funcs->setexception = NewNPN_SetExceptionProc(dummy_function_do_nothing);
}

1097
src/npw-config.c Normal file

File diff suppressed because it is too large Load Diff

919
src/npw-rpc.c Normal file
View File

@ -0,0 +1,919 @@
/*
* npw-rpc.c - Remote Procedure Calls (NPAPI specialisation)
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sysdeps.h"
#include <assert.h>
#include "rpc.h"
#include "npw-rpc.h"
#include "utils.h"
#define XP_UNIX 1
#define MOZ_X11 1
#include <npapi.h>
#include <npruntime.h>
#include "npruntime-impl.h"
#define DEBUG 1
#include "debug.h"
/*
* RPC types of NPP/NPN variables
*/
int rpc_type_of_NPNVariable(int variable)
{
int type;
switch (variable) {
case NPNVjavascriptEnabledBool:
case NPNVasdEnabledBool:
case NPNVisOfflineBool:
case NPNVSupportsXEmbedBool:
type = RPC_TYPE_BOOLEAN;
break;
case NPNVWindowNPObject:
case NPNVPluginElementNPObject:
type = RPC_TYPE_NP_OBJECT;
break;
default:
type = RPC_ERROR_GENERIC;
break;
}
return type;
}
int rpc_type_of_NPPVariable(int variable)
{
int type;
switch (variable) {
case NPPVpluginNameString:
case NPPVpluginDescriptionString:
type = RPC_TYPE_STRING;
break;
case NPPVpluginWindowBool:
case NPPVpluginTransparentBool:
case NPPVpluginWindowSize:
case NPPVpluginTimerInterval:
type = RPC_TYPE_INT32;
break;
case NPPVpluginNeedsXEmbed:
type = RPC_TYPE_BOOLEAN;
break;
case NPPVpluginScriptableNPObject:
type = RPC_TYPE_NP_OBJECT;
break;
default:
type = RPC_ERROR_GENERIC;
break;
}
return type;
}
/*
* Process NPP objects
*/
typedef struct {
NPP instance;
uint32_t instance_id;
} PluginInstance;
#ifdef BUILD_WRAPPER
#define PLUGIN_INSTANCE(instance) ((instance)->pdata)
#endif
#ifdef BUILD_VIEWER
#define PLUGIN_INSTANCE(instance) ((instance)->ndata)
#endif
static int do_send_NPP(rpc_message_t *message, void *p_value)
{
uint32_t instance_id = 0;
NPP instance = (NPP)p_value;
if (instance) {
PluginInstance *plugin = PLUGIN_INSTANCE(instance);
if (plugin)
instance_id = plugin->instance_id;
}
return rpc_message_send_uint32(message, instance_id);
}
static int do_recv_NPP(rpc_message_t *message, void *p_value)
{
int error;
uint32_t instance_id;
if ((error = rpc_message_recv_uint32(message, &instance_id)) < 0)
return error;
PluginInstance *plugin = id_lookup(instance_id);
if (instance_id && plugin == NULL)
npw_printf("ERROR: passing an unknown instance\n");
if (plugin && plugin->instance == NULL)
npw_printf("ERROR: passing a NULL instance through plugin instance id\n");
*((NPP *)p_value) = plugin ? plugin->instance : NULL;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPStream objects
*/
typedef struct {
NPStream *stream;
uint32_t stream_id;
} StreamInstance;
#ifdef BUILD_WRAPPER
#define STREAM_INSTANCE(instance) ((instance)->pdata)
#endif
#ifdef BUILD_VIEWER
#define STREAM_INSTANCE(instance) ((instance)->ndata)
#endif
static int do_send_NPStream(rpc_message_t *message, void *p_value)
{
uint32_t stream_id = 0;
NPStream *stream = (NPStream *)p_value;
if (stream) {
StreamInstance *sip = STREAM_INSTANCE(stream);
if (sip)
stream_id = sip->stream_id;
}
return rpc_message_send_uint32(message, stream_id);
}
static int do_recv_NPStream(rpc_message_t *message, void *p_value)
{
int error;
uint32_t stream_id;
if ((error = rpc_message_recv_uint32(message, &stream_id)) < 0)
return error;
StreamInstance *stream = id_lookup(stream_id);
*((NPStream **)p_value) = stream ? stream->stream : NULL;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPByteRange objects
*/
static int do_send_NPByteRange(rpc_message_t *message, void *p_value)
{
NPByteRange *range = (NPByteRange *)p_value;
while (range) {
int error;
if ((error = rpc_message_send_uint32(message, 1)) < 0)
return error;
if ((error = rpc_message_send_int32(message, range->offset)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, range->length)) < 0)
return error;
range = range->next;
}
return rpc_message_send_uint32(message, 0);
}
static int do_recv_NPByteRange(rpc_message_t *message, void *p_value)
{
NPByteRange **rangeListPtr = (NPByteRange **)p_value;
if (rangeListPtr == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
*rangeListPtr = NULL;
for (;;) {
int error;
uint32_t cont;
if ((error = rpc_message_recv_uint32(message, &cont)) < 0)
return error;
if (!cont)
break;
NPByteRange *range = malloc(sizeof(*range));
if (range == NULL)
return RPC_ERROR_NO_MEMORY;
range->next = NULL;
if ((error = rpc_message_recv_int32(message, &range->offset)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &range->length)) < 0)
return error;
*rangeListPtr = range;
rangeListPtr = &range->next;
}
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPSavedData objects
*/
static int do_send_NPSavedData(rpc_message_t *message, void *p_value)
{
NPSavedData *save_area = (NPSavedData *)p_value;
int error;
if (save_area == NULL) {
if ((error = rpc_message_send_int32(message, 0)) < 0)
return error;
}
else {
if ((error = rpc_message_send_int32(message, save_area->len)) < 0)
return error;
if ((error = rpc_message_send_bytes(message, save_area->buf, save_area->len)) < 0)
return error;
}
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPSavedData(rpc_message_t *message, void *p_value)
{
NPSavedData *save_area;
int error;
int32_t len;
unsigned char *buf;
if ((error = rpc_message_recv_int32(message, &len)) < 0)
return error;
if (len == 0)
save_area = NULL;
else {
if ((save_area = malloc(sizeof(*save_area))) == NULL)
return RPC_ERROR_NO_MEMORY;
if ((buf = malloc(len)) == NULL)
return RPC_ERROR_NO_MEMORY;
if ((error = rpc_message_recv_bytes(message, buf, len)) < 0)
return error;
save_area->len = len;
save_area->buf = buf;
}
if (p_value)
*((NPSavedData **)p_value) = save_area;
else if (save_area) {
free(save_area->buf);
free(save_area);
}
return RPC_ERROR_NO_ERROR;
}
/*
* Process NotifyData objects
*/
// Rationale: NotifyData objects are allocated on the plugin side
// only. IDs are passed through to the browser, and they have no
// meaning on that side as they are only used to get passed back to
// the plugin side
//
// XXX 64-bit viewers in 32-bit wrappers are not supported
static int do_send_NotifyData(rpc_message_t *message, void *p_value)
{
void *notifyData = (void *)p_value;
return rpc_message_send_uint64(message, (uintptr_t)notifyData);
}
static int do_recv_NotifyData(rpc_message_t *message, void *p_value)
{
int error;
uint64_t id;
if ((error = rpc_message_recv_uint64(message, &id)) < 0)
return error;
if (sizeof(void *) == 4 && ((uint32_t)(id >> 32)) != 0) {
npw_printf("ERROR: 64-bit viewers in 32-bit wrappers are not supported\n");
abort();
}
*((void **)p_value) = (void *)(uintptr_t)id;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPRect objects
*/
static int do_send_NPRect(rpc_message_t *message, void *p_value)
{
NPRect *rect = (NPRect *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, rect->top)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, rect->left)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, rect->bottom)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, rect->right)) < 0)
return error;
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPRect(rpc_message_t *message, void *p_value)
{
NPRect *rect = (NPRect *)p_value;
uint32_t top, left, bottom, right;
int error;
if ((error = rpc_message_recv_uint32(message, &top)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &left)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &bottom)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &right)) < 0)
return error;
rect->top = top;
rect->left = left;
rect->bottom = bottom;
rect->right = right;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPWindow objects
*/
static int do_send_NPWindow(rpc_message_t *message, void *p_value)
{
NPWindow *window = (NPWindow *)p_value;
int error;
if (window == NULL) {
if ((error = rpc_message_send_uint32(message, 0)) < 0)
return error;
}
else {
if ((error = rpc_message_send_uint32(message, (Window)window->window)) < 0)
return error;
if ((error = rpc_message_send_int32(message, window->x)) < 0)
return error;
if ((error = rpc_message_send_int32(message, window->y)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, window->width)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, window->height)) < 0)
return error;
if ((error = do_send_NPRect(message, &window->clipRect)) < 0)
return error;
if ((error = rpc_message_send_int32(message, window->type)) < 0)
return error;
}
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPWindow(rpc_message_t *message, void *p_value)
{
NPWindow **window_p = (NPWindow **)p_value;
NPWindow *window;
uint32_t window_id;
int32_t window_type;
int error;
if ((error = rpc_message_recv_uint32(message, &window_id)) < 0)
return error;
*window_p = NULL;
if (window_id) {
if ((window = *window_p = malloc(sizeof(NPWindow))) == NULL)
return RPC_ERROR_NO_MEMORY;
if ((error = rpc_message_recv_int32(message, &window->x)) < 0)
return error;
if ((error = rpc_message_recv_int32(message, &window->y)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &window->width)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &window->height)) < 0)
return error;
if ((error = do_recv_NPRect(message, &window->clipRect)) < 0)
return error;
if ((error = rpc_message_recv_int32(message, &window_type)) < 0)
return error;
window->type = window_type;
window->ws_info = NULL; // to be filled in by the plugin
window->window = (void *)(Window)window_id;
}
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPFullPrint objects
*/
static int do_send_NPFullPrint(rpc_message_t *message, void *p_value)
{
NPFullPrint *fullPrint = (NPFullPrint *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, fullPrint->pluginPrinted)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, fullPrint->printOne)) < 0)
return error;
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPFullPrint(rpc_message_t *message, void *p_value)
{
NPFullPrint *fullPrint = (NPFullPrint *)p_value;
uint32_t pluginPrinted, printOne;
int error;
if ((error = rpc_message_recv_uint32(message, &pluginPrinted)) < 0)
return error;
if ((error = rpc_message_recv_uint32(message, &printOne)) < 0)
return error;
fullPrint->pluginPrinted = pluginPrinted;
fullPrint->printOne = printOne;
fullPrint->platformPrint = NULL; // to be filled in by the plugin
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPEmbedPrint objects
*/
static int do_send_NPEmbedPrint(rpc_message_t *message, void *p_value)
{
NPEmbedPrint *embedPrint = (NPEmbedPrint *)p_value;
int error;
if ((error = do_send_NPWindow(message, &embedPrint->window)) < 0)
return error;
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPEmbedPrint(rpc_message_t *message, void *p_value)
{
NPEmbedPrint *embedPrint = (NPEmbedPrint *)p_value;
int error;
if ((error = do_recv_NPWindow(message, &embedPrint->window)) < 0)
return error;
embedPrint->platformPrint = NULL; // to be filled in by the plugin
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPPrint objects
*/
static int do_send_NPPrint(rpc_message_t *message, void *p_value)
{
NPPrint *printInfo = (NPPrint *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, printInfo->mode)) < 0)
return error;
switch (printInfo->mode) {
case NP_FULL:
if ((error = do_send_NPFullPrint(message, &printInfo->print.fullPrint)) < 0)
return error;
break;
case NP_EMBED:
if ((error = do_send_NPEmbedPrint(message, &printInfo->print.embedPrint)) < 0)
return error;
break;
default:
return RPC_ERROR_GENERIC;
}
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPPrint(rpc_message_t *message, void *p_value)
{
NPPrint *printInfo = (NPPrint *)p_value;
uint32_t print_mode;
int error;
if ((error = rpc_message_recv_uint32(message, &print_mode)) < 0)
return error;
switch (print_mode) {
case NP_FULL:
if ((error = do_recv_NPFullPrint(message, &printInfo->print.fullPrint)) < 0)
return error;
break;
case NP_EMBED:
if ((error = do_recv_NPEmbedPrint(message, &printInfo->print.embedPrint)) < 0)
return error;
break;
default:
return RPC_ERROR_GENERIC;
}
printInfo->mode = print_mode;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPPrintData objects
*/
static int do_send_NPPrintData(rpc_message_t *message, void *p_value)
{
NPPrintData *printData = (NPPrintData *)p_value;
int error;
if ((error = rpc_message_send_uint32(message, printData->size)) < 0)
return error;
if ((error = rpc_message_send_bytes(message, printData->data, printData->size)) < 0)
return error;
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPPrintData(rpc_message_t *message, void *p_value)
{
NPPrintData *printData = (NPPrintData *)p_value;
int error;
if ((error = rpc_message_recv_uint32(message, &printData->size)) < 0)
return error;
if ((error = rpc_message_recv_bytes(message, printData->data, printData->size)) < 0)
return error;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPObject objects
*/
// XXX propagate reference counters?
static int do_send_NPObject(rpc_message_t *message, void *p_value)
{
uint32_t npobj_id = 0;
NPObject *npobj = (NPObject *)p_value;
if (npobj) {
NPObjectInfo *npobj_info = npobject_info_lookup(npobj);
if (npobj_info)
npobj_id = npobj_info->npobj_id;
#ifdef BUILD_WRAPPER
else {
// create a new mapping (browser-side)
if ((npobj_info = npobject_info_new(npobj)) == NULL)
return RPC_ERROR_NO_MEMORY;
npobj_id = npobj_info->npobj_id;
npobject_associate(npobj, npobj_info);
}
#endif
assert(npobj_id != 0);
}
return rpc_message_send_uint32(message, npobj_id);
}
static int do_recv_NPObject(rpc_message_t *message, void *p_value)
{
int error;
uint32_t npobj_id;
if ((error = rpc_message_recv_uint32(message, &npobj_id)) < 0)
return error;
NPObject *npobj = NULL;
if (npobj_id) {
npobj = npobject_lookup(npobj_id);
#ifdef BUILD_VIEWER
// create a new mapping (plugin-side)
if (npobj == NULL) {
if ((npobj = npobject_new(npobj_id, NULL, NULL)) == NULL)
return RPC_ERROR_NO_MEMORY;
}
#endif
assert(npobj != NULL);
}
*((NPObject **)p_value) = npobj;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPIdentifier objects
*/
// Rationale: NPIdentifiers are allocated on the browser side
// only. IDs are passed through to the viewer, and they have no
// meaning on that side as they are only used to get passed back to
// the browser side
static int do_send_NPIdentifier(rpc_message_t *message, void *p_value)
{
NPIdentifier ident = (NPIdentifier)p_value;
int id = 0;
if (ident) {
#ifdef BUILD_WRAPPER
id = id_lookup_value(ident);
if (id < 0)
id = id_create(ident);
#endif
#ifdef BUILD_VIEWER
id = (uintptr_t)ident;
#endif
assert(id != 0);
}
return rpc_message_send_uint32(message, id);
}
static int do_recv_NPIdentifier(rpc_message_t *message, void *p_value)
{
int error;
uint32_t id;
if ((error = rpc_message_recv_uint32(message, &id)) < 0)
return error;
NPIdentifier ident = NULL;
if (id) {
#ifdef BUILD_WRAPPER
ident = id_lookup(id);
#endif
#ifdef BUILD_VIEWER
ident = (void *)(uintptr_t)id;
#endif
assert(ident != NULL);
}
*((NPIdentifier *)p_value) = ident;
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPString objects
*/
static int do_send_NPString(rpc_message_t *message, void *p_value)
{
NPString *string = (NPString *)p_value;
if (string == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
int error = rpc_message_send_uint32(message, string->utf8length);
if (error < 0)
return error;
if (string->utf8length && string->utf8characters)
return rpc_message_send_bytes(message, (unsigned char *)string->utf8characters, string->utf8length);
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPString(rpc_message_t *message, void *p_value)
{
NPString *string = (NPString *)p_value;
if (string == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
string->utf8length = 0;
string->utf8characters = NULL;
int error = rpc_message_recv_uint32(message, &string->utf8length);
if (error < 0)
return error;
if (string->utf8length > 0) {
// calloc() will make the string nul-terminated, even if utf8characters is a const NPUTF8 *
if ((string->utf8characters = calloc(1, string->utf8length + 1)) == NULL)
return RPC_ERROR_NO_MEMORY;
if ((error = rpc_message_recv_bytes(message, (unsigned char *)string->utf8characters, string->utf8length)) < 0)
return error;
}
return RPC_ERROR_NO_ERROR;
}
/*
* Process NPVariant objects
*/
static int do_send_NPVariant(rpc_message_t *message, void *p_value)
{
NPVariant *variant = (NPVariant *)p_value;
if (variant == NULL)
return RPC_ERROR_MESSAGE_ARGUMENT_INVALID;
int error = rpc_message_send_uint32(message, variant->type);
if (error < 0)
return error;
switch (variant->type) {
case NPVariantType_Void:
case NPVariantType_Null:
// nothing to do (initialized in receiver)
break;
case NPVariantType_Bool:
if ((error = rpc_message_send_uint32(message, variant->value.boolValue)) < 0)
return error;
break;
case NPVariantType_Int32:
if ((error = rpc_message_send_uint32(message, variant->value.intValue)) < 0)
return error;
break;
case NPVariantType_Double:
if ((error = rpc_message_send_double(message, variant->value.doubleValue)) < 0)
return error;
break;
case NPVariantType_String:
if ((error = do_send_NPString(message, &variant->value.stringValue)) < 0)
return error;
break;
case NPVariantType_Object:
if ((error = do_send_NPObject(message, variant->value.objectValue)) < 0)
return error;
break;
}
return RPC_ERROR_NO_ERROR;
}
static int do_recv_NPVariant(rpc_message_t *message, void *p_value)
{
NPVariant *variant = (NPVariant *)p_value;
if (variant)
VOID_TO_NPVARIANT(*variant);
uint32_t type;
int error = rpc_message_recv_uint32(message, &type);
if (error < 0)
return error;
NPVariant result;
VOID_TO_NPVARIANT(result);
switch (type) {
case NPVariantType_Void:
VOID_TO_NPVARIANT(result);
break;
case NPVariantType_Null:
NULL_TO_NPVARIANT(result);
break;
case NPVariantType_Bool: {
uint32_t value;
if ((error = rpc_message_recv_uint32(message, &value)) < 0)
return error;
result.value.boolValue = value;
break;
}
case NPVariantType_Int32:
if ((error = rpc_message_recv_uint32(message, &result.value.intValue)) < 0)
return error;
break;
case NPVariantType_Double:
if ((error = rpc_message_recv_double(message, &result.value.doubleValue)) < 0)
return error;
break;
case NPVariantType_String:
if ((error = do_recv_NPString(message, &result.value.stringValue)) < 0)
return error;
break;
case NPVariantType_Object:
if ((error = do_recv_NPObject(message, &result.value.objectValue)) < 0)
return error;
break;
}
if (variant) {
*variant = result;
variant->type = type;
}
return RPC_ERROR_NO_ERROR;
}
/*
* Initialize marshalers for NPAPI types
*/
static const rpc_message_descriptor_t message_descs[] = {
{
RPC_TYPE_NPP,
sizeof(NPP),
do_send_NPP,
do_recv_NPP
},
{
RPC_TYPE_NP_STREAM,
sizeof(NPStream *),
do_send_NPStream,
do_recv_NPStream
},
{
RPC_TYPE_NP_BYTE_RANGE,
sizeof(NPByteRange *),
do_send_NPByteRange,
do_recv_NPByteRange
},
{
RPC_TYPE_NP_SAVED_DATA,
sizeof(NPSavedData *),
do_send_NPSavedData,
do_recv_NPSavedData
},
{
RPC_TYPE_NP_NOTIFY_DATA,
sizeof(void *),
do_send_NotifyData,
do_recv_NotifyData
},
{
RPC_TYPE_NP_RECT,
sizeof(NPRect),
do_send_NPRect,
do_recv_NPRect
},
{
RPC_TYPE_NP_WINDOW,
sizeof(NPWindow *),
do_send_NPWindow,
do_recv_NPWindow
},
{
RPC_TYPE_NP_PRINT,
sizeof(NPPrint),
do_send_NPPrint,
do_recv_NPPrint
},
{
RPC_TYPE_NP_FULL_PRINT,
sizeof(NPFullPrint),
do_send_NPFullPrint,
do_recv_NPFullPrint
},
{
RPC_TYPE_NP_EMBED_PRINT,
sizeof(NPEmbedPrint),
do_send_NPEmbedPrint,
do_recv_NPEmbedPrint
},
{
RPC_TYPE_NP_PRINT_DATA,
sizeof(NPPrintData),
do_send_NPPrintData,
do_recv_NPPrintData
},
{
RPC_TYPE_NP_OBJECT,
sizeof(NPObject *),
do_send_NPObject,
do_recv_NPObject
},
{
RPC_TYPE_NP_IDENTIFIER,
sizeof(NPIdentifier),
do_send_NPIdentifier,
do_recv_NPIdentifier
},
{
RPC_TYPE_NP_STRING,
sizeof(NPString),
do_send_NPString,
do_recv_NPString
},
{
RPC_TYPE_NP_VARIANT,
sizeof(NPVariant),
do_send_NPVariant,
do_recv_NPVariant
}
};
int rpc_add_np_marshalers(void)
{
return rpc_message_add_callbacks(message_descs, sizeof(message_descs) / sizeof(message_descs[0]));
}

116
src/npw-rpc.h Normal file
View File

@ -0,0 +1,116 @@
/*
* npw-rpc.h - Remote Procedure Calls (NPAPI specialisation)
*
* nspluginwrapper (C) 2005-2006 Gwenole Beauchesne
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef NPW_RPC_H
#define NPW_RPC_H
// NPAPI methods
enum {
RPC_METHOD_NP_GET_VALUE = 1,
RPC_METHOD_NP_GET_MIME_DESCRIPTION,
RPC_METHOD_NP_INITIALIZE,
RPC_METHOD_NP_SHUTDOWN,
RPC_METHOD_NP_EXIT,
RPC_METHOD_NPN_USER_AGENT,
RPC_METHOD_NPN_GET_VALUE,
RPC_METHOD_NPN_GET_URL,
RPC_METHOD_NPN_GET_URL_NOTIFY,
RPC_METHOD_NPN_POST_URL,
RPC_METHOD_NPN_POST_URL_NOTIFY,
RPC_METHOD_NPN_STATUS,
RPC_METHOD_NPN_PRINT_DATA,
RPC_METHOD_NPN_REQUEST_READ,
RPC_METHOD_NPP_NEW,
RPC_METHOD_NPP_DESTROY,
RPC_METHOD_NPP_SET_WINDOW,
RPC_METHOD_NPP_GET_VALUE,
RPC_METHOD_NPP_URL_NOTIFY,
RPC_METHOD_NPP_NEW_STREAM,
RPC_METHOD_NPP_DESTROY_STREAM,
RPC_METHOD_NPP_WRITE_READY,
RPC_METHOD_NPP_WRITE,
RPC_METHOD_NPP_STREAM_AS_FILE,
RPC_METHOD_NPP_PRINT,
RPC_METHOD_NPN_CREATE_OBJECT,
RPC_METHOD_NPN_RETAIN_OBJECT,
RPC_METHOD_NPN_RELEASE_OBJECT,
RPC_METHOD_NPN_INVOKE,
RPC_METHOD_NPN_INVOKE_DEFAULT,
RPC_METHOD_NPN_EVALUATE,
RPC_METHOD_NPN_GET_PROPERTY,
RPC_METHOD_NPN_SET_PROPERTY,
RPC_METHOD_NPN_REMOVE_PROPERTY,
RPC_METHOD_NPN_HAS_PROPERTY,
RPC_METHOD_NPN_HAS_METHOD,
RPC_METHOD_NPN_SET_EXCEPTION,
RPC_METHOD_NPN_GET_STRING_IDENTIFIER,
RPC_METHOD_NPN_GET_STRING_IDENTIFIERS,
RPC_METHOD_NPN_GET_INT_IDENTIFIER,
RPC_METHOD_NPN_IDENTIFIER_IS_STRING,
RPC_METHOD_NPN_UTF8_FROM_IDENTIFIER,
RPC_METHOD_NPN_INT_FROM_IDENTIFIER,
RPC_METHOD_NPCLASS_INVALIDATE,
RPC_METHOD_NPCLASS_HAS_METHOD,
RPC_METHOD_NPCLASS_INVOKE,
RPC_METHOD_NPCLASS_INVOKE_DEFAULT,
RPC_METHOD_NPCLASS_HAS_PROPERTY,
RPC_METHOD_NPCLASS_GET_PROPERTY,
RPC_METHOD_NPCLASS_SET_PROPERTY,
RPC_METHOD_NPCLASS_REMOVE_PROPERTY,
};
// NPAPI data types
enum {
RPC_TYPE_NPP = 1,
RPC_TYPE_NP_STREAM,
RPC_TYPE_NP_BYTE_RANGE,
RPC_TYPE_NP_SAVED_DATA,
RPC_TYPE_NP_NOTIFY_DATA,
RPC_TYPE_NP_RECT,
RPC_TYPE_NP_WINDOW,
RPC_TYPE_NP_PRINT,
RPC_TYPE_NP_FULL_PRINT,
RPC_TYPE_NP_EMBED_PRINT,
RPC_TYPE_NP_PRINT_DATA,
RPC_TYPE_NP_OBJECT,
RPC_TYPE_NP_IDENTIFIER,
RPC_TYPE_NP_STRING,
RPC_TYPE_NP_VARIANT,
};
// NPPrintData is used to get the plugin printed tmpfile
typedef struct _NPPrintData {
uint32_t size;
uint8_t data[4096];
} NPPrintData;
// Initialize marshalers for NS4 plugin types
extern int rpc_add_np_marshalers(void) attribute_hidden;
// RPC types
extern int rpc_type_of_NPNVariable(int variable) attribute_hidden;
extern int rpc_type_of_NPPVariable(int variable) attribute_hidden;
#endif /* NPW_RPC_H */

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