Changeset - bc383c25c970
[Not reviewed]
default
! ! !
Michael Guravage - 15 years ago 2010-06-18 14:02:50
michael.guravage@cwi.nl
Moved the Windows LIBXML2, LIBICONV and LIBZ libraries into the
destribtion, and changed the various project files accordingly.

--
user: Michael Guravage <michael.guravage@cwi.nl>
branch 'default'
added lib/libiconv/include/iconv.h
added lib/libiconv/include/libcharset.h
added lib/libiconv/include/localcharset.h
added lib/libiconv/lib/charset.alias
added lib/libiconv/lib/libcharset.la
added lib/libiconv/lib/libiconv.la
added lib/libiconv/share/doc/libiconv/COPYING
added lib/libiconv/share/doc/libiconv/COPYING.LIB
added lib/libiconv/share/doc/libiconv/NEWS
added lib/libiconv/share/doc/libiconv/NOTES
added lib/libxml2/include/libxml/DOCBparser.h
added lib/libxml2/include/libxml/HTMLparser.h
added lib/libxml2/include/libxml/HTMLtree.h
added lib/libxml2/include/libxml/SAX.h
added lib/libxml2/include/libxml/SAX2.h
added lib/libxml2/include/libxml/c14n.h
added lib/libxml2/include/libxml/catalog.h
added lib/libxml2/include/libxml/chvalid.h
added lib/libxml2/include/libxml/debugXML.h
added lib/libxml2/include/libxml/dict.h
added lib/libxml2/include/libxml/encoding.h
added lib/libxml2/include/libxml/entities.h
added lib/libxml2/include/libxml/globals.h
added lib/libxml2/include/libxml/hash.h
added lib/libxml2/include/libxml/list.h
added lib/libxml2/include/libxml/nanoftp.h
added lib/libxml2/include/libxml/nanohttp.h
added lib/libxml2/include/libxml/parser.h
added lib/libxml2/include/libxml/parserInternals.h
added lib/libxml2/include/libxml/pattern.h
added lib/libxml2/include/libxml/relaxng.h
added lib/libxml2/include/libxml/schemasInternals.h
added lib/libxml2/include/libxml/schematron.h
added lib/libxml2/include/libxml/threads.h
added lib/libxml2/include/libxml/tree.h
added lib/libxml2/include/libxml/uri.h
added lib/libxml2/include/libxml/valid.h
added lib/libxml2/include/libxml/xinclude.h
added lib/libxml2/include/libxml/xlink.h
added lib/libxml2/include/libxml/xmlIO.h
added lib/libxml2/include/libxml/xmlautomata.h
added lib/libxml2/include/libxml/xmlerror.h
added lib/libxml2/include/libxml/xmlexports.h
added lib/libxml2/include/libxml/xmlmemory.h
added lib/libxml2/include/libxml/xmlmodule.h
added lib/libxml2/include/libxml/xmlreader.h
added lib/libxml2/include/libxml/xmlregexp.h
added lib/libxml2/include/libxml/xmlsave.h
added lib/libxml2/include/libxml/xmlschemas.h
added lib/libxml2/include/libxml/xmlschemastypes.h
added lib/libxml2/include/libxml/xmlstring.h
added lib/libxml2/include/libxml/xmlunicode.h
added lib/libxml2/include/libxml/xmlversion.h
added lib/libxml2/include/libxml/xmlwin32version.h
added lib/libxml2/include/libxml/xmlwriter.h
added lib/libxml2/include/libxml/xpath.h
added lib/libxml2/include/libxml/xpathInternals.h
added lib/libxml2/include/libxml/xpointer.h
added lib/libxml2/lib/libxml2.dll
added lib/libxml2/lib/libxml2.lib
added lib/libz/include/zconf.h
added lib/libz/include/zlib.h
changed src/ChangeLog
changed src/Makefile
changed src/VirtualLeaf.pro
changed src/build_models/ChangeLog
changed src/build_models/Makefile
changed src/build_models/plugin_auxingrowth.pro
changed src/build_models/plugin_meinhardt.pro
changed src/build_models/plugin_test.pro
changed src/libplugin.pro
28 files changed:
0 comments (0 inline, 0 general)
lib/libiconv/include/iconv.h
Show inline comments
 
new file 100755
 
/* Copyright (C) 1999-2003, 2005-2006, 2008-2009 Free Software Foundation, Inc.
 
   This file is part of the GNU LIBICONV Library.
 

	
 
   The GNU LIBICONV Library is free software; you can redistribute it
 
   and/or modify it under the terms of the GNU Library General Public
 
   License as published by the Free Software Foundation; either version 2
 
   of the License, or (at your option) any later version.
 

	
 
   The GNU LIBICONV 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
 
   Library General Public License for more details.
 

	
 
   You should have received a copy of the GNU Library General Public
 
   License along with the GNU LIBICONV Library; see the file COPYING.LIB.
 
   If not, write to the Free Software Foundation, Inc., 51 Franklin Street,
 
   Fifth Floor, Boston, MA 02110-1301, USA.  */
 

	
 
/* When installed, this file is called "iconv.h". */
 

	
 
#ifndef _LIBICONV_H
 
#define _LIBICONV_H
 

	
 
#define _LIBICONV_VERSION 0x010D    /* version number: (major<<8) + minor */
 
extern __declspec (dllimport) int _libiconv_version; /* Likewise */
 

	
 
/* We would like to #include any system header file which could define
 
   iconv_t, 1. in order to eliminate the risk that the user gets compilation
 
   errors because some other system header file includes /usr/include/iconv.h
 
   which defines iconv_t or declares iconv after this file, 2. when compiling
 
   for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
 
   binary compatible code.
 
   But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
 
   has been installed in /usr/local/include, there is no way any more to
 
   include the original /usr/include/iconv.h. We simply have to get away
 
   without it.
 
   Ad 1. The risk that a system header file does
 
   #include "iconv.h"  or  #include_next "iconv.h"
 
   is small. They all do #include <iconv.h>.
 
   Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
 
   has to be a scalar type because (iconv_t)(-1) is a possible return value
 
   from iconv_open().) */
 

	
 
/* Define iconv_t ourselves. */
 
#undef iconv_t
 
#define iconv_t libiconv_t
 
typedef void* iconv_t;
 

	
 
/* Get size_t declaration.
 
   Get wchar_t declaration if it exists. */
 
#include <stddef.h>
 

	
 
/* Get errno declaration and values. */
 
#include <errno.h>
 
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
 
   have EILSEQ in a different header.  On these systems, define EILSEQ
 
   ourselves. */
 
#ifndef EILSEQ
 
#define EILSEQ 
 
#endif
 

	
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 

	
 
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
 
   encoding ‘tocode’. */
 
#ifndef LIBICONV_PLUG
 
#define iconv_open libiconv_open
 
#endif
 
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
 

	
 
/* Converts, using conversion descriptor ‘cd’, at most ‘*inbytesleft’ bytes
 
   starting at ‘*inbuf’, writing at most ‘*outbytesleft’ bytes starting at
 
   ‘*outbuf’.
 
   Decrements ‘*inbytesleft’ and increments ‘*inbuf’ by the same amount.
 
   Decrements ‘*outbytesleft’ and increments ‘*outbuf’ by the same amount. */
 
#ifndef LIBICONV_PLUG
 
#define iconv libiconv
 
#endif
 
extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
 

	
 
/* Frees resources allocated for conversion descriptor ‘cd’. */
 
#ifndef LIBICONV_PLUG
 
#define iconv_close libiconv_close
 
#endif
 
extern int iconv_close (iconv_t cd);
 

	
 

	
 
#ifndef LIBICONV_PLUG
 

	
 
/* Nonstandard extensions. */
 

	
 
#if 1
 
#if 0
 
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
 
   <wchar.h>.
 
   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
 
   included before <wchar.h>.  */
 
#include <stddef.h>
 
#include <stdio.h>
 
#include <time.h>
 
#endif
 
#include <wchar.h>
 
#endif
 

	
 
/* A type that holds all memory needed by a conversion descriptor.
 
   A pointer to such an object can be used as an iconv_t. */
 
typedef struct {
 
  void* dummy1[28];
 
#if 1
 
  mbstate_t dummy2;
 
#endif
 
} iconv_allocation_t;
 

	
 
/* Allocates descriptor for code conversion from encoding ‘fromcode’ to
 
   encoding ‘tocode’ into preallocated memory. Returns an error indicator
 
   (0 or -1 with errno set). */
 
#define iconv_open_into libiconv_open_into
 
extern int iconv_open_into (const char* tocode, const char* fromcode,
 
                            iconv_allocation_t* resultp);
 

	
 
/* Control of attributes. */
 
#define iconvctl libiconvctl
 
extern int iconvctl (iconv_t cd, int request, void* argument);
 

	
 
/* Hook performed after every successful conversion of a Unicode character. */
 
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
 
/* Hook performed after every successful conversion of a wide character. */
 
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
 
/* Set of hooks. */
 
struct iconv_hooks {
 
  iconv_unicode_char_hook uc_hook;
 
  iconv_wide_char_hook wc_hook;
 
  void* data;
 
};
 

	
 
/* Fallback function.  Invoked when a small number of bytes could not be
 
   converted to a Unicode character.  This function should process all
 
   bytes from inbuf and may produce replacement Unicode characters by calling
 
   the write_replacement callback repeatedly.  */
 
typedef void (*iconv_unicode_mb_to_uc_fallback)
 
             (const char* inbuf, size_t inbufsize,
 
              void (*write_replacement) (const unsigned int *buf, size_t buflen,
 
                                         void* callback_arg),
 
              void* callback_arg,
 
              void* data);
 
/* Fallback function.  Invoked when a Unicode character could not be converted
 
   to the target encoding.  This function should process the character and
 
   may produce replacement bytes (in the target encoding) by calling the
 
   write_replacement callback repeatedly.  */
 
typedef void (*iconv_unicode_uc_to_mb_fallback)
 
             (unsigned int code,
 
              void (*write_replacement) (const char *buf, size_t buflen,
 
                                         void* callback_arg),
 
              void* callback_arg,
 
              void* data);
 
#if 1
 
/* Fallback function.  Invoked when a number of bytes could not be converted to
 
   a wide character.  This function should process all bytes from inbuf and may
 
   produce replacement wide characters by calling the write_replacement
 
   callback repeatedly.  */
 
typedef void (*iconv_wchar_mb_to_wc_fallback)
 
             (const char* inbuf, size_t inbufsize,
 
              void (*write_replacement) (const wchar_t *buf, size_t buflen,
 
                                         void* callback_arg),
 
              void* callback_arg,
 
              void* data);
 
/* Fallback function.  Invoked when a wide character could not be converted to
 
   the target encoding.  This function should process the character and may
 
   produce replacement bytes (in the target encoding) by calling the
 
   write_replacement callback repeatedly.  */
 
typedef void (*iconv_wchar_wc_to_mb_fallback)
 
             (wchar_t code,
 
              void (*write_replacement) (const char *buf, size_t buflen,
 
                                         void* callback_arg),
 
              void* callback_arg,
 
              void* data);
 
#else
 
/* If the wchar_t type does not exist, these two fallback functions are never
 
   invoked.  Their argument list therefore does not matter.  */
 
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
 
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
 
#endif
 
/* Set of fallbacks. */
 
struct iconv_fallbacks {
 
  iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
 
  iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
 
  iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
 
  iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
 
  void* data;
 
};
 

	
 
/* Requests for iconvctl. */
 
#define ICONV_TRIVIALP            0  /* int *argument */
 
#define ICONV_GET_TRANSLITERATE   1  /* int *argument */
 
#define ICONV_SET_TRANSLITERATE   2  /* const int *argument */
 
#define ICONV_GET_DISCARD_ILSEQ   3  /* int *argument */
 
#define ICONV_SET_DISCARD_ILSEQ   4  /* const int *argument */
 
#define ICONV_SET_HOOKS           5  /* const struct iconv_hooks *argument */
 
#define ICONV_SET_FALLBACKS       6  /* const struct iconv_fallbacks *argument */
 

	
 
/* Listing of locale independent encodings. */
 
#define iconvlist libiconvlist
 
extern void iconvlist (int (*do_one) (unsigned int namescount,
 
                                      const char * const * names,
 
                                      void* data),
 
                       void* data);
 

	
 
/* Canonicalize an encoding name.
 
   The result is either a canonical encoding name, or name itself. */
 
extern const char * iconv_canonicalize (const char * name);
 

	
 
/* Support for relocatable packages.  */
 

	
 
/* Sets the original and the current installation prefix of the package.
 
   Relocation simply replaces a pathname starting with the original prefix
 
   by the corresponding pathname with the current prefix instead.  Both
 
   prefixes should be directory names without trailing slash (i.e. use ""
 
   instead of "/").  */
 
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
 
					    const char *curr_prefix);
 

	
 
#endif
 

	
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 

	
 
#endif /* _LIBICONV_H */
lib/libiconv/include/libcharset.h
Show inline comments
 
new file 100755
 
/* Copyright (C) 2003 Free Software Foundation, Inc.
 
   This file is part of the GNU CHARSET Library.
 

	
 
   The GNU CHARSET Library is free software; you can redistribute it and/or
 
   modify it under the terms of the GNU Library General Public License as
 
   published by the Free Software Foundation; either version 2 of the
 
   License, or (at your option) any later version.
 

	
 
   The GNU CHARSET 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
 
   Library General Public License for more details.
 

	
 
   You should have received a copy of the GNU Library General Public License
 
   along with the GNU CHARSET Library; see the file COPYING.LIB.  If not,
 
   write to the Free Software Foundation, Inc., 51 Franklin Street,
 
   Fifth Floor, Boston, MA 02110-1301, USA.  */
 

	
 
#ifndef _LIBCHARSET_H
 
#define _LIBCHARSET_H
 

	
 
#include <localcharset.h>
 

	
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 

	
 
/* Support for relocatable packages.  */
 

	
 
/* Sets the original and the current installation prefix of the package.
 
   Relocation simply replaces a pathname starting with the original prefix
 
   by the corresponding pathname with the current prefix instead.  Both
 
   prefixes should be directory names without trailing slash (i.e. use ""
 
   instead of "/").  */
 
extern void libcharset_set_relocation_prefix (const char *orig_prefix,
 
					      const char *curr_prefix);
 

	
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 

	
 
#endif /* _LIBCHARSET_H */
lib/libiconv/include/localcharset.h
Show inline comments
 
new file 100755
 
/* Determine a canonical name for the current locale's character encoding.
 
   Copyright (C) 2000-2003 Free Software Foundation, Inc.
 
   This file is part of the GNU CHARSET Library.
 

	
 
   This program is free software; you can redistribute it and/or modify it
 
   under the terms of the GNU Library General Public License as published
 
   by the Free Software Foundation; either version 2, or (at your option)
 
   any later version.
 

	
 
   This program is distributed in the hope that it will be useful,
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
   Library General Public License for more details.
 

	
 
   You should have received a copy of the GNU Library General Public
 
   License along with this program; if not, write to the Free Software
 
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
 
   USA.  */
 

	
 
#ifndef _LOCALCHARSET_H
 
#define _LOCALCHARSET_H
 

	
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 

	
 
/* Determine the current locale's character encoding, and canonicalize it
 
   into one of the canonical names listed in config.charset.
 
   The result must not be freed; it is statically allocated.
 
   If the canonical name cannot be determined, the result is a non-canonical
 
   name.  */
 
extern const char * locale_charset (void);
 

	
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 

	
 
#endif /* _LOCALCHARSET_H */
lib/libiconv/lib/charset.alias
Show inline comments
 
new file 100755
 
# This file contains a table of character encoding aliases,
 
# suitable for operating system 'mingw32'.
 
# It was automatically generated from config.charset.
 
# Packages using this file:  
lib/libiconv/lib/libcharset.la
Show inline comments
 
new file 100755
 
# libcharset.la - a libtool library file
 
# Generated by ltmain.sh (GNU libtool) 2.2.6
 
#
 
# Please DO NOT delete this file!
 
# It is necessary for linking the library.
 

	
 
# The name that we can dlopen(3).
 
dlname='../bin/libcharset-1.dll'
 

	
 
# Names of this library.
 
library_names='libcharset.dll.a'
 

	
 
# The name of the static archive.
 
old_library='libcharset.a'
 

	
 
# Linker flags that can not go in dependency_libs.
 
inherited_linker_flags=''
 

	
 
# Libraries that this one depends upon.
 
dependency_libs=''
 

	
 
# Names of additional weak libraries provided by this library
 
weak_library_names=''
 

	
 
# Version information for libcharset.
 
current=1
 
age=0
 
revision=0
 

	
 
# Is this an already installed library?
 
installed=yes
 

	
 
# Should we warn about portability when linking against -modules?
 
shouldnotlink=no
 

	
 
# Files to dlopen/dlpreopen
 
dlopen=''
 
dlpreopen=''
 

	
 
# Directory that this library needs to be installed in:
 
libdir='c:/mingw/lib'
lib/libiconv/lib/libiconv.la
Show inline comments
 
new file 100755
 
# libiconv.la - a libtool library file
 
# Generated by ltmain.sh (GNU libtool) 2.2.6
 
#
 
# Please DO NOT delete this file!
 
# It is necessary for linking the library.
 

	
 
# The name that we can dlopen(3).
 
dlname='../bin/libiconv-2.dll'
 

	
 
# Names of this library.
 
library_names='libiconv.dll.a'
 

	
 
# The name of the static archive.
 
old_library=''
 

	
 
# Linker flags that can not go in dependency_libs.
 
inherited_linker_flags=''
 

	
 
# Libraries that this one depends upon.
 
dependency_libs=''
 

	
 
# Names of additional weak libraries provided by this library
 
weak_library_names=''
 

	
 
# Version information for libiconv.
 
current=7
 
age=5
 
revision=0
 

	
 
# Is this an already installed library?
 
installed=yes
 

	
 
# Should we warn about portability when linking against -modules?
 
shouldnotlink=no
 

	
 
# Files to dlopen/dlpreopen
 
dlopen=''
 
dlpreopen=''
 

	
 
# Directory that this library needs to be installed in:
 
libdir='c:/mingw/lib'
lib/libiconv/share/doc/libiconv/COPYING
Show inline comments
 
new file 100755
 
                    GNU GENERAL PUBLIC LICENSE
 
                       Version 3, 29 June 2007
 

	
 
 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 
 Everyone is permitted to copy and distribute verbatim copies
 
 of this license document, but changing it is not allowed.
 

	
 
                            Preamble
 

	
 
  The GNU General Public License is a free, copyleft license for
 
software and other kinds of works.
 

	
 
  The licenses for most software and other practical works are designed
 
to take away your freedom to share and change the works.  By contrast,
 
the GNU General Public License is intended to guarantee your freedom to
 
share and change all versions of a program--to make sure it remains free
 
software for all its users.  We, the Free Software Foundation, use the
 
GNU General Public License for most of our software; it applies also to
 
any other work released this way by its authors.  You can apply it to
 
your programs, too.
 

	
 
  When we speak of free software, we are referring to freedom, not
 
price.  Our General Public Licenses are designed to make sure that you
 
have the freedom to distribute copies of free software (and charge for
 
them if you wish), that you receive source code or can get it if you
 
want it, that you can change the software or use pieces of it in new
 
free programs, and that you know you can do these things.
 

	
 
  To protect your rights, we need to prevent others from denying you
 
these rights or asking you to surrender the rights.  Therefore, you have
 
certain responsibilities if you distribute copies of the software, or if
 
you modify it: responsibilities to respect the freedom of others.
 

	
 
  For example, if you distribute copies of such a program, whether
 
gratis or for a fee, you must pass on to the recipients the same
 
freedoms that you received.  You must make sure that they, too, receive
 
or can get the source code.  And you must show them these terms so they
 
know their rights.
 

	
 
  Developers that use the GNU GPL protect your rights with two steps:
 
(1) assert copyright on the software, and (2) offer you this License
 
giving you legal permission to copy, distribute and/or modify it.
 

	
 
  For the developers' and authors' protection, the GPL clearly explains
 
that there is no warranty for this free software.  For both users' and
 
authors' sake, the GPL requires that modified versions be marked as
 
changed, so that their problems will not be attributed erroneously to
 
authors of previous versions.
 

	
 
  Some devices are designed to deny users access to install or run
 
modified versions of the software inside them, although the manufacturer
 
can do so.  This is fundamentally incompatible with the aim of
 
protecting users' freedom to change the software.  The systematic
 
pattern of such abuse occurs in the area of products for individuals to
 
use, which is precisely where it is most unacceptable.  Therefore, we
 
have designed this version of the GPL to prohibit the practice for those
 
products.  If such problems arise substantially in other domains, we
 
stand ready to extend this provision to those domains in future versions
 
of the GPL, as needed to protect the freedom of users.
 

	
 
  Finally, every program is threatened constantly by software patents.
 
States should not allow patents to restrict development and use of
 
software on general-purpose computers, but in those that do, we wish to
 
avoid the special danger that patents applied to a free program could
 
make it effectively proprietary.  To prevent this, the GPL assures that
 
patents cannot be used to render the program non-free.
 

	
 
  The precise terms and conditions for copying, distribution and
 
modification follow.
 

	
 
                       TERMS AND CONDITIONS
 

	
 
  0. Definitions.
 

	
 
  "This License" refers to version 3 of the GNU General Public License.
 

	
 
  "Copyright" also means copyright-like laws that apply to other kinds of
 
works, such as semiconductor masks.
 

	
 
  "The Program" refers to any copyrightable work licensed under this
 
License.  Each licensee is addressed as "you".  "Licensees" and
 
"recipients" may be individuals or organizations.
 

	
 
  To "modify" a work means to copy from or adapt all or part of the work
 
in a fashion requiring copyright permission, other than the making of an
 
exact copy.  The resulting work is called a "modified version" of the
 
earlier work or a work "based on" the earlier work.
 

	
 
  A "covered work" means either the unmodified Program or a work based
 
on the Program.
 

	
 
  To "propagate" a work means to do anything with it that, without
 
permission, would make you directly or secondarily liable for
 
infringement under applicable copyright law, except executing it on a
 
computer or modifying a private copy.  Propagation includes copying,
 
distribution (with or without modification), making available to the
 
public, and in some countries other activities as well.
 

	
 
  To "convey" a work means any kind of propagation that enables other
 
parties to make or receive copies.  Mere interaction with a user through
 
a computer network, with no transfer of a copy, is not conveying.
 

	
 
  An interactive user interface displays "Appropriate Legal Notices"
 
to the extent that it includes a convenient and prominently visible
 
feature that (1) displays an appropriate copyright notice, and (2)
 
tells the user that there is no warranty for the work (except to the
 
extent that warranties are provided), that licensees may convey the
 
work under this License, and how to view a copy of this License.  If
 
the interface presents a list of user commands or options, such as a
 
menu, a prominent item in the list meets this criterion.
 

	
 
  1. Source Code.
 

	
 
  The "source code" for a work means the preferred form of the work
 
for making modifications to it.  "Object code" means any non-source
 
form of a work.
 

	
 
  A "Standard Interface" means an interface that either is an official
 
standard defined by a recognized standards body, or, in the case of
 
interfaces specified for a particular programming language, one that
 
is widely used among developers working in that language.
 

	
 
  The "System Libraries" of an executable work include anything, other
 
than the work as a whole, that (a) is included in the normal form of
 
packaging a Major Component, but which is not part of that Major
 
Component, and (b) serves only to enable use of the work with that
 
Major Component, or to implement a Standard Interface for which an
 
implementation is available to the public in source code form.  A
 
"Major Component", in this context, means a major essential component
 
(kernel, window system, and so on) of the specific operating system
 
(if any) on which the executable work runs, or a compiler used to
 
produce the work, or an object code interpreter used to run it.
 

	
 
  The "Corresponding Source" for a work in object code form means all
 
the source code needed to generate, install, and (for an executable
 
work) run the object code and to modify the work, including scripts to
 
control those activities.  However, it does not include the work's
 
System Libraries, or general-purpose tools or generally available free
 
programs which are used unmodified in performing those activities but
 
which are not part of the work.  For example, Corresponding Source
 
includes interface definition files associated with source files for
 
the work, and the source code for shared libraries and dynamically
 
linked subprograms that the work is specifically designed to require,
 
such as by intimate data communication or control flow between those
 
subprograms and other parts of the work.
 

	
 
  The Corresponding Source need not include anything that users
 
can regenerate automatically from other parts of the Corresponding
 
Source.
 

	
 
  The Corresponding Source for a work in source code form is that
 
same work.
 

	
 
  2. Basic Permissions.
 

	
 
  All rights granted under this License are granted for the term of
 
copyright on the Program, and are irrevocable provided the stated
 
conditions are met.  This License explicitly affirms your unlimited
 
permission to run the unmodified Program.  The output from running a
 
covered work is covered by this License only if the output, given its
 
content, constitutes a covered work.  This License acknowledges your
 
rights of fair use or other equivalent, as provided by copyright law.
 

	
 
  You may make, run and propagate covered works that you do not
 
convey, without conditions so long as your license otherwise remains
 
in force.  You may convey covered works to others for the sole purpose
 
of having them make modifications exclusively for you, or provide you
 
with facilities for running those works, provided that you comply with
 
the terms of this License in conveying all material for which you do
 
not control copyright.  Those thus making or running the covered works
 
for you must do so exclusively on your behalf, under your direction
 
and control, on terms that prohibit them from making any copies of
 
your copyrighted material outside their relationship with you.
 

	
 
  Conveying under any other circumstances is permitted solely under
 
the conditions stated below.  Sublicensing is not allowed; section 10
 
makes it unnecessary.
 

	
 
  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
 

	
 
  No covered work shall be deemed part of an effective technological
 
measure under any applicable law fulfilling obligations under article
 
11 of the WIPO copyright treaty adopted on 20 December 1996, or
 
similar laws prohibiting or restricting circumvention of such
 
measures.
 

	
 
  When you convey a covered work, you waive any legal power to forbid
 
circumvention of technological measures to the extent such circumvention
 
is effected by exercising rights under this License with respect to
 
the covered work, and you disclaim any intention to limit operation or
 
modification of the work as a means of enforcing, against the work's
 
users, your or third parties' legal rights to forbid circumvention of
 
technological measures.
 

	
 
  4. Conveying Verbatim Copies.
 

	
 
  You may convey verbatim copies of the Program's source code as you
 
receive it, in any medium, provided that you conspicuously and
 
appropriately publish on each copy an appropriate copyright notice;
 
keep intact all notices stating that this License and any
 
non-permissive terms added in accord with section 7 apply to the code;
 
keep intact all notices of the absence of any warranty; and give all
 
recipients a copy of this License along with the Program.
 

	
 
  You may charge any price or no price for each copy that you convey,
 
and you may offer support or warranty protection for a fee.
 

	
 
  5. Conveying Modified Source Versions.
 

	
 
  You may convey a work based on the Program, or the modifications to
 
produce it from the Program, in the form of source code under the
 
terms of section 4, provided that you also meet all of these conditions:
 

	
 
    a) The work must carry prominent notices stating that you modified
 
    it, and giving a relevant date.
 

	
 
    b) The work must carry prominent notices stating that it is
 
    released under this License and any conditions added under section
 
    7.  This requirement modifies the requirement in section 4 to
 
    "keep intact all notices".
 

	
 
    c) You must license the entire work, as a whole, under this
 
    License to anyone who comes into possession of a copy.  This
 
    License will therefore apply, along with any applicable section 7
 
    additional terms, to the whole of the work, and all its parts,
 
    regardless of how they are packaged.  This License gives no
 
    permission to license the work in any other way, but it does not
 
    invalidate such permission if you have separately received it.
 

	
 
    d) If the work has interactive user interfaces, each must display
 
    Appropriate Legal Notices; however, if the Program has interactive
 
    interfaces that do not display Appropriate Legal Notices, your
 
    work need not make them do so.
 

	
 
  A compilation of a covered work with other separate and independent
 
works, which are not by their nature extensions of the covered work,
 
and which are not combined with it such as to form a larger program,
 
in or on a volume of a storage or distribution medium, is called an
 
"aggregate" if the compilation and its resulting copyright are not
 
used to limit the access or legal rights of the compilation's users
 
beyond what the individual works permit.  Inclusion of a covered work
 
in an aggregate does not cause this License to apply to the other
 
parts of the aggregate.
 

	
 
  6. Conveying Non-Source Forms.
 

	
 
  You may convey a covered work in object code form under the terms
 
of sections 4 and 5, provided that you also convey the
 
machine-readable Corresponding Source under the terms of this License,
 
in one of these ways:
 

	
 
    a) Convey the object code in, or embodied in, a physical product
 
    (including a physical distribution medium), accompanied by the
 
    Corresponding Source fixed on a durable physical medium
 
    customarily used for software interchange.
 

	
 
    b) Convey the object code in, or embodied in, a physical product
 
    (including a physical distribution medium), accompanied by a
 
    written offer, valid for at least three years and valid for as
 
    long as you offer spare parts or customer support for that product
 
    model, to give anyone who possesses the object code either (1) a
 
    copy of the Corresponding Source for all the software in the
 
    product that is covered by this License, on a durable physical
 
    medium customarily used for software interchange, for a price no
 
    more than your reasonable cost of physically performing this
 
    conveying of source, or (2) access to copy the
 
    Corresponding Source from a network server at no charge.
 

	
 
    c) Convey individual copies of the object code with a copy of the
 
    written offer to provide the Corresponding Source.  This
 
    alternative is allowed only occasionally and noncommercially, and
 
    only if you received the object code with such an offer, in accord
 
    with subsection 6b.
 

	
 
    d) Convey the object code by offering access from a designated
 
    place (gratis or for a charge), and offer equivalent access to the
 
    Corresponding Source in the same way through the same place at no
 
    further charge.  You need not require recipients to copy the
 
    Corresponding Source along with the object code.  If the place to
 
    copy the object code is a network server, the Corresponding Source
 
    may be on a different server (operated by you or a third party)
 
    that supports equivalent copying facilities, provided you maintain
 
    clear directions next to the object code saying where to find the
 
    Corresponding Source.  Regardless of what server hosts the
 
    Corresponding Source, you remain obligated to ensure that it is
 
    available for as long as needed to satisfy these requirements.
 

	
 
    e) Convey the object code using peer-to-peer transmission, provided
 
    you inform other peers where the object code and Corresponding
 
    Source of the work are being offered to the general public at no
 
    charge under subsection 6d.
 

	
 
  A separable portion of the object code, whose source code is excluded
 
from the Corresponding Source as a System Library, need not be
 
included in conveying the object code work.
 

	
 
  A "User Product" is either (1) a "consumer product", which means any
 
tangible personal property which is normally used for personal, family,
 
or household purposes, or (2) anything designed or sold for incorporation
 
into a dwelling.  In determining whether a product is a consumer product,
 
doubtful cases shall be resolved in favor of coverage.  For a particular
 
product received by a particular user, "normally used" refers to a
 
typical or common use of that class of product, regardless of the status
 
of the particular user or of the way in which the particular user
 
actually uses, or expects or is expected to use, the product.  A product
 
is a consumer product regardless of whether the product has substantial
 
commercial, industrial or non-consumer uses, unless such uses represent
 
the only significant mode of use of the product.
 

	
 
  "Installation Information" for a User Product means any methods,
 
procedures, authorization keys, or other information required to install
 
and execute modified versions of a covered work in that User Product from
 
a modified version of its Corresponding Source.  The information must
 
suffice to ensure that the continued functioning of the modified object
 
code is in no case prevented or interfered with solely because
 
modification has been made.
 

	
 
  If you convey an object code work under this section in, or with, or
 
specifically for use in, a User Product, and the conveying occurs as
 
part of a transaction in which the right of possession and use of the
 
User Product is transferred to the recipient in perpetuity or for a
 
fixed term (regardless of how the transaction is characterized), the
 
Corresponding Source conveyed under this section must be accompanied
 
by the Installation Information.  But this requirement does not apply
 
if neither you nor any third party retains the ability to install
 
modified object code on the User Product (for example, the work has
 
been installed in ROM).
 

	
 
  The requirement to provide Installation Information does not include a
 
requirement to continue to provide support service, warranty, or updates
 
for a work that has been modified or installed by the recipient, or for
 
the User Product in which it has been modified or installed.  Access to a
 
network may be denied when the modification itself materially and
 
adversely affects the operation of the network or violates the rules and
 
protocols for communication across the network.
 

	
 
  Corresponding Source conveyed, and Installation Information provided,
 
in accord with this section must be in a format that is publicly
 
documented (and with an implementation available to the public in
 
source code form), and must require no special password or key for
 
unpacking, reading or copying.
 

	
 
  7. Additional Terms.
 

	
 
  "Additional permissions" are terms that supplement the terms of this
 
License by making exceptions from one or more of its conditions.
 
Additional permissions that are applicable to the entire Program shall
 
be treated as though they were included in this License, to the extent
 
that they are valid under applicable law.  If additional permissions
 
apply only to part of the Program, that part may be used separately
 
under those permissions, but the entire Program remains governed by
 
this License without regard to the additional permissions.
 

	
 
  When you convey a copy of a covered work, you may at your option
 
remove any additional permissions from that copy, or from any part of
 
it.  (Additional permissions may be written to require their own
 
removal in certain cases when you modify the work.)  You may place
 
additional permissions on material, added by you to a covered work,
 
for which you have or can give appropriate copyright permission.
 

	
 
  Notwithstanding any other provision of this License, for material you
 
add to a covered work, you may (if authorized by the copyright holders of
 
that material) supplement the terms of this License with terms:
 

	
 
    a) Disclaiming warranty or limiting liability differently from the
 
    terms of sections 15 and 16 of this License; or
 

	
 
    b) Requiring preservation of specified reasonable legal notices or
 
    author attributions in that material or in the Appropriate Legal
 
    Notices displayed by works containing it; or
 

	
 
    c) Prohibiting misrepresentation of the origin of that material, or
 
    requiring that modified versions of such material be marked in
 
    reasonable ways as different from the original version; or
 

	
 
    d) Limiting the use for publicity purposes of names of licensors or
 
    authors of the material; or
 

	
 
    e) Declining to grant rights under trademark law for use of some
 
    trade names, trademarks, or service marks; or
 

	
 
    f) Requiring indemnification of licensors and authors of that
 
    material by anyone who conveys the material (or modified versions of
 
    it) with contractual assumptions of liability to the recipient, for
 
    any liability that these contractual assumptions directly impose on
 
    those licensors and authors.
 

	
 
  All other non-permissive additional terms are considered "further
 
restrictions" within the meaning of section 10.  If the Program as you
 
received it, or any part of it, contains a notice stating that it is
 
governed by this License along with a term that is a further
 
restriction, you may remove that term.  If a license document contains
 
a further restriction but permits relicensing or conveying under this
 
License, you may add to a covered work material governed by the terms
 
of that license document, provided that the further restriction does
 
not survive such relicensing or conveying.
 

	
 
  If you add terms to a covered work in accord with this section, you
 
must place, in the relevant source files, a statement of the
 
additional terms that apply to those files, or a notice indicating
 
where to find the applicable terms.
 

	
 
  Additional terms, permissive or non-permissive, may be stated in the
 
form of a separately written license, or stated as exceptions;
 
the above requirements apply either way.
 

	
 
  8. Termination.
 

	
 
  You may not propagate or modify a covered work except as expressly
 
provided under this License.  Any attempt otherwise to propagate or
 
modify it is void, and will automatically terminate your rights under
 
this License (including any patent licenses granted under the third
 
paragraph of section 11).
 

	
 
  However, if you cease all violation of this License, then your
 
license from a particular copyright holder is reinstated (a)
 
provisionally, unless and until the copyright holder explicitly and
 
finally terminates your license, and (b) permanently, if the copyright
 
holder fails to notify you of the violation by some reasonable means
 
prior to 60 days after the cessation.
 

	
 
  Moreover, your license from a particular copyright holder is
 
reinstated permanently if the copyright holder notifies you of the
 
violation by some reasonable means, this is the first time you have
 
received notice of violation of this License (for any work) from that
 
copyright holder, and you cure the violation prior to 30 days after
 
your receipt of the notice.
 

	
 
  Termination of your rights under this section does not terminate the
 
licenses of parties who have received copies or rights from you under
 
this License.  If your rights have been terminated and not permanently
 
reinstated, you do not qualify to receive new licenses for the same
 
material under section 10.
 

	
 
  9. Acceptance Not Required for Having Copies.
 

	
 
  You are not required to accept this License in order to receive or
 
run a copy of the Program.  Ancillary propagation of a covered work
 
occurring solely as a consequence of using peer-to-peer transmission
 
to receive a copy likewise does not require acceptance.  However,
 
nothing other than this License grants you permission to propagate or
 
modify any covered work.  These actions infringe copyright if you do
 
not accept this License.  Therefore, by modifying or propagating a
 
covered work, you indicate your acceptance of this License to do so.
 

	
 
  10. Automatic Licensing of Downstream Recipients.
 

	
 
  Each time you convey a covered work, the recipient automatically
 
receives a license from the original licensors, to run, modify and
 
propagate that work, subject to this License.  You are not responsible
 
for enforcing compliance by third parties with this License.
 

	
 
  An "entity transaction" is a transaction transferring control of an
 
organization, or substantially all assets of one, or subdividing an
 
organization, or merging organizations.  If propagation of a covered
 
work results from an entity transaction, each party to that
 
transaction who receives a copy of the work also receives whatever
 
licenses to the work the party's predecessor in interest had or could
 
give under the previous paragraph, plus a right to possession of the
 
Corresponding Source of the work from the predecessor in interest, if
 
the predecessor has it or can get it with reasonable efforts.
 

	
 
  You may not impose any further restrictions on the exercise of the
 
rights granted or affirmed under this License.  For example, you may
 
not impose a license fee, royalty, or other charge for exercise of
 
rights granted under this License, and you may not initiate litigation
 
(including a cross-claim or counterclaim in a lawsuit) alleging that
 
any patent claim is infringed by making, using, selling, offering for
 
sale, or importing the Program or any portion of it.
 

	
 
  11. Patents.
 

	
 
  A "contributor" is a copyright holder who authorizes use under this
 
License of the Program or a work on which the Program is based.  The
 
work thus licensed is called the contributor's "contributor version".
 

	
 
  A contributor's "essential patent claims" are all patent claims
 
owned or controlled by the contributor, whether already acquired or
 
hereafter acquired, that would be infringed by some manner, permitted
 
by this License, of making, using, or selling its contributor version,
 
but do not include claims that would be infringed only as a
 
consequence of further modification of the contributor version.  For
 
purposes of this definition, "control" includes the right to grant
 
patent sublicenses in a manner consistent with the requirements of
 
this License.
 

	
 
  Each contributor grants you a non-exclusive, worldwide, royalty-free
 
patent license under the contributor's essential patent claims, to
 
make, use, sell, offer for sale, import and otherwise run, modify and
 
propagate the contents of its contributor version.
 

	
 
  In the following three paragraphs, a "patent license" is any express
 
agreement or commitment, however denominated, not to enforce a patent
 
(such as an express permission to practice a patent or covenant not to
 
sue for patent infringement).  To "grant" such a patent license to a
 
party means to make such an agreement or commitment not to enforce a
 
patent against the party.
 

	
 
  If you convey a covered work, knowingly relying on a patent license,
 
and the Corresponding Source of the work is not available for anyone
 
to copy, free of charge and under the terms of this License, through a
 
publicly available network server or other readily accessible means,
 
then you must either (1) cause the Corresponding Source to be so
 
available, or (2) arrange to deprive yourself of the benefit of the
 
patent license for this particular work, or (3) arrange, in a manner
 
consistent with the requirements of this License, to extend the patent
 
license to downstream recipients.  "Knowingly relying" means you have
 
actual knowledge that, but for the patent license, your conveying the
 
covered work in a country, or your recipient's use of the covered work
 
in a country, would infringe one or more identifiable patents in that
 
country that you have reason to believe are valid.
 

	
 
  If, pursuant to or in connection with a single transaction or
 
arrangement, you convey, or propagate by procuring conveyance of, a
 
covered work, and grant a patent license to some of the parties
 
receiving the covered work authorizing them to use, propagate, modify
 
or convey a specific copy of the covered work, then the patent license
 
you grant is automatically extended to all recipients of the covered
 
work and works based on it.
 

	
 
  A patent license is "discriminatory" if it does not include within
 
the scope of its coverage, prohibits the exercise of, or is
 
conditioned on the non-exercise of one or more of the rights that are
 
specifically granted under this License.  You may not convey a covered
 
work if you are a party to an arrangement with a third party that is
 
in the business of distributing software, under which you make payment
 
to the third party based on the extent of your activity of conveying
 
the work, and under which the third party grants, to any of the
 
parties who would receive the covered work from you, a discriminatory
 
patent license (a) in connection with copies of the covered work
 
conveyed by you (or copies made from those copies), or (b) primarily
 
for and in connection with specific products or compilations that
 
contain the covered work, unless you entered into that arrangement,
 
or that patent license was granted, prior to 28 March 2007.
 

	
 
  Nothing in this License shall be construed as excluding or limiting
 
any implied license or other defenses to infringement that may
 
otherwise be available to you under applicable patent law.
 

	
 
  12. No Surrender of Others' Freedom.
 

	
 
  If conditions are imposed on you (whether by court order, agreement or
 
otherwise) that contradict the conditions of this License, they do not
 
excuse you from the conditions of this License.  If you cannot convey a
 
covered work so as to satisfy simultaneously your obligations under this
 
License and any other pertinent obligations, then as a consequence you may
 
not convey it at all.  For example, if you agree to terms that obligate you
 
to collect a royalty for further conveying from those to whom you convey
 
the Program, the only way you could satisfy both those terms and this
 
License would be to refrain entirely from conveying the Program.
 

	
 
  13. Use with the GNU Affero General Public License.
 

	
 
  Notwithstanding any other provision of this License, you have
 
permission to link or combine any covered work with a work licensed
 
under version 3 of the GNU Affero General Public License into a single
 
combined work, and to convey the resulting work.  The terms of this
 
License will continue to apply to the part which is the covered work,
 
but the special requirements of the GNU Affero General Public License,
 
section 13, concerning interaction through a network will apply to the
 
combination as such.
 

	
 
  14. Revised Versions of this License.
 

	
 
  The Free Software Foundation may publish revised and/or new versions of
 
the GNU General Public License from time to time.  Such new versions will
 
be similar in spirit to the present version, but may differ in detail to
 
address new problems or concerns.
 

	
 
  Each version is given a distinguishing version number.  If the
 
Program specifies that a certain numbered version of the GNU General
 
Public License "or any later version" applies to it, you have the
 
option of following the terms and conditions either of that numbered
 
version or of any later version published by the Free Software
 
Foundation.  If the Program does not specify a version number of the
 
GNU General Public License, you may choose any version ever published
 
by the Free Software Foundation.
 

	
 
  If the Program specifies that a proxy can decide which future
 
versions of the GNU General Public License can be used, that proxy's
 
public statement of acceptance of a version permanently authorizes you
 
to choose that version for the Program.
 

	
 
  Later license versions may give you additional or different
 
permissions.  However, no additional obligations are imposed on any
 
author or copyright holder as a result of your choosing to follow a
 
later version.
 

	
 
  15. Disclaimer of Warranty.
 

	
 
  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
 
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
 
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
 
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
 
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
 
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
 
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 

	
 
  16. Limitation of Liability.
 

	
 
  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
 
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
 
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
 
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
 
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
 
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
 
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
 
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
 
SUCH DAMAGES.
 

	
 
  17. Interpretation of Sections 15 and 16.
 

	
 
  If the disclaimer of warranty and limitation of liability provided
 
above cannot be given local legal effect according to their terms,
 
reviewing courts shall apply local law that most closely approximates
 
an absolute waiver of all civil liability in connection with the
 
Program, unless a warranty or assumption of liability accompanies a
 
copy of the Program in return for a fee.
 

	
 
                     END OF TERMS AND CONDITIONS
 

	
 
            How to Apply These Terms to Your New Programs
 

	
 
  If you develop a new program, and you want it to be of the greatest
 
possible use to the public, the best way to achieve this is to make it
 
free software which everyone can redistribute and change under these terms.
 

	
 
  To do so, attach the following notices to the program.  It is safest
 
to attach them to the start of each source file to most effectively
 
state the exclusion of warranty; and each file should have at least
 
the "copyright" line and a pointer to where the full notice is found.
 

	
 
    <one line to give the program's name and a brief idea of what it does.>
 
    Copyright (C) <year>  <name of author>
 

	
 
    This program is free software: you can redistribute it and/or modify
 
    it under the terms of the GNU General Public License as published by
 
    the Free Software Foundation, either version 3 of the License, or
 
    (at your option) any later version.
 

	
 
    This program is distributed in the hope that it will be useful,
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
    GNU General Public License for more details.
 

	
 
    You should have received a copy of the GNU General Public License
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
Also add information on how to contact you by electronic and paper mail.
 

	
 
  If the program does terminal interaction, make it output a short
 
notice like this when it starts in an interactive mode:
 

	
 
    <program>  Copyright (C) <year>  <name of author>
 
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
 
    This is free software, and you are welcome to redistribute it
 
    under certain conditions; type `show c' for details.
 

	
 
The hypothetical commands `show w' and `show c' should show the appropriate
 
parts of the General Public License.  Of course, your program's commands
 
might be different; for a GUI interface, you would use an "about box".
 

	
 
  You should also get your employer (if you work as a programmer) or school,
 
if any, to sign a "copyright disclaimer" for the program, if necessary.
 
For more information on this, and how to apply and follow the GNU GPL, see
 
<http://www.gnu.org/licenses/>.
 

	
 
  The GNU General Public License does not permit incorporating your program
 
into proprietary programs.  If your program is a subroutine library, you
 
may consider it more useful to permit linking proprietary applications with
 
the library.  If this is what you want to do, use the GNU Lesser General
 
Public License instead of this License.  But first, please read
 
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
lib/libiconv/share/doc/libiconv/COPYING.LIB
Show inline comments
 
new file 100755
 
		  GNU LIBRARY GENERAL PUBLIC LICENSE
 
		       Version 2, June 1991
 

	
 
 Copyright (C) 1991 Free Software Foundation, Inc.
 
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 
 Everyone is permitted to copy and distribute verbatim copies
 
 of this license document, but changing it is not allowed.
 

	
 
[This is the first released version of the library GPL.  It is
 
 numbered 2 because it goes with version 2 of the ordinary GPL.]
 

	
 
			    Preamble
 

	
 
  The licenses for most software are designed to take away your
 
freedom to share and change it.  By contrast, the GNU General Public
 
Licenses are intended to guarantee your freedom to share and change
 
free software--to make sure the software is free for all its users.
 

	
 
  This license, the Library General Public License, applies to some
 
specially designated Free Software Foundation software, and to any
 
other libraries whose authors decide to use it.  You can use it for
 
your libraries, 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 library, or if you modify it.
 

	
 
  For example, if you distribute copies of the library, whether gratis
 
or for a fee, you must give the recipients all the rights that we gave
 
you.  You must make sure that they, too, receive or can get the source
 
code.  If you link a program with the library, you must provide
 
complete object files to the recipients so that they can relink them
 
with the library, after making changes to the library and recompiling
 
it.  And you must show them these terms so they know their rights.
 

	
 
  Our method of protecting your rights has two steps: (1) copyright
 
the library, and (2) offer you this license which gives you legal
 
permission to copy, distribute and/or modify the library.
 

	
 
  Also, for each distributor's protection, we want to make certain
 
that everyone understands that there is no warranty for this free
 
library.  If the library is modified by someone else and passed on, we
 
want its recipients to know that what they have is not the original
 
version, 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 companies distributing free
 
software will individually obtain patent licenses, thus in effect
 
transforming the program into proprietary software.  To prevent this,
 
we have made it clear that any patent must be licensed for everyone's
 
free use or not licensed at all.
 

	
 
  Most GNU software, including some libraries, is covered by the ordinary
 
GNU General Public License, which was designed for utility programs.  This
 
license, the GNU Library General Public License, applies to certain
 
designated libraries.  This license is quite different from the ordinary
 
one; be sure to read it in full, and don't assume that anything in it is
 
the same as in the ordinary license.
 

	
 
  The reason we have a separate public license for some libraries is that
 
they blur the distinction we usually make between modifying or adding to a
 
program and simply using it.  Linking a program with a library, without
 
changing the library, is in some sense simply using the library, and is
 
analogous to running a utility program or application program.  However, in
 
a textual and legal sense, the linked executable is a combined work, a
 
derivative of the original library, and the ordinary General Public License
 
treats it as such.
 

	
 
  Because of this blurred distinction, using the ordinary General
 
Public License for libraries did not effectively promote software
 
sharing, because most developers did not use the libraries.  We
 
concluded that weaker conditions might promote sharing better.
 

	
 
  However, unrestricted linking of non-free programs would deprive the
 
users of those programs of all benefit from the free status of the
 
libraries themselves.  This Library General Public License is intended to
 
permit developers of non-free programs to use free libraries, while
 
preserving your freedom as a user of such programs to change the free
 
libraries that are incorporated in them.  (We have not seen how to achieve
 
this as regards changes in header files, but we have achieved it as regards
 
changes in the actual functions of the Library.)  The hope is that this
 
will lead to faster development of free libraries.
 

	
 
  The precise terms and conditions for copying, distribution and
 
modification follow.  Pay close attention to the difference between a
 
"work based on the library" and a "work that uses the library".  The
 
former contains code derived from the library, while the latter only
 
works together with the library.
 

	
 
  Note that it is possible for a library to be covered by the ordinary
 
General Public License rather than by this special one.
 

 
		  GNU LIBRARY GENERAL PUBLIC LICENSE
 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 

	
 
  0. This License Agreement applies to any software library which
 
contains a notice placed by the copyright holder or other authorized
 
party saying it may be distributed under the terms of this Library
 
General Public License (also called "this License").  Each licensee is
 
addressed as "you".
 

	
 
  A "library" means a collection of software functions and/or data
 
prepared so as to be conveniently linked with application programs
 
(which use some of those functions and data) to form executables.
 

	
 
  The "Library", below, refers to any such software library or work
 
which has been distributed under these terms.  A "work based on the
 
Library" means either the Library or any derivative work under
 
copyright law: that is to say, a work containing the Library or a
 
portion of it, either verbatim or with modifications and/or translated
 
straightforwardly into another language.  (Hereinafter, translation is
 
included without limitation in the term "modification".)
 

	
 
  "Source code" for a work means the preferred form of the work for
 
making modifications to it.  For a library, complete source code means
 
all the source code for all modules it contains, plus any associated
 
interface definition files, plus the scripts used to control compilation
 
and installation of the library.
 

	
 
  Activities other than copying, distribution and modification are not
 
covered by this License; they are outside its scope.  The act of
 
running a program using the Library is not restricted, and output from
 
such a program is covered only if its contents constitute a work based
 
on the Library (independent of the use of the Library in a tool for
 
writing it).  Whether that is true depends on what the Library does
 
and what the program that uses the Library does.
 
  
 
  1. You may copy and distribute verbatim copies of the Library's
 
complete source code as you receive it, in any medium, provided that
 
you conspicuously and appropriately publish on each copy an
 
appropriate copyright notice and disclaimer of warranty; keep intact
 
all the notices that refer to this License and to the absence of any
 
warranty; and distribute a copy of this License along with the
 
Library.
 

	
 
  You may charge a fee for the physical act of transferring a copy,
 
and you may at your option offer warranty protection in exchange for a
 
fee.
 

 
  2. You may modify your copy or copies of the Library or any portion
 
of it, thus forming a work based on the Library, and copy and
 
distribute such modifications or work under the terms of Section 1
 
above, provided that you also meet all of these conditions:
 

	
 
    a) The modified work must itself be a software library.
 

	
 
    b) You must cause the files modified to carry prominent notices
 
    stating that you changed the files and the date of any change.
 

	
 
    c) You must cause the whole of the work to be licensed at no
 
    charge to all third parties under the terms of this License.
 

	
 
    d) If a facility in the modified Library refers to a function or a
 
    table of data to be supplied by an application program that uses
 
    the facility, other than as an argument passed when the facility
 
    is invoked, then you must make a good faith effort to ensure that,
 
    in the event an application does not supply such function or
 
    table, the facility still operates, and performs whatever part of
 
    its purpose remains meaningful.
 

	
 
    (For example, a function in a library to compute square roots has
 
    a purpose that is entirely well-defined independent of the
 
    application.  Therefore, Subsection 2d requires that any
 
    application-supplied function or table used by this function must
 
    be optional: if the application does not supply it, the square
 
    root function must still compute square roots.)
 

	
 
These requirements apply to the modified work as a whole.  If
 
identifiable sections of that work are not derived from the Library,
 
and can be reasonably considered independent and separate works in
 
themselves, then this License, and its terms, do not apply to those
 
sections when you distribute them as separate works.  But when you
 
distribute the same sections as part of a whole which is a work based
 
on the Library, the distribution of the whole must be on the terms of
 
this License, whose permissions for other licensees extend to the
 
entire whole, and thus to each and every part regardless of who wrote
 
it.
 

	
 
Thus, it is not the intent of this section to claim rights or contest
 
your rights to work written entirely by you; rather, the intent is to
 
exercise the right to control the distribution of derivative or
 
collective works based on the Library.
 

	
 
In addition, mere aggregation of another work not based on the Library
 
with the Library (or with a work based on the Library) on a volume of
 
a storage or distribution medium does not bring the other work under
 
the scope of this License.
 

	
 
  3. You may opt to apply the terms of the ordinary GNU General Public
 
License instead of this License to a given copy of the Library.  To do
 
this, you must alter all the notices that refer to this License, so
 
that they refer to the ordinary GNU General Public License, version 2,
 
instead of to this License.  (If a newer version than version 2 of the
 
ordinary GNU General Public License has appeared, then you can specify
 
that version instead if you wish.)  Do not make any other change in
 
these notices.
 

 
  Once this change is made in a given copy, it is irreversible for
 
that copy, so the ordinary GNU General Public License applies to all
 
subsequent copies and derivative works made from that copy.
 

	
 
  This option is useful when you wish to copy part of the code of
 
the Library into a program that is not a library.
 

	
 
  4. You may copy and distribute the Library (or a portion or
 
derivative of it, under Section 2) in object code or executable form
 
under the terms of Sections 1 and 2 above provided that you accompany
 
it with the complete corresponding machine-readable source code, which
 
must be distributed under the terms of Sections 1 and 2 above on a
 
medium customarily used for software interchange.
 

	
 
  If distribution of object code is made by offering access to copy
 
from a designated place, then offering equivalent access to copy the
 
source code from the same place satisfies the requirement to
 
distribute the source code, even though third parties are not
 
compelled to copy the source along with the object code.
 

	
 
  5. A program that contains no derivative of any portion of the
 
Library, but is designed to work with the Library by being compiled or
 
linked with it, is called a "work that uses the Library".  Such a
 
work, in isolation, is not a derivative work of the Library, and
 
therefore falls outside the scope of this License.
 

	
 
  However, linking a "work that uses the Library" with the Library
 
creates an executable that is a derivative of the Library (because it
 
contains portions of the Library), rather than a "work that uses the
 
library".  The executable is therefore covered by this License.
 
Section 6 states terms for distribution of such executables.
 

	
 
  When a "work that uses the Library" uses material from a header file
 
that is part of the Library, the object code for the work may be a
 
derivative work of the Library even though the source code is not.
 
Whether this is true is especially significant if the work can be
 
linked without the Library, or if the work is itself a library.  The
 
threshold for this to be true is not precisely defined by law.
 

	
 
  If such an object file uses only numerical parameters, data
 
structure layouts and accessors, and small macros and small inline
 
functions (ten lines or less in length), then the use of the object
 
file is unrestricted, regardless of whether it is legally a derivative
 
work.  (Executables containing this object code plus portions of the
 
Library will still fall under Section 6.)
 

	
 
  Otherwise, if the work is a derivative of the Library, you may
 
distribute the object code for the work under the terms of Section 6.
 
Any executables containing that work also fall under Section 6,
 
whether or not they are linked directly with the Library itself.
 

 
  6. As an exception to the Sections above, you may also compile or
 
link a "work that uses the Library" with the Library to produce a
 
work containing portions of the Library, and distribute that work
 
under terms of your choice, provided that the terms permit
 
modification of the work for the customer's own use and reverse
 
engineering for debugging such modifications.
 

	
 
  You must give prominent notice with each copy of the work that the
 
Library is used in it and that the Library and its use are covered by
 
this License.  You must supply a copy of this License.  If the work
 
during execution displays copyright notices, you must include the
 
copyright notice for the Library among them, as well as a reference
 
directing the user to the copy of this License.  Also, you must do one
 
of these things:
 

	
 
    a) Accompany the work with the complete corresponding
 
    machine-readable source code for the Library including whatever
 
    changes were used in the work (which must be distributed under
 
    Sections 1 and 2 above); and, if the work is an executable linked
 
    with the Library, with the complete machine-readable "work that
 
    uses the Library", as object code and/or source code, so that the
 
    user can modify the Library and then relink to produce a modified
 
    executable containing the modified Library.  (It is understood
 
    that the user who changes the contents of definitions files in the
 
    Library will not necessarily be able to recompile the application
 
    to use the modified definitions.)
 

	
 
    b) Accompany the work with a written offer, valid for at
 
    least three years, to give the same user the materials
 
    specified in Subsection 6a, above, for a charge no more
 
    than the cost of performing this distribution.
 

	
 
    c) If distribution of the work is made by offering access to copy
 
    from a designated place, offer equivalent access to copy the above
 
    specified materials from the same place.
 

	
 
    d) Verify that the user has already received a copy of these
 
    materials or that you have already sent this user a copy.
 

	
 
  For an executable, the required form of the "work that uses the
 
Library" must include any data and utility programs needed for
 
reproducing the executable from it.  However, as a special exception,
 
the 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.
 

	
 
  It may happen that this requirement contradicts the license
 
restrictions of other proprietary libraries that do not normally
 
accompany the operating system.  Such a contradiction means you cannot
 
use both them and the Library together in an executable that you
 
distribute.
 

 
  7. You may place library facilities that are a work based on the
 
Library side-by-side in a single library together with other library
 
facilities not covered by this License, and distribute such a combined
 
library, provided that the separate distribution of the work based on
 
the Library and of the other library facilities is otherwise
 
permitted, and provided that you do these two things:
 

	
 
    a) Accompany the combined library with a copy of the same work
 
    based on the Library, uncombined with any other library
 
    facilities.  This must be distributed under the terms of the
 
    Sections above.
 

	
 
    b) Give prominent notice with the combined library of the fact
 
    that part of it is a work based on the Library, and explaining
 
    where to find the accompanying uncombined form of the same work.
 

	
 
  8. You may not copy, modify, sublicense, link with, or distribute
 
the Library except as expressly provided under this License.  Any
 
attempt otherwise to copy, modify, sublicense, link with, or
 
distribute the Library is void, and will automatically terminate your
 
rights under this License.  However, parties who have received copies,
 
or rights, from you under this License will not have their licenses
 
terminated so long as such parties remain in full compliance.
 

	
 
  9. You are not required to accept this License, since you have not
 
signed it.  However, nothing else grants you permission to modify or
 
distribute the Library or its derivative works.  These actions are
 
prohibited by law if you do not accept this License.  Therefore, by
 
modifying or distributing the Library (or any work based on the
 
Library), you indicate your acceptance of this License to do so, and
 
all its terms and conditions for copying, distributing or modifying
 
the Library or works based on it.
 

	
 
  10. Each time you redistribute the Library (or any work based on the
 
Library), the recipient automatically receives a license from the
 
original licensor to copy, distribute, link with or modify the Library
 
subject to these terms and conditions.  You may not impose any further
 
restrictions on the recipients' exercise of the rights granted herein.
 
You are not responsible for enforcing compliance by third parties to
 
this License.
 

 
  11. If, as a consequence of a court judgment or allegation of patent
 
infringement or for any other reason (not limited to patent issues),
 
conditions are imposed on you (whether by court order, agreement or
 
otherwise) that contradict the conditions of this License, they do not
 
excuse you from the conditions of this License.  If you cannot
 
distribute so as to satisfy simultaneously your obligations under this
 
License and any other pertinent obligations, then as a consequence you
 
may not distribute the Library at all.  For example, if a patent
 
license would not permit royalty-free redistribution of the Library by
 
all those who receive copies directly or indirectly through you, then
 
the only way you could satisfy both it and this License would be to
 
refrain entirely from distribution of the Library.
 

	
 
If any portion of this section is held invalid or unenforceable under any
 
particular circumstance, the balance of the section is intended to apply,
 
and the section as a whole is intended to apply in other circumstances.
 

	
 
It is not the purpose of this section to induce you to infringe any
 
patents or other property right claims or to contest validity of any
 
such claims; this section has the sole purpose of protecting the
 
integrity of the free software distribution system which is
 
implemented by public license practices.  Many people have made
 
generous contributions to the wide range of software distributed
 
through that system in reliance on consistent application of that
 
system; it is up to the author/donor to decide if he or she is willing
 
to distribute software through any other system and a licensee cannot
 
impose that choice.
 

	
 
This section is intended to make thoroughly clear what is believed to
 
be a consequence of the rest of this License.
 

	
 
  12. If the distribution and/or use of the Library is restricted in
 
certain countries either by patents or by copyrighted interfaces, the
 
original copyright holder who places the Library under this License may add
 
an explicit geographical distribution limitation excluding those countries,
 
so that distribution is permitted only in or among countries not thus
 
excluded.  In such case, this License incorporates the limitation as if
 
written in the body of this License.
 

	
 
  13. The Free Software Foundation may publish revised and/or new
 
versions of the Library General Public License from time to time.
 
Such new versions will be similar in spirit to the present version,
 
but may differ in detail to address new problems or concerns.
 

	
 
Each version is given a distinguishing version number.  If the Library
 
specifies a version number of this License which applies to it and
 
"any later version", you have the option of following the terms and
 
conditions either of that version or of any later version published by
 
the Free Software Foundation.  If the Library does not specify a
 
license version number, you may choose any version ever published by
 
the Free Software Foundation.
 

 
  14. If you wish to incorporate parts of the Library into other free
 
programs whose distribution conditions are incompatible with these,
 
write to the author to ask for permission.  For software which is
 
copyrighted by the Free Software Foundation, write to the Free
 
Software Foundation; we sometimes make exceptions for this.  Our
 
decision will be guided by the two goals of preserving the free status
 
of all derivatives of our free software and of promoting the sharing
 
and reuse of software generally.
 

	
 
			    NO WARRANTY
 

	
 
  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
 
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
 
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
 
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
 
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
 
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
 
LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
 
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 

	
 
  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
 
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
 
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
 
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
 
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
 
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
 
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
 
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
 
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 
DAMAGES.
 

	
 
		     END OF TERMS AND CONDITIONS
 

 
     Appendix: How to Apply These Terms to Your New Libraries
 

	
 
  If you develop a new library, and you want it to be of the greatest
 
possible use to the public, we recommend making it free software that
 
everyone can redistribute and change.  You can do so by permitting
 
redistribution under these terms (or, alternatively, under the terms of the
 
ordinary General Public License).
 

	
 
  To apply these terms, attach the following notices to the library.  It is
 
safest to attach them to the start of each source file to most effectively
 
convey the exclusion of warranty; and each file should have at least the
 
"copyright" line and a pointer to where the full notice is found.
 

	
 
    <one line to give the library's name and a brief idea of what it does.>
 
    Copyright (C) <year>  <name of author>
 

	
 
    This library is free software; you can redistribute it and/or
 
    modify it under the terms of the GNU Library General Public
 
    License as published by the Free Software Foundation; either
 
    version 2 of the License, or (at your option) any later version.
 

	
 
    This library is distributed in the hope that it will be useful,
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
    Library General Public License for more details.
 

	
 
    You should have received a copy of the GNU Library General Public
 
    License along with this library; if not, write to the Free
 
    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
    MA 02110-1301, USA
 

	
 
Also add information on how to contact you by electronic and paper mail.
 

	
 
You should also get your employer (if you work as a programmer) or your
 
school, if any, to sign a "copyright disclaimer" for the library, if
 
necessary.  Here is a sample; alter the names:
 

	
 
  Yoyodyne, Inc., hereby disclaims all copyright interest in the
 
  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
 

	
 
  <signature of Ty Coon>, 1 April 1990
 
  Ty Coon, President of Vice
 

	
 
That's all there is to it!
lib/libiconv/share/doc/libiconv/NEWS
Show inline comments
 
new file 100755
 
New in 1.13:
 
* The library and the iconv program now understand platform dependent aliases,
 
  for better compatibility with the platform's own iconv_open function.
 
  Examples: "646" on Solaris, "iso88591" on HP-UX, "IBM-1252" on AIX.
 
* For stateful encodings, when the input ends with a shift sequence followed
 
  by invalid input, the iconv function now increments the input pointer past
 
  the shift sequence before returning (size_t)(-1) with errno = EILSEQ. This
 
  is also like GNU libc's iconv() behaves.
 
* The library exports a new function iconv_open_into() that stores the
 
  conversion descriptor in pre-allocated memory, rather than allocating fresh
 
  memory for it.
 
* Added CP1131 converter.
 

	
 
New in 1.12:
 
* The iconv program is now licensed under the GPL version 3, instead of the
 
  GPL version 2. The libiconv library continues to be licensed under LGPL.
 
* Added RK1048 converter.
 
* On AIX, an existing system libiconv no longer causes setlocale() to fail.
 
* Upgraded EUC-KR, JOHAB to include the Korean postal code sign.
 

	
 
New in 1.11:
 
* The iconv program has new options --unicode-subst, --byte-subst,
 
  --widechar-subst that allow to specify substitutions for characters that
 
  cannot be converted.
 
* The iconv program now understands long options:
 
    long option    equivalent to
 
    --from-code    -f
 
    --to-code      -t
 
    --list         -l
 
    --silent       -s
 
* The CP936 converter is now different from the GBK converter: it has changed
 
  to include the Euro sign and private area characters. CP936 is no longer an
 
  alias of GBK.
 
* Updated GB18030 converter to include all private area characters.
 
* Updated CP950 converter to include the Euro sign and private area characters.
 
* Updated CP949 converter to include private area characters.
 
* Updated the BIG5-HKSCS converter. The old BIG5-HKSCS converter is renamed to
 
  BIG5-HKSCS:1999 and updated to Unicode 4. New converters BIG5-HKSCS:2001 and
 
  BIG5-HKSCS:2004 are added. BIG5-HKSCS is now an alias for BIG5-HKSCS:2004.
 
* Added a few irreversible mappings to the CP932 converter.
 
* Tidy up the list of symbols exported from libiconv (assumes gcc >= 4.0).
 

	
 
New in 1.10:
 
* Added ISO-8859-11 converter.
 
* Updated the ISO-8859-7 converter.
 
* Added ATARIST converter, available through --enable-extra-encodings.
 
* Added BIG5-2003 converter (experimental), available through
 
  --enable-extra-encodings.
 
* Updated EUC-TW converter to include the Euro sign.
 
* The preloadable library has been renamed from libiconv_plug.so to
 
  preloadable_libiconv.so.
 
* Portability to mingw.
 

	
 
New in 1.9:
 
* Many more transliterations.
 
* New configuration option --enable-relocatable.  See the INSTALL.generic file
 
  for details.
 

	
 
New in 1.8:
 
* The iconv program has new options -l, -c, -s.
 
* The iconv program is internationalized.
 
* Added C99 converter.
 
* Added KOI8-T converter.
 
* New configuration option --enable-extra-encodings that enables a bunch of
 
  additional encodings; see the README for details.
 
* Updated the ISO-8859-16 converter.
 
* Upgraded BIG5-HKSCS, EUC-TW, ISO-2022-CN, ISO-2022-CN-EXT converters to
 
  Unicode 3.2.
 
* Upgraded EUC-KR, CP949, JOHAB converters to include the Euro sign.
 
* Changed the ARMSCII-8 converter.
 
* Extended the EUC-JP encoder so that YEN SIGN characters don't cause failures
 
  in Shift_JIS to EUC-JP conversion.
 
* The JAVA converter now handles characters outside the Unicode BMP correctly.
 
* Fixed a bug in the CP1255, CP1258, TCVN decoders: The base characters of
 
  combining characters could be dropped at the end of the conversion buffer.
 
* Fixed a bug in the transliteration that could lead to excessive memory
 
  allocations in libintl when transliteration was needed.
 
* Portability to BSD/OS and SCO 3.2.5.
 

	
 
New in 1.7:
 
* Added UTF-32, UTF-32BE, UTF-32LE converters.
 
* Changed CP1255, CP1258 and TCVN converters to handle combining characters.
 
* Changed EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
 
  converters to use fullwidth Yen sign instead of halfwidth Yen sign, and
 
  fullwidth tilde instead of halfwidth tilde.
 
* Upgraded EUC-TW, ISO-2022-CN, ISO-2022-CN-EXT converters to Unicode 3.1.
 
* Changed the GB18030 converter to not reject unassigned and private-use
 
  Unicode characters.
 
* Fixed a bug in the byte order mark treatment of the UCS-4 decoder.
 
* The manual pages are now distributed also in HTML format.
 

	
 
New in 1.6:
 
* The iconv program's -f and -t options are now optional.
 
* Many more transliterations.
 
* Added CP862 converter.
 
* Changed the GB18030 converter.
 
* Portability to DOS with DJGPP.
 

	
 
New in 1.5:
 
* Added an iconv(1) program.
 
* New locale dependent encodings "char", "wchar_t".
 
* Transliteration is now off by default. Use a //TRANSLIT suffix to enable it.
 
* The JOHAB encoding is documented again.
 
* Changed a few mappings in the CP950 converter.
 

	
 
New in 1.4:
 
* Added GB18030, BIG5HKSCS converters.
 
* Portability to OS/2 with emx+gcc.
 

	
 
New in 1.3:
 
* Added UCS-2BE, UCS-2LE, UCS-4BE, UCS-4LE converters.
 
* Fixed the definition of EILSEQ on SunOS4.
 
* Fixed a build problem on OSF/1.
 
* Support for building as a shared library on Woe32.
 

	
 
New in 1.2:
 
* Added UTF-16BE and UTF-16LE converters.
 
* Changed the UTF-16 encoder.
 
* Fixed the treatment of tab characters in the UTF-7 converter.
 
* Fixed an internal error when output buffer was not large enough.
 

	
 
New in 1.1:
 
* Added ISO-8859-16 converter.
 
* Added CP932 converter, a variant of SHIFT_JIS.
 
* Added CP949 converter, a variant of EUC-KR.
 
* Improved the ISO-2022-CN-EXT converter: It now covers the ISO-IR-165 range.
 
* Updated the ISO-8859-8 conversion table.
 
* The JOHAB encoding is deprecated and not documented any more.
 
* Fixed two build problems: 1. "make -n check" failed. 2. When libiconv was
 
  already installed, "make" failed.
 

	
 
New in 1.0:
 
* Added transliteration facilities.
 
* Added a test suite.
 
* Fixed the iconv(3) manual page and function: the return value was not
 
  described correctly.
 
* Fixed a bug in the CP1258 decoder: invalid bytes now yield EILSEQ instead of
 
  U+FFFD.
 
* Fixed a bug in the Georgian-PS encoder: accept U+00E6.
 
* Fixed a bug in the EUC-JP encoder: reject 0x8E5C and 0x8E7E.
 
* Fixed a bug in the KSC5601 and JOHAB converters: they recognized some Hangul
 
  characters at some invalid code positions.
 
* Fixed a bug in the EUC-TW decoder; it was severely broken.
 
* Fixed a bug in the CP950 converter: it recognized a dubious BIG5 range.
 

	
 
New in 0.3:
 
* Reduced the size of the tables needed for the JOHAB converter.
 
* Portability to Woe32.
 

	
 
New in 0.2:
 
* Added KOI8-RU, CP850, CP866, CP874, CP950, ISO-2022-CN-EXT, GBK and
 
  ISO-2022-JP-1 converters.
 
* Added MACINTOSH as an alias for MAC-ROMAN.
 
* Added ASMO-708 as an alias for ISO-8859-6.
 
* Added ELOT_928 as an alias for ISO-8859-7.
 
* Improved the EUC-TW converter: Treat CNS 11643 plane 3.
 
* Improved the ISO-2022-KR and EUC-KR converters: Hangul characters are
 
  decomposed into Jamo when needed.
 
* Improved the CP932 converter.
 
* Updated the CP1133, MULELAO-1 and ARMSCII-8 mappings.
 
* The EUC-JP and SHIFT_JIS converters now cover the user-defined range.
 
* Fixed a possible buffer overrun in the JOHAB converter.
 
* Fixed a bug in the UTF-7, ISO-2022-*, HZ decoders: a shift sequence a the
 
  end of the input no longer gives an error.
 
* The HZ encoder now always terminates its output in the ASCII state.
 
* Use a perfect hash table for looking up the aliases.
 

	
 
New in 0.1:
 
* Portability to Linux/glibc-2.0.x, Linux/libc5, OSF/1, FreeBSD.
 
* Fixed a bug in the EUC-JP decoder. Extended the ISO-2022-JP-2 converter.
 
* Made TIS-620 mapping consistent with glibc-2.1.
 

	
lib/libiconv/share/doc/libiconv/NOTES
Show inline comments
 
new file 100755
 
Q: Why does libiconv support encoding XXX? Why does libiconv not support
 
   encoding ZZZ?
 

	
 
A: libiconv, as an internationalization library, supports those character
 
   sets and encodings which are in wide-spread use in at least one territory
 
   of the world.
 

	
 
   Hint1: On http://www.w3c.org/International/O-charset-lang.html you find a
 
   page "Languages, countries, and the charsets typically used for them".
 
   From this table, we can conclude that the following are in active use:
 

	
 
     ISO-8859-1, CP1252   Afrikaans, Albanian, Basque, Catalan, Danish, Dutch,
 
                          English, Faroese, Finnish, French, Galician, German,
 
                          Icelandic, Irish, Italian, Norwegian, Portuguese,
 
                          Scottish, Spanish, Swedish
 
     ISO-8859-2           Croatian, Czech, Hungarian, Polish, Romanian, Slovak,
 
                          Slovenian
 
     ISO-8859-3           Esperanto, Maltese
 
     ISO-8859-5           Bulgarian, Byelorussian, Macedonian, Russian,
 
                          Serbian, Ukrainian
 
     ISO-8859-6           Arabic
 
     ISO-8859-7           Greek
 
     ISO-8859-8           Hebrew
 
     ISO-8859-9, CP1254   Turkish
 
     ISO-8859-10          Inuit, Lapp
 
     ISO-8859-13          Latvian, Lithuanian
 
     ISO-8859-15          Estonian
 
     KOI8-R               Russian
 
     SHIFT_JIS            Japanese
 
     ISO-2022-JP          Japanese
 
     EUC-JP               Japanese
 

	
 
   Ordered by frequency on the web (1997):
 
     ISO-8859-1, CP1252   96%
 
     SHIFT_JIS             1.6%
 
     ISO-2022-JP           1.2%
 
     EUC-JP                0.4%
 
     CP1250                0.3%
 
     CP1251                0.2%
 
     CP850                 0.1%
 
     MACINTOSH             0.1%
 
     ISO-8859-5            0.1%
 
     ISO-8859-2            0.0%
 

	
 
   Hint2: The character sets mentioned in the XFree86 4.0 locale.alias file.
 

	
 
     ISO-8859-1           Afrikaans, Basque, Breton, Catalan, Danish, Dutch,
 
                          English, Estonian, Faroese, Finnish, French,
 
                          Galician, German, Greenlandic, Icelandic,
 
                          Indonesian, Irish, Italian, Lithuanian, Norwegian,
 
                          Occitan, Portuguese, Scottish, Spanish, Swedish,
 
                          Walloon, Welsh
 
     ISO-8859-2           Albanian, Croatian, Czech, Hungarian, Polish,
 
                          Romanian, Serbian, Slovak, Slovenian
 
     ISO-8859-3           Esperanto
 
     ISO-8859-4           Estonian, Latvian, Lithuanian
 
     ISO-8859-5           Bulgarian, Byelorussian, Macedonian, Russian,
 
                          Serbian, Ukrainian
 
     ISO-8859-6           Arabic
 
     ISO-8859-7           Greek
 
     ISO-8859-8           Hebrew
 
     ISO-8859-9           Turkish
 
     ISO-8859-14          Breton, Irish, Scottish, Welsh
 
     ISO-8859-15          Basque, Breton, Catalan, Danish, Dutch, Estonian,
 
                          Faroese, Finnish, French, Galician, German,
 
                          Greenlandic, Icelandic, Irish, Italian, Lithuanian,
 
                          Norwegian, Occitan, Portuguese, Scottish, Spanish,
 
                          Swedish, Walloon, Welsh
 
     KOI8-R               Russian
 
     KOI8-U               Russian, Ukrainian
 
     EUC-JP (alias eucJP)      Japanese
 
     ISO-2022-JP (alias JIS7)  Japanese
 
     SHIFT_JIS (alias SJIS)    Japanese
 
     U90                       Japanese
 
     S90                       Japanese
 
     EUC-CN (alias eucCN)      Chinese
 
     EUC-TW (alias eucTW)      Chinese
 
     BIG5                      Chinese
 
     EUC-KR (alias eucKR)      Korean
 
     ARMSCII-8                 Armenian
 
     GEORGIAN-ACADEMY          Georgian
 
     GEORGIAN-PS               Georgian
 
     TIS-620 (alias TACTIS)    Thai
 
     MULELAO-1                 Laothian
 
     IBM-CP1133                Laothian
 
     VISCII                    Vietnamese
 
     TCVN                      Vietnamese
 
     NUNACOM-8                 Inuktitut
 

	
 
   Hint3: The character sets supported by Netscape Communicator 4.
 

	
 
     Where is this documented? For the complete picture, I had to use
 
     "strings netscape" and then a lot of guesswork. For a quick take,
 
     look at the "View - Character set" menu of Netscape Communicator 4.6:
 

	
 
     ISO-8859-{1,2,5,7,9,15}
 
     WINDOWS-{1250,1251,1253}
 
     KOI8-R               Cyrillic
 
     CP866                Cyrillic
 
     Autodetect           Japanese  (EUC-JP, ISO-2022-JP, ISO-2022-JP-2, SJIS)
 
     EUC-JP               Japanese
 
     SHIFT_JIS            Japanese
 
     GB2312               Chinese
 
     BIG5                 Chinese
 
     EUC-TW               Chinese
 
     Autodetect           Korean    (EUC-KR, ISO-2022-KR, but not JOHAB)
 

	
 
     UTF-8
 
     UTF-7
 

	
 
   Hint4: The character sets supported by Microsoft Internet Explorer 4.
 

	
 
     ISO-8859-{1,2,3,4,5,6,7,8,9}
 
     WINDOWS-{1250,1251,1252,1253,1254,1255,1256,1257}
 
     KOI8-R               Cyrillic
 
     KOI8-RU              Ukrainian
 
     ASMO-708             Arabic
 
     EUC-JP               Japanese
 
     ISO-2022-JP          Japanese
 
     SHIFT_JIS            Japanese
 
     GB2312               Chinese
 
     HZ-GB-2312           Chinese
 
     BIG5                 Chinese
 
     EUC-KR               Korean
 
     ISO-2022-KR          Korean
 
     WINDOWS-874          Thai
 
     WINDOWS-1258         Vietnamese
 

	
 
     UTF-8
 
     UTF-7
 
     UNICODE             actually UNICODE-LITTLE
 
     UNICODEFEFF         actually UNICODE-BIG
 

	
 
     and various DOS character sets: DOS-720, DOS-862, IBM852, CP866.
 

	
 
   We take the union of all these four sets. The result is:
 

	
 
   European and Semitic languages
 
     * ASCII.
 
       We implement this because it is occasionally useful to know or to
 
       check whether some text is entirely ASCII (i.e. if the conversion
 
       ISO-8859-x -> UTF-8 is trivial).
 
     * ISO-8859-{1,2,3,4,5,6,7,8,9,10}
 
       We implement this because they are widely used. Except ISO-8859-4
 
       which appears to have been superseded by ISO-8859-13 in the baltic
 
       countries. But it's an ISO standard anyway.
 
     * ISO-8859-13
 
       We implement this because it's a standard in Lithuania and Latvia.
 
     * ISO-8859-14
 
       We implement this because it's an ISO standard.
 
     * ISO-8859-15
 
       We implement this because it's increasingly used in Europe, because
 
       of the Euro symbol.
 
     * ISO-8859-16
 
       We implement this because it's an ISO standard.
 
     * KOI8-R, KOI8-U
 
       We implement this because it appears to be the predominant encoding
 
       on Unix in Russia and Ukraine, respectively.
 
     * KOI8-RU
 
       We implement this because MSIE4 supports it.
 
     * KOI8-T
 
       We implement this because it is the locale encoding in glibc's Tajik
 
       locale.
 
     * PT154
 
       We implement this because it is the locale encoding in glibc's Kazakh
 
       locale.
 
     * RK1048
 
       We implement this because it's a standard in Kazakhstan.
 
     * CP{1250,1251,1252,1253,1254,1255,1256,1257}
 
       We implement these because they are the predominant Windows encodings
 
       in Europe.
 
     * CP850
 
       We implement this because it is mentioned as occurring in the web
 
       in the aforementioned statistics.
 
     * CP862
 
       We implement this because Ron Aaron says it is sometimes used in web
 
       pages and emails.
 
     * CP866
 
       We implement this because Netscape Communicator does.
 
     * CP1131
 
       We implement this because it is the locale encoding of a Belorusian
 
       locale in FreeBSD and MacOS X.
 
     * Mac{Roman,CentralEurope,Croatian,Romania,Cyrillic,Greek,Turkish} and
 
       Mac{Hebrew,Arabic}
 
       We implement these because the Sun JDK does, and because Mac users
 
       don't deserve to be punished.
 
     * Macintosh
 
       We implement this because it is mentioned as occurring in the web
 
       in the aforementioned statistics.
 
   Japanese
 
     * EUC-JP, SHIFT_JIS, ISO-2022-JP
 
       We implement these because they are widely used. EUC-JP and SHIFT_JIS
 
       are more used for files, whereas ISO-2022-JP is recommended for email.
 
     * CP932
 
       We implement this because it is the Microsoft variant of SHIFT_JIS,
 
       used on Windows.
 
     * ISO-2022-JP-2
 
       We implement this because it's the common way to represent mails which
 
       make use of JIS X 0212 characters.
 
     * ISO-2022-JP-1
 
       We implement this because it's in the RFCs, but I don't think it is
 
       really used.
 
     * U90, S90
 
       We DON'T implement this because I have no informations about what it
 
       is or who uses it.
 
   Simplified Chinese
 
     * EUC-CN = GB2312
 
       We implement this because it is the widely used representation
 
       of simplified Chinese.
 
     * GBK
 
       We implement this because it appears to be used on Solaris and Windows.
 
     * GB18030
 
       We implement this because it is an official requirement in the
 
       People's Republic of China.
 
     * ISO-2022-CN
 
       We implement this because it is in the RFCs, but I have no idea
 
       whether it is really used.
 
     * ISO-2022-CN-EXT
 
       We implement this because it's in the RFCs, but I don't think it is
 
       really used.
 
     * HZ = HZ-GB-2312
 
       We implement this because the RFCs recommend it for Usenet postings,
 
       and because MSIE4 supports it.
 
   Traditional Chinese
 
     * EUC-TW
 
       We implement it because it appears to be used on Unix.
 
     * BIG5
 
       We implement it because it is the de-facto standard for traditional
 
       Chinese.
 
     * CP950
 
       We implement this because it is the Microsoft variant of BIG5, used
 
       on Windows.
 
     * BIG5+
 
       We DON'T implement this because it doesn't appear to be in wide use.
 
       Only the CWEX fonts use this encoding. Furthermore, the conversion
 
       tables in the big5p package are not coherent: If you convert directly,
 
       you get different results than when you convert via GBK.
 
     * BIG5-HKSCS
 
       We implement it because it is the de-facto standard for traditional
 
       Chinese in Hongkong.
 
   Korean
 
     * EUC-KR
 
       We implement these because they appear to be the widely used
 
       representations for Korean.
 
     * CP949
 
       We implement this because it is the Microsoft variant of EUC-KR, used
 
       on Windows.
 
     * ISO-2022-KR
 
       We implement it because it is in the RFCs and because MSIE4 supports
 
       it, but I have no idea whether it's really used.
 
     * JOHAB
 
       We implement this because it is apparently used on Windows as a locale
 
       encoding (codepage 1361).
 
     * ISO-646-KR
 
       We DON'T implement this because although an old ASCII variant, its
 
       glyph for 0x7E is not clear: RFC 1345 and unicode.org's JOHAB.TXT
 
       say it's a tilde, but Ken Lunde's "CJKV information processing" says
 
       it's an overline. And it is not ISO-IR registered.
 
   Armenian
 
     * ARMSCII-8
 
       We implement it because XFree86 supports it.
 
   Georgian
 
     * Georgian-Academy, Georgian-PS
 
       We implement these because they appear to be both used for Georgian;
 
       Xfree86 supports them.
 
   Thai
 
     * ISO-8859-11, TIS-620
 
       We implement these because it seems to be standard for Thai.
 
     * CP874
 
       We implement this because MSIE4 supports it.
 
     * MacThai
 
       We implement this because the Sun JDK does, and because Mac users
 
       don't deserve to be punished.
 
   Laotian
 
     * MuleLao-1, CP1133
 
       We implement these because XFree86 supports them. I have no idea which
 
       one is used more widely.
 
   Vietnamese
 
     * VISCII, TCVN
 
       We implement these because XFree86 supports them.
 
     * CP1258
 
       We implement this because MSIE4 supports it.
 
   Other languages
 
     * NUNACOM-8 (Inuktitut)
 
       We DON'T implement this because it isn't part of Unicode yet, and
 
       therefore doesn't convert to anything except itself.
 
   Platform specifics
 
     * HP-ROMAN8, NEXTSTEP
 
       We implement these because they were the native character set on HPs
 
       and NeXTs for a long time, and libiconv is intended to be usable on
 
       these old machines.
 
   Full Unicode
 
     * UTF-8, UCS-2, UCS-4
 
       We implement these. Obviously.
 
     * UCS-2BE, UCS-2LE, UCS-4BE, UCS-4LE
 
       We implement these because they are the preferred internal
 
       representation of strings in Unicode aware applications. These are
 
       non-ambiguous names, known to glibc. (glibc doesn't have
 
       UCS-2-INTERNAL and UCS-4-INTERNAL.)
 
     * UTF-16, UTF-16BE, UTF-16LE
 
       We implement these, because UTF-16 is still the favourite encoding of
 
       the president of the Unicode Consortium (for political reasons), and
 
       because they appear in RFC 2781.
 
     * UTF-32, UTF-32BE, UTF-32LE
 
       We implement these because they are part of Unicode 3.1.
 
     * UTF-7
 
       We implement this because it is essential functionality for mail
 
       applications.
 
     * C99
 
       We implement it because it's used for C and C++ programs and because
 
       it's a nice encoding for debugging.
 
     * JAVA
 
       We implement it because it's used for Java programs and because it's
 
       a nice encoding for debugging.
 
     * UNICODE (big endian), UNICODEFEFF (little endian)
 
       We DON'T implement these because they are stupid and not standardized.
 
   Full Unicode, in terms of `uint16_t' or `uint32_t'
 
   (with machine dependent endianness and alignment)
 
     * UCS-2-INTERNAL, UCS-4-INTERNAL
 
       We implement these because they are the preferred internal
 
       representation of strings in Unicode aware applications.
 

	
 
Q: Support encodings mentioned in RFC 1345 ?
 
A: No, they are not in use any more. Supporting ISO-646 variants is pointless
 
   since ISO-8859-* have been adopted.
 

	
 
Q: Support EBCDIC ?
 
A: No!
 

	
 
Q: How do I add a new character set?
 
A: 1. Explain the "why" in this file, above.
 
   2. You need to have a conversion table from/to Unicode. Transform it into
 
   the format used by the mapping tables found on ftp.unicode.org: each line
 
   contains the character code, in hex, with 0x prefix, then whitespace,
 
   then the Unicode code point, in hex, 4 hex digits, with 0x prefix. '#'
 
   counts as a comment delimiter until end of line.
 
   Please also send your table to Mark Leisher <mleisher@crl.nmsu.edu> so he
 
   can include it in his collection.
 
   3. If it's an 8-bit character set, use the '8bit_tab_to_h' program in the
 
   tools directory to generate the C code for the conversion. You may tweak
 
   the resulting C code if you are not satisfied with its quality, but this
 
   is rarely needed.
 
   If it's a two-dimensional character set (with rows and columns), use the
 
   'cjk_tab_to_h' program in the tools directory to generate the C code for
 
   the conversion. You will need to modify the main() function to recognize
 
   the new character set name, with the proper dimensions, but that shouldn't
 
   be too hard. This yields the CCS. The CES you have to write by hand.
 
   4. Store the resulting C code file in the lib directory. Add a #include
 
   directive to converters.h, and add an entry to the encodings.def file.
 
   5. Compile the package, and test your new encoding using a program like
 
   iconv(1) or clisp(1).
 
   6. Augment the testsuite: Add a line to tests/Makefile.in. For a stateless
 
   encoding, create the complete table as a TXT file. For a stateful encoding,
 
   provide a text snippet encoded using your new encoding and its UTF-8
 
   equivalent.
 
   7. Update the README and man/iconv_open.3, to mention the new encoding.
 
   Add a note in the NEWS file.
 

	
 
Q: What about bidirectional text? Should it be tagged or reversed when
 
   converting from ISO-8859-8 or ISO-8859-6 to Unicode? Qt appears to do
 
   this, see qt-2.0.1/src/tools/qrtlcodec.cpp.
 
A: After reading RFC 1556: I don't think so. Support for ISO-8859-8-I and
 
   ISO-8859-E remains to be implemented.
 
   On the other hand, a page on www.w3c.org says that ISO-8859-8 in *email*
 
   is visually encoded, ISO-8859-8 in *HTML* is logically encoded, i.e.
 
   the same as ISO-8859-8-I. I'm confused.
 

	
 
Other character sets not implemented:
 
"MNEMONIC" = "csMnemonic"
 
"MNEM" = "csMnem"
 
"ISO-10646-UCS-Basic" = "csUnicodeASCII"
 
"ISO-10646-Unicode-Latin1" = "csUnicodeLatin1" = "ISO-10646"
 
"ISO-10646-J-1"
 
"UNICODE-1-1" = "csUnicode11"
 
"csWindows31Latin5"
 

	
 
Other aliases not implemented (and not implemented in glibc-2.1 either):
 
  From MSIE4:
 
    ISO-8859-1: alias ISO8859-1
 
    ISO-8859-2: alias ISO8859-2
 
    KSC_5601: alias KS_C_5601
 
    UTF-8: aliases UNICODE-1-1-UTF-8 UNICODE-2-0-UTF-8
 

	
 

	
 
Q: How can I integrate libiconv into my package?
 
A: Just copy the entire libiconv package into a subdirectory of your package.
 
   At configuration time, call libiconv's configure script with the
 
   appropriate --srcdir option and maybe --enable-static or --disable-shared.
 
   Then "cd libiconv && make && make install-lib libdir=... includedir=...".
 
   'install-lib' is a special (not GNU standardized) target which installs
 
   only the include file - in $(includedir) - and the library - in $(libdir) -
 
   and does not use other directory variables. After "installing" libiconv
 
   in your package's build directory, building of your package can proceed.
 

	
 
Q: Why is the testsuite so big?
 
A: Because some of the tests are very comprehensive.
 
   If you don't feel like using the testsuite, you can simply remove the
 
   tests/ directory.
 

	
lib/libxml2/include/libxml/DOCBparser.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: old DocBook SGML parser
 
 * Description: interface for a DocBook SGML non-verifying parser
 
 * This code is DEPRECATED, and should not be used anymore.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __DOCB_PARSER_H__
 
#define __DOCB_PARSER_H__
 
#include <libxml/xmlversion.h>
 

	
 
#ifdef LIBXML_DOCB_ENABLED
 

	
 
#include <libxml/parser.h>
 
#include <libxml/parserInternals.h>
 

	
 
#ifndef IN_LIBXML
 
#ifdef __GNUC__
 
#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
 
#endif
 
#endif
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * Most of the back-end structures from XML and SGML are shared.
 
 */
 
typedef xmlParserCtxt docbParserCtxt;
 
typedef xmlParserCtxtPtr docbParserCtxtPtr;
 
typedef xmlSAXHandler docbSAXHandler;
 
typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
 
typedef xmlParserInput docbParserInput;
 
typedef xmlParserInputPtr docbParserInputPtr;
 
typedef xmlDocPtr docbDocPtr;
 

	
 
/*
 
 * There is only few public functions.
 
 */
 
XMLPUBFUN int XMLCALL
 
		     docbEncodeEntities(unsigned char *out,
 
                                        int *outlen,
 
                                        const unsigned char *in,
 
                                        int *inlen, int quoteChar);
 

	
 
XMLPUBFUN docbDocPtr XMLCALL             
 
		     docbSAXParseDoc   (xmlChar *cur,
 
                                        const char *encoding,
 
                                        docbSAXHandlerPtr sax,
 
                                        void *userData);
 
XMLPUBFUN docbDocPtr XMLCALL             
 
		     docbParseDoc      (xmlChar *cur,
 
                                        const char *encoding);
 
XMLPUBFUN docbDocPtr XMLCALL             
 
		     docbSAXParseFile  (const char *filename,
 
                                        const char *encoding,
 
                                        docbSAXHandlerPtr sax,
 
                                        void *userData);
 
XMLPUBFUN docbDocPtr XMLCALL             
 
		     docbParseFile     (const char *filename,
 
                                        const char *encoding);
 

	
 
/**
 
 * Interfaces for the Push mode.
 
 */
 
XMLPUBFUN void XMLCALL                  
 
		     docbFreeParserCtxt      (docbParserCtxtPtr ctxt);
 
XMLPUBFUN docbParserCtxtPtr XMLCALL     
 
		     docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
 
                                              void *user_data,
 
                                              const char *chunk,
 
                                              int size,
 
                                              const char *filename,
 
                                              xmlCharEncoding enc);
 
XMLPUBFUN int XMLCALL                   
 
		     docbParseChunk          (docbParserCtxtPtr ctxt,
 
                                              const char *chunk,
 
                                              int size,
 
                                              int terminate);
 
XMLPUBFUN docbParserCtxtPtr XMLCALL       
 
		     docbCreateFileParserCtxt(const char *filename,
 
                                              const char *encoding);
 
XMLPUBFUN int XMLCALL                   
 
		     docbParseDocument       (docbParserCtxtPtr ctxt);
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* LIBXML_DOCB_ENABLED */
 

	
 
#endif /* __DOCB_PARSER_H__ */
lib/libxml2/include/libxml/HTMLparser.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: interface for an HTML 4.0 non-verifying parser
 
 * Description: this module implements an HTML 4.0 non-verifying parser
 
 *              with API compatible with the XML parser ones. It should
 
 *              be able to parse "real world" HTML, even if severely
 
 *              broken from a specification point of view.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __HTML_PARSER_H__
 
#define __HTML_PARSER_H__
 
#include <libxml/xmlversion.h>
 
#include <libxml/parser.h>
 

	
 
#ifdef LIBXML_HTML_ENABLED
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * Most of the back-end structures from XML and HTML are shared.
 
 */
 
typedef xmlParserCtxt htmlParserCtxt;
 
typedef xmlParserCtxtPtr htmlParserCtxtPtr;
 
typedef xmlParserNodeInfo htmlParserNodeInfo;
 
typedef xmlSAXHandler htmlSAXHandler;
 
typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
 
typedef xmlParserInput htmlParserInput;
 
typedef xmlParserInputPtr htmlParserInputPtr;
 
typedef xmlDocPtr htmlDocPtr;
 
typedef xmlNodePtr htmlNodePtr;
 

	
 
/*
 
 * Internal description of an HTML element, representing HTML 4.01
 
 * and XHTML 1.0 (which share the same structure).
 
 */
 
typedef struct _htmlElemDesc htmlElemDesc;
 
typedef htmlElemDesc *htmlElemDescPtr;
 
struct _htmlElemDesc {
 
    const char *name;	/* The tag name */
 
    char startTag;      /* Whether the start tag can be implied */
 
    char endTag;        /* Whether the end tag can be implied */
 
    char saveEndTag;    /* Whether the end tag should be saved */
 
    char empty;         /* Is this an empty element ? */
 
    char depr;          /* Is this a deprecated element ? */
 
    char dtd;           /* 1: only in Loose DTD, 2: only Frameset one */
 
    char isinline;      /* is this a block 0 or inline 1 element */
 
    const char *desc;   /* the description */
 

	
 
/* NRK Jan.2003
 
 * New fields encapsulating HTML structure
 
 *
 
 * Bugs:
 
 *	This is a very limited representation.  It fails to tell us when
 
 *	an element *requires* subelements (we only have whether they're
 
 *	allowed or not), and it doesn't tell us where CDATA and PCDATA
 
 *	are allowed.  Some element relationships are not fully represented:
 
 *	these are flagged with the word MODIFIER
 
 */
 
    const char** subelts;		/* allowed sub-elements of this element */
 
    const char* defaultsubelt;	/* subelement for suggested auto-repair
 
					   if necessary or NULL */
 
    const char** attrs_opt;		/* Optional Attributes */
 
    const char** attrs_depr;		/* Additional deprecated attributes */
 
    const char** attrs_req;		/* Required attributes */
 
};
 

	
 
/*
 
 * Internal description of an HTML entity.
 
 */
 
typedef struct _htmlEntityDesc htmlEntityDesc;
 
typedef htmlEntityDesc *htmlEntityDescPtr;
 
struct _htmlEntityDesc {
 
    unsigned int value;	/* the UNICODE value for the character */
 
    const char *name;	/* The entity name */
 
    const char *desc;   /* the description */
 
};
 

	
 
/*
 
 * There is only few public functions.
 
 */
 
XMLPUBFUN const htmlElemDesc * XMLCALL 	
 
			htmlTagLookup	(const xmlChar *tag);
 
XMLPUBFUN const htmlEntityDesc * XMLCALL 	
 
			htmlEntityLookup(const xmlChar *name);
 
XMLPUBFUN const htmlEntityDesc * XMLCALL 	
 
			htmlEntityValueLookup(unsigned int value);
 

	
 
XMLPUBFUN int XMLCALL			
 
			htmlIsAutoClosed(htmlDocPtr doc,
 
					 htmlNodePtr elem);
 
XMLPUBFUN int XMLCALL			
 
			htmlAutoCloseTag(htmlDocPtr doc,
 
					 const xmlChar *name,
 
					 htmlNodePtr elem);
 
XMLPUBFUN const htmlEntityDesc * XMLCALL	
 
			htmlParseEntityRef(htmlParserCtxtPtr ctxt,
 
					 const xmlChar **str);
 
XMLPUBFUN int XMLCALL			
 
			htmlParseCharRef(htmlParserCtxtPtr ctxt);
 
XMLPUBFUN void XMLCALL			
 
			htmlParseElement(htmlParserCtxtPtr ctxt);
 

	
 
XMLPUBFUN htmlParserCtxtPtr XMLCALL	
 
			htmlNewParserCtxt(void);
 

	
 
XMLPUBFUN htmlParserCtxtPtr XMLCALL	
 
			htmlCreateMemoryParserCtxt(const char *buffer,
 
						   int size);
 

	
 
XMLPUBFUN int XMLCALL			
 
			htmlParseDocument(htmlParserCtxtPtr ctxt);
 
XMLPUBFUN htmlDocPtr XMLCALL		
 
			htmlSAXParseDoc	(xmlChar *cur,
 
					 const char *encoding,
 
					 htmlSAXHandlerPtr sax,
 
					 void *userData);
 
XMLPUBFUN htmlDocPtr XMLCALL		
 
			htmlParseDoc	(xmlChar *cur,
 
					 const char *encoding);
 
XMLPUBFUN htmlDocPtr XMLCALL		
 
			htmlSAXParseFile(const char *filename,
 
					 const char *encoding,
 
					 htmlSAXHandlerPtr sax,
 
					 void *userData);
 
XMLPUBFUN htmlDocPtr XMLCALL		
 
			htmlParseFile	(const char *filename,
 
					 const char *encoding);
 
XMLPUBFUN int XMLCALL			
 
			UTF8ToHtml	(unsigned char *out,
 
					 int *outlen,
 
					 const unsigned char *in,
 
					 int *inlen);
 
XMLPUBFUN int XMLCALL			
 
			htmlEncodeEntities(unsigned char *out,
 
					 int *outlen,
 
					 const unsigned char *in,
 
					 int *inlen, int quoteChar);
 
XMLPUBFUN int XMLCALL			
 
			htmlIsScriptAttribute(const xmlChar *name);
 
XMLPUBFUN int XMLCALL			
 
			htmlHandleOmittedElem(int val);
 

	
 
#ifdef LIBXML_PUSH_ENABLED
 
/**
 
 * Interfaces for the Push mode.
 
 */
 
XMLPUBFUN htmlParserCtxtPtr XMLCALL	
 
			htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
 
						 void *user_data,
 
						 const char *chunk,
 
						 int size,
 
						 const char *filename,
 
						 xmlCharEncoding enc);
 
XMLPUBFUN int XMLCALL			
 
			htmlParseChunk		(htmlParserCtxtPtr ctxt,
 
						 const char *chunk,
 
						 int size,
 
						 int terminate);
 
#endif /* LIBXML_PUSH_ENABLED */
 

	
 
XMLPUBFUN void XMLCALL			
 
			htmlFreeParserCtxt	(htmlParserCtxtPtr ctxt);
 

	
 
/*
 
 * New set of simpler/more flexible APIs
 
 */
 
/**
 
 * xmlParserOption:
 
 *
 
 * This is the set of XML parser options that can be passed down
 
 * to the xmlReadDoc() and similar calls.
 
 */
 
typedef enum {
 
    HTML_PARSE_RECOVER  = 1<<0, /* Relaxed parsing */
 
    HTML_PARSE_NOERROR	= 1<<5,	/* suppress error reports */
 
    HTML_PARSE_NOWARNING= 1<<6,	/* suppress warning reports */
 
    HTML_PARSE_PEDANTIC	= 1<<7,	/* pedantic error reporting */
 
    HTML_PARSE_NOBLANKS	= 1<<8,	/* remove blank nodes */
 
    HTML_PARSE_NONET	= 1<<11,/* Forbid network access */
 
    HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
 
    HTML_PARSE_COMPACT  = 1<<16 /* compact small text nodes */
 
} htmlParserOption;
 

	
 
XMLPUBFUN void XMLCALL
 
		htmlCtxtReset		(htmlParserCtxtPtr ctxt);
 
XMLPUBFUN int XMLCALL
 
		htmlCtxtUseOptions	(htmlParserCtxtPtr ctxt,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlReadDoc		(const xmlChar *cur,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlReadFile		(const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlReadMemory		(const char *buffer,
 
					 int size,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlReadFd		(int fd,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlReadIO		(xmlInputReadCallback ioread,
 
					 xmlInputCloseCallback ioclose,
 
					 void *ioctx,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlCtxtReadDoc		(xmlParserCtxtPtr ctxt,
 
					 const xmlChar *cur,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlCtxtReadFile		(xmlParserCtxtPtr ctxt,
 
					 const char *filename,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlCtxtReadMemory		(xmlParserCtxtPtr ctxt,
 
					 const char *buffer,
 
					 int size,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlCtxtReadFd		(xmlParserCtxtPtr ctxt,
 
					 int fd,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlCtxtReadIO		(xmlParserCtxtPtr ctxt,
 
					 xmlInputReadCallback ioread,
 
					 xmlInputCloseCallback ioclose,
 
					 void *ioctx,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 

	
 
/* NRK/Jan2003: further knowledge of HTML structure
 
 */
 
typedef enum {
 
  HTML_NA = 0 ,		/* something we don't check at all */
 
  HTML_INVALID = 0x1 ,
 
  HTML_DEPRECATED = 0x2 ,
 
  HTML_VALID = 0x4 ,
 
  HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
 
} htmlStatus ;
 

	
 
/* Using htmlElemDesc rather than name here, to emphasise the fact
 
   that otherwise there's a lookup overhead
 
*/
 
XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
 
XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
 
XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
 
XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
 
/**
 
 * htmlDefaultSubelement:
 
 * @elt: HTML element
 
 *
 
 * Returns the default subelement for this element
 
 */
 
#define htmlDefaultSubelement(elt) elt->defaultsubelt
 
/**
 
 * htmlElementAllowedHereDesc:
 
 * @parent: HTML parent element
 
 * @elt: HTML element
 
 *
 
 * Checks whether an HTML element description may be a
 
 * direct child of the specified element.
 
 *
 
 * Returns 1 if allowed; 0 otherwise.
 
 */
 
#define htmlElementAllowedHereDesc(parent,elt) \
 
	htmlElementAllowedHere((parent), (elt)->name)
 
/**
 
 * htmlRequiredAttrs:
 
 * @elt: HTML element
 
 *
 
 * Returns the attributes required for the specified element.
 
 */
 
#define htmlRequiredAttrs(elt) (elt)->attrs_req
 

	
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* LIBXML_HTML_ENABLED */
 
#endif /* __HTML_PARSER_H__ */
lib/libxml2/include/libxml/HTMLtree.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: specific APIs to process HTML tree, especially serialization
 
 * Description: this module implements a few function needed to process
 
 *              tree in an HTML specific way.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __HTML_TREE_H__
 
#define __HTML_TREE_H__
 

	
 
#include <stdio.h>
 
#include <libxml/xmlversion.h>
 
#include <libxml/tree.h>
 
#include <libxml/HTMLparser.h>
 

	
 
#ifdef LIBXML_HTML_ENABLED
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 

	
 
/**
 
 * HTML_TEXT_NODE:
 
 *
 
 * Macro. A text node in a HTML document is really implemented
 
 * the same way as a text node in an XML document.
 
 */
 
#define HTML_TEXT_NODE		XML_TEXT_NODE
 
/**
 
 * HTML_ENTITY_REF_NODE:
 
 *
 
 * Macro. An entity reference in a HTML document is really implemented
 
 * the same way as an entity reference in an XML document.
 
 */
 
#define HTML_ENTITY_REF_NODE	XML_ENTITY_REF_NODE
 
/**
 
 * HTML_COMMENT_NODE:
 
 *
 
 * Macro. A comment in a HTML document is really implemented
 
 * the same way as a comment in an XML document.
 
 */
 
#define HTML_COMMENT_NODE	XML_COMMENT_NODE
 
/**
 
 * HTML_PRESERVE_NODE:
 
 *
 
 * Macro. A preserved node in a HTML document is really implemented
 
 * the same way as a CDATA section in an XML document.
 
 */
 
#define HTML_PRESERVE_NODE	XML_CDATA_SECTION_NODE
 
/**
 
 * HTML_PI_NODE:
 
 *
 
 * Macro. A processing instruction in a HTML document is really implemented
 
 * the same way as a processing instruction in an XML document.
 
 */
 
#define HTML_PI_NODE		XML_PI_NODE
 

	
 
XMLPUBFUN htmlDocPtr XMLCALL
 
		htmlNewDoc		(const xmlChar *URI,
 
					 const xmlChar *ExternalID);
 
XMLPUBFUN htmlDocPtr XMLCALL	
 
		htmlNewDocNoDtD		(const xmlChar *URI,
 
					 const xmlChar *ExternalID);
 
XMLPUBFUN const xmlChar * XMLCALL	
 
		htmlGetMetaEncoding	(htmlDocPtr doc);
 
XMLPUBFUN int XMLCALL		
 
		htmlSetMetaEncoding	(htmlDocPtr doc,
 
					 const xmlChar *encoding);
 
#ifdef LIBXML_OUTPUT_ENABLED
 
XMLPUBFUN void XMLCALL	    
 
		htmlDocDumpMemory	(xmlDocPtr cur,
 
					 xmlChar **mem,
 
					 int *size);
 
XMLPUBFUN void XMLCALL	    
 
		htmlDocDumpMemoryFormat	(xmlDocPtr cur,
 
					 xmlChar **mem,
 
					 int *size,
 
					 int format);
 
XMLPUBFUN int XMLCALL		
 
		htmlDocDump		(FILE *f,
 
					 xmlDocPtr cur);
 
XMLPUBFUN int XMLCALL		
 
		htmlSaveFile		(const char *filename,
 
					 xmlDocPtr cur);
 
XMLPUBFUN int XMLCALL		
 
		htmlNodeDump		(xmlBufferPtr buf,
 
					 xmlDocPtr doc,
 
					 xmlNodePtr cur);
 
XMLPUBFUN void XMLCALL		
 
		htmlNodeDumpFile	(FILE *out,
 
					 xmlDocPtr doc,
 
					 xmlNodePtr cur);
 
XMLPUBFUN int XMLCALL		
 
		htmlNodeDumpFileFormat	(FILE *out,
 
					 xmlDocPtr doc,
 
					 xmlNodePtr cur,
 
					 const char *encoding,
 
					 int format);
 
XMLPUBFUN int XMLCALL		
 
		htmlSaveFileEnc		(const char *filename,
 
					 xmlDocPtr cur,
 
					 const char *encoding);
 
XMLPUBFUN int XMLCALL		
 
		htmlSaveFileFormat	(const char *filename,
 
					 xmlDocPtr cur,
 
					 const char *encoding,
 
					 int format);
 

	
 
XMLPUBFUN void XMLCALL		
 
		htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
 
					 xmlDocPtr doc,
 
					 xmlNodePtr cur,
 
					 const char *encoding,
 
					 int format);
 
XMLPUBFUN void XMLCALL		
 
		htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
 
					 xmlDocPtr cur,
 
					 const char *encoding);
 
XMLPUBFUN void XMLCALL		
 
		htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
 
					 xmlDocPtr cur,
 
					 const char *encoding,
 
					 int format);
 
XMLPUBFUN void XMLCALL 
 
		htmlNodeDumpOutput	(xmlOutputBufferPtr buf, 
 
					 xmlDocPtr doc,
 
					 xmlNodePtr cur, 
 
					 const char *encoding);
 

	
 
#endif /* LIBXML_OUTPUT_ENABLED */
 

	
 
XMLPUBFUN int XMLCALL		
 
		htmlIsBooleanAttr	(const xmlChar *name);
 

	
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* LIBXML_HTML_ENABLED */
 

	
 
#endif /* __HTML_TREE_H__ */
 

	
lib/libxml2/include/libxml/SAX.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: Old SAX version 1 handler, deprecated
 
 * Description: DEPRECATED set of SAX version 1 interfaces used to
 
 *              build the DOM tree.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 

	
 
#ifndef __XML_SAX_H__
 
#define __XML_SAX_H__
 

	
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <libxml/xmlversion.h>
 
#include <libxml/parser.h>
 
#include <libxml/xlink.h>
 

	
 
#ifdef LIBXML_LEGACY_ENABLED
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 
XMLPUBFUN const xmlChar * XMLCALL
 
		getPublicId			(void *ctx);
 
XMLPUBFUN const xmlChar * XMLCALL	
 
		getSystemId			(void *ctx);
 
XMLPUBFUN void XMLCALL		
 
		setDocumentLocator		(void *ctx,
 
						 xmlSAXLocatorPtr loc);
 
    
 
XMLPUBFUN int XMLCALL		
 
		getLineNumber			(void *ctx);
 
XMLPUBFUN int XMLCALL		
 
		getColumnNumber			(void *ctx);
 

	
 
XMLPUBFUN int XMLCALL		
 
		isStandalone			(void *ctx);
 
XMLPUBFUN int XMLCALL		
 
		hasInternalSubset		(void *ctx);
 
XMLPUBFUN int XMLCALL		
 
		hasExternalSubset		(void *ctx);
 

	
 
XMLPUBFUN void XMLCALL		
 
		internalSubset			(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *ExternalID,
 
						 const xmlChar *SystemID);
 
XMLPUBFUN void XMLCALL		
 
		externalSubset			(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *ExternalID,
 
						 const xmlChar *SystemID);
 
XMLPUBFUN xmlEntityPtr XMLCALL	
 
		getEntity			(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN xmlEntityPtr XMLCALL	
 
		getParameterEntity		(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN xmlParserInputPtr XMLCALL 
 
		resolveEntity			(void *ctx,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId);
 

	
 
XMLPUBFUN void XMLCALL		
 
		entityDecl			(void *ctx,
 
						 const xmlChar *name,
 
						 int type,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId,
 
						 xmlChar *content);
 
XMLPUBFUN void XMLCALL		
 
		attributeDecl			(void *ctx,
 
						 const xmlChar *elem,
 
						 const xmlChar *fullname,
 
						 int type,
 
						 int def,
 
						 const xmlChar *defaultValue,
 
						 xmlEnumerationPtr tree);
 
XMLPUBFUN void XMLCALL		
 
		elementDecl			(void *ctx,
 
						 const xmlChar *name,
 
						 int type,
 
						 xmlElementContentPtr content);
 
XMLPUBFUN void XMLCALL		
 
		notationDecl			(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId);
 
XMLPUBFUN void XMLCALL		
 
		unparsedEntityDecl		(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId,
 
						 const xmlChar *notationName);
 

	
 
XMLPUBFUN void XMLCALL		
 
		startDocument			(void *ctx);
 
XMLPUBFUN void XMLCALL		
 
		endDocument			(void *ctx);
 
XMLPUBFUN void XMLCALL		
 
		attribute			(void *ctx,
 
						 const xmlChar *fullname,
 
						 const xmlChar *value);
 
XMLPUBFUN void XMLCALL		
 
		startElement			(void *ctx,
 
						 const xmlChar *fullname,
 
						 const xmlChar **atts);
 
XMLPUBFUN void XMLCALL		
 
		endElement			(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN void XMLCALL		
 
		reference			(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN void XMLCALL		
 
		characters			(void *ctx,
 
						 const xmlChar *ch,
 
						 int len);
 
XMLPUBFUN void XMLCALL		
 
		ignorableWhitespace		(void *ctx,
 
						 const xmlChar *ch,
 
						 int len);
 
XMLPUBFUN void XMLCALL		
 
		processingInstruction		(void *ctx,
 
						 const xmlChar *target,
 
						 const xmlChar *data);
 
XMLPUBFUN void XMLCALL		
 
		globalNamespace			(void *ctx,
 
						 const xmlChar *href,
 
						 const xmlChar *prefix);
 
XMLPUBFUN void XMLCALL		
 
		setNamespace			(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN xmlNsPtr XMLCALL	
 
		getNamespace			(void *ctx);
 
XMLPUBFUN int XMLCALL		
 
		checkNamespace			(void *ctx,
 
						 xmlChar *nameSpace);
 
XMLPUBFUN void XMLCALL		
 
		namespaceDecl			(void *ctx,
 
						 const xmlChar *href,
 
						 const xmlChar *prefix);
 
XMLPUBFUN void XMLCALL		
 
		comment				(void *ctx,
 
						 const xmlChar *value);
 
XMLPUBFUN void XMLCALL		
 
		cdataBlock			(void *ctx,
 
						 const xmlChar *value,
 
						 int len);
 

	
 
#ifdef LIBXML_SAX1_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		initxmlDefaultSAXHandler	(xmlSAXHandlerV1 *hdlr,
 
						 int warning);
 
#ifdef LIBXML_HTML_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		inithtmlDefaultSAXHandler	(xmlSAXHandlerV1 *hdlr);
 
#endif
 
#ifdef LIBXML_DOCB_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		initdocbDefaultSAXHandler	(xmlSAXHandlerV1 *hdlr);
 
#endif
 
#endif /* LIBXML_SAX1_ENABLED */
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* LIBXML_LEGACY_ENABLED */
 

	
 
#endif /* __XML_SAX_H__ */
lib/libxml2/include/libxml/SAX2.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: SAX2 parser interface used to build the DOM tree
 
 * Description: those are the default SAX2 interfaces used by
 
 *              the library when building DOM tree.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 

	
 
#ifndef __XML_SAX2_H__
 
#define __XML_SAX2_H__
 

	
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <libxml/xmlversion.h>
 
#include <libxml/parser.h>
 
#include <libxml/xlink.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 
XMLPUBFUN const xmlChar * XMLCALL
 
		xmlSAX2GetPublicId		(void *ctx);
 
XMLPUBFUN const xmlChar * XMLCALL	
 
		xmlSAX2GetSystemId		(void *ctx);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2SetDocumentLocator	(void *ctx,
 
						 xmlSAXLocatorPtr loc);
 
    
 
XMLPUBFUN int XMLCALL		
 
		xmlSAX2GetLineNumber		(void *ctx);
 
XMLPUBFUN int XMLCALL		
 
		xmlSAX2GetColumnNumber		(void *ctx);
 

	
 
XMLPUBFUN int XMLCALL		
 
		xmlSAX2IsStandalone		(void *ctx);
 
XMLPUBFUN int XMLCALL		
 
		xmlSAX2HasInternalSubset	(void *ctx);
 
XMLPUBFUN int XMLCALL		
 
		xmlSAX2HasExternalSubset	(void *ctx);
 

	
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2InternalSubset		(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *ExternalID,
 
						 const xmlChar *SystemID);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2ExternalSubset		(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *ExternalID,
 
						 const xmlChar *SystemID);
 
XMLPUBFUN xmlEntityPtr XMLCALL	
 
		xmlSAX2GetEntity		(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN xmlEntityPtr XMLCALL	
 
		xmlSAX2GetParameterEntity	(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN xmlParserInputPtr XMLCALL 
 
		xmlSAX2ResolveEntity		(void *ctx,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId);
 

	
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2EntityDecl		(void *ctx,
 
						 const xmlChar *name,
 
						 int type,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId,
 
						 xmlChar *content);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2AttributeDecl		(void *ctx,
 
						 const xmlChar *elem,
 
						 const xmlChar *fullname,
 
						 int type,
 
						 int def,
 
						 const xmlChar *defaultValue,
 
						 xmlEnumerationPtr tree);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2ElementDecl		(void *ctx,
 
						 const xmlChar *name,
 
						 int type,
 
						 xmlElementContentPtr content);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2NotationDecl		(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2UnparsedEntityDecl	(void *ctx,
 
						 const xmlChar *name,
 
						 const xmlChar *publicId,
 
						 const xmlChar *systemId,
 
						 const xmlChar *notationName);
 

	
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2StartDocument		(void *ctx);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2EndDocument		(void *ctx);
 
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2StartElement		(void *ctx,
 
						 const xmlChar *fullname,
 
						 const xmlChar **atts);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2EndElement		(void *ctx,
 
						 const xmlChar *name);
 
#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
 
XMLPUBFUN void XMLCALL
 
		xmlSAX2StartElementNs		(void *ctx,
 
						 const xmlChar *localname,
 
						 const xmlChar *prefix,
 
						 const xmlChar *URI,
 
						 int nb_namespaces,
 
						 const xmlChar **namespaces,
 
						 int nb_attributes,
 
						 int nb_defaulted,
 
						 const xmlChar **attributes);
 
XMLPUBFUN void XMLCALL
 
		xmlSAX2EndElementNs		(void *ctx,
 
						 const xmlChar *localname,
 
						 const xmlChar *prefix,
 
						 const xmlChar *URI);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2Reference		(void *ctx,
 
						 const xmlChar *name);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2Characters		(void *ctx,
 
						 const xmlChar *ch,
 
						 int len);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2IgnorableWhitespace	(void *ctx,
 
						 const xmlChar *ch,
 
						 int len);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2ProcessingInstruction	(void *ctx,
 
						 const xmlChar *target,
 
						 const xmlChar *data);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2Comment			(void *ctx,
 
						 const xmlChar *value);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2CDataBlock		(void *ctx,
 
						 const xmlChar *value,
 
						 int len);
 

	
 
#ifdef LIBXML_SAX1_ENABLED
 
XMLPUBFUN int XMLCALL
 
		xmlSAXDefaultVersion		(int version);
 
#endif /* LIBXML_SAX1_ENABLED */
 

	
 
XMLPUBFUN int XMLCALL
 
		xmlSAXVersion			(xmlSAXHandler *hdlr,
 
						 int version);
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2InitDefaultSAXHandler    (xmlSAXHandler *hdlr,
 
						 int warning);
 
#ifdef LIBXML_HTML_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
 
XMLPUBFUN void XMLCALL		
 
		htmlDefaultSAXHandlerInit	(void);
 
#endif
 
#ifdef LIBXML_DOCB_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
 
XMLPUBFUN void XMLCALL		
 
		docbDefaultSAXHandlerInit	(void);
 
#endif
 
XMLPUBFUN void XMLCALL		
 
		xmlDefaultSAXHandlerInit	(void);
 
#ifdef __cplusplus
 
}
 
#endif
 
#endif /* __XML_SAX2_H__ */
lib/libxml2/include/libxml/c14n.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: Provide Canonical XML and Exclusive XML Canonicalization
 
 * Description: the c14n modules provides a
 
 *
 
 * "Canonical XML" implementation
 
 * http://www.w3.org/TR/xml-c14n
 
 *
 
 * and an
 
 *
 
 * "Exclusive XML Canonicalization" implementation
 
 * http://www.w3.org/TR/xml-exc-c14n
 

	
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Aleksey Sanin <aleksey@aleksey.com>
 
 */
 
#ifndef __XML_C14N_H__
 
#define __XML_C14N_H__
 
#ifdef LIBXML_C14N_ENABLED
 
#ifdef LIBXML_OUTPUT_ENABLED
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif /* __cplusplus */
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/tree.h>
 
#include <libxml/xpath.h>
 

	
 
/*
 
 * XML Canonicazation
 
 * http://www.w3.org/TR/xml-c14n
 
 *
 
 * Exclusive XML Canonicazation
 
 * http://www.w3.org/TR/xml-exc-c14n
 
 *
 
 * Canonical form of an XML document could be created if and only if
 
 *  a) default attributes (if any) are added to all nodes
 
 *  b) all character and parsed entity references are resolved
 
 * In order to achive this in libxml2 the document MUST be loaded with
 
 * following global setings:
 
 *
 
 *    xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
 
 *    xmlSubstituteEntitiesDefault(1);
 
 *
 
 * or corresponding parser context setting:
 
 *    xmlParserCtxtPtr ctxt;
 
 *
 
 *    ...
 
 *    ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
 
 *    ctxt->replaceEntities = 1;
 
 *    ...
 
 */
 

	
 
/*
 
 * xmlC14NMode:
 
 * 
 
 * Predefined values for C14N modes
 
 *
 
 */
 
typedef enum {
 
    XML_C14N_1_0            = 0,    /* Origianal C14N 1.0 spec */
 
    XML_C14N_EXCLUSIVE_1_0  = 1,    /* Exclusive C14N 1.0 spec */
 
    XML_C14N_1_1            = 2     /* C14N 1.1 spec */
 
} xmlC14NMode;
 

	
 
XMLPUBFUN int XMLCALL
 
		xmlC14NDocSaveTo	(xmlDocPtr doc,
 
					 xmlNodeSetPtr nodes,
 
					 int mode, /* a xmlC14NMode */
 
					 xmlChar **inclusive_ns_prefixes,
 
					 int with_comments,
 
					 xmlOutputBufferPtr buf);
 

	
 
XMLPUBFUN int XMLCALL
 
		xmlC14NDocDumpMemory	(xmlDocPtr doc,
 
					 xmlNodeSetPtr nodes,
 
					 int mode, /* a xmlC14NMode */
 
					 xmlChar **inclusive_ns_prefixes,
 
					 int with_comments,
 
					 xmlChar **doc_txt_ptr);
 

	
 
XMLPUBFUN int XMLCALL
 
		xmlC14NDocSave		(xmlDocPtr doc,
 
					 xmlNodeSetPtr nodes,
 
					 int mode, /* a xmlC14NMode */
 
					 xmlChar **inclusive_ns_prefixes,
 
					 int with_comments,
 
					 const char* filename,
 
					 int compression);
 

	
 

	
 
/**
 
 * This is the core C14N function
 
 */
 
/**
 
 * xmlC14NIsVisibleCallback:
 
 * @user_data: user data
 
 * @node: the curent node
 
 * @parent: the parent node
 
 *
 
 * Signature for a C14N callback on visible nodes
 
 *
 
 * Returns 1 if the node should be included
 
 */
 
typedef int (*xmlC14NIsVisibleCallback)	(void* user_data,
 
					 xmlNodePtr node,
 
					 xmlNodePtr parent);
 

	
 
XMLPUBFUN int XMLCALL
 
		xmlC14NExecute		(xmlDocPtr doc,
 
					 xmlC14NIsVisibleCallback is_visible_callback,
 
					 void* user_data,
 
					 int mode, /* a xmlC14NMode */
 
					 xmlChar **inclusive_ns_prefixes,
 
					 int with_comments,
 
					 xmlOutputBufferPtr buf);
 

	
 
#ifdef __cplusplus
 
}
 
#endif /* __cplusplus */
 

	
 
#endif /* LIBXML_OUTPUT_ENABLED */
 
#endif /* LIBXML_C14N_ENABLED */
 
#endif /* __XML_C14N_H__ */
 

	
lib/libxml2/include/libxml/catalog.h
Show inline comments
 
new file 100755
 
/**
 
 * Summary: interfaces to the Catalog handling system
 
 * Description: the catalog module implements the support for
 
 * XML Catalogs and SGML catalogs
 
 *
 
 * SGML Open Technical Resolution TR9401:1997.
 
 * http://www.jclark.com/sp/catalog.htm
 
 *
 
 * XML Catalogs Working Draft 06 August 2001
 
 * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __XML_CATALOG_H__
 
#define __XML_CATALOG_H__
 

	
 
#include <stdio.h>
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/xmlstring.h>
 
#include <libxml/tree.h>
 

	
 
#ifdef LIBXML_CATALOG_ENABLED
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/**
 
 * XML_CATALOGS_NAMESPACE:
 
 *
 
 * The namespace for the XML Catalogs elements.
 
 */
 
#define XML_CATALOGS_NAMESPACE					\
 
    (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
 
/**
 
 * XML_CATALOG_PI:
 
 *
 
 * The specific XML Catalog Processing Instuction name.
 
 */
 
#define XML_CATALOG_PI						\
 
    (const xmlChar *) "oasis-xml-catalog"
 

	
 
/*
 
 * The API is voluntarily limited to general cataloging.
 
 */
 
typedef enum {
 
    XML_CATA_PREFER_NONE = 0,
 
    XML_CATA_PREFER_PUBLIC = 1,
 
    XML_CATA_PREFER_SYSTEM
 
} xmlCatalogPrefer;
 

	
 
typedef enum {
 
    XML_CATA_ALLOW_NONE = 0,
 
    XML_CATA_ALLOW_GLOBAL = 1,
 
    XML_CATA_ALLOW_DOCUMENT = 2,
 
    XML_CATA_ALLOW_ALL = 3
 
} xmlCatalogAllow;
 

	
 
typedef struct _xmlCatalog xmlCatalog;
 
typedef xmlCatalog *xmlCatalogPtr;
 

	
 
/*
 
 * Operations on a given catalog.
 
 */
 
XMLPUBFUN xmlCatalogPtr XMLCALL
 
		xmlNewCatalog		(int sgml);
 
XMLPUBFUN xmlCatalogPtr XMLCALL	
 
		xmlLoadACatalog		(const char *filename);
 
XMLPUBFUN xmlCatalogPtr XMLCALL	
 
		xmlLoadSGMLSuperCatalog	(const char *filename);
 
XMLPUBFUN int XMLCALL		
 
		xmlConvertSGMLCatalog	(xmlCatalogPtr catal);
 
XMLPUBFUN int XMLCALL		
 
		xmlACatalogAdd		(xmlCatalogPtr catal,
 
					 const xmlChar *type,
 
					 const xmlChar *orig,
 
					 const xmlChar *replace);
 
XMLPUBFUN int XMLCALL		
 
		xmlACatalogRemove	(xmlCatalogPtr catal,
 
					 const xmlChar *value);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlACatalogResolve	(xmlCatalogPtr catal,
 
					 const xmlChar *pubID,
 
	                                 const xmlChar *sysID);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlACatalogResolveSystem(xmlCatalogPtr catal,
 
					 const xmlChar *sysID);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlACatalogResolvePublic(xmlCatalogPtr catal,
 
					 const xmlChar *pubID);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlACatalogResolveURI	(xmlCatalogPtr catal,
 
					 const xmlChar *URI);
 
#ifdef LIBXML_OUTPUT_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		xmlACatalogDump		(xmlCatalogPtr catal,
 
					 FILE *out);
 
#endif /* LIBXML_OUTPUT_ENABLED */
 
XMLPUBFUN void XMLCALL		
 
		xmlFreeCatalog		(xmlCatalogPtr catal);
 
XMLPUBFUN int XMLCALL		
 
		xmlCatalogIsEmpty	(xmlCatalogPtr catal);
 

	
 
/*
 
 * Global operations.
 
 */
 
XMLPUBFUN void XMLCALL		
 
		xmlInitializeCatalog	(void);
 
XMLPUBFUN int XMLCALL		
 
		xmlLoadCatalog		(const char *filename);
 
XMLPUBFUN void XMLCALL		
 
		xmlLoadCatalogs		(const char *paths);
 
XMLPUBFUN void XMLCALL		
 
		xmlCatalogCleanup	(void);
 
#ifdef LIBXML_OUTPUT_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		xmlCatalogDump		(FILE *out);
 
#endif /* LIBXML_OUTPUT_ENABLED */
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlCatalogResolve	(const xmlChar *pubID,
 
	                                 const xmlChar *sysID);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlCatalogResolveSystem	(const xmlChar *sysID);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlCatalogResolvePublic	(const xmlChar *pubID);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlCatalogResolveURI	(const xmlChar *URI);
 
XMLPUBFUN int XMLCALL		
 
		xmlCatalogAdd		(const xmlChar *type,
 
					 const xmlChar *orig,
 
					 const xmlChar *replace);
 
XMLPUBFUN int XMLCALL		
 
		xmlCatalogRemove	(const xmlChar *value);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlParseCatalogFile	(const char *filename);
 
XMLPUBFUN int XMLCALL		
 
		xmlCatalogConvert	(void);
 

	
 
/*
 
 * Strictly minimal interfaces for per-document catalogs used
 
 * by the parser.
 
 */
 
XMLPUBFUN void XMLCALL		
 
		xmlCatalogFreeLocal	(void *catalogs);
 
XMLPUBFUN void * XMLCALL		
 
		xmlCatalogAddLocal	(void *catalogs,
 
					 const xmlChar *URL);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlCatalogLocalResolve	(void *catalogs,
 
					 const xmlChar *pubID,
 
	                                 const xmlChar *sysID);
 
XMLPUBFUN xmlChar * XMLCALL	
 
		xmlCatalogLocalResolveURI(void *catalogs,
 
					 const xmlChar *URI);
 
/*
 
 * Preference settings.
 
 */
 
XMLPUBFUN int XMLCALL		
 
		xmlCatalogSetDebug	(int level);
 
XMLPUBFUN xmlCatalogPrefer XMLCALL 
 
		xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
 
XMLPUBFUN void XMLCALL		
 
		xmlCatalogSetDefaults	(xmlCatalogAllow allow);
 
XMLPUBFUN xmlCatalogAllow XMLCALL	
 
		xmlCatalogGetDefaults	(void);
 

	
 

	
 
/* DEPRECATED interfaces */
 
XMLPUBFUN const xmlChar * XMLCALL	
 
		xmlCatalogGetSystem	(const xmlChar *sysID);
 
XMLPUBFUN const xmlChar * XMLCALL	
 
		xmlCatalogGetPublic	(const xmlChar *pubID);
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 
#endif /* LIBXML_CATALOG_ENABLED */
 
#endif /* __XML_CATALOG_H__ */
lib/libxml2/include/libxml/chvalid.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: Unicode character range checking
 
 * Description: this module exports interfaces for the character
 
 *               range validation APIs
 
 *
 
 * This file is automatically generated from the cvs source
 
 * definition files using the genChRanges.py Python script
 
 *
 
 * Generation date: Mon Mar 27 11:09:48 2006
 
 * Sources: chvalid.def
 
 * Author: William Brack <wbrack@mmm.com.hk>
 
 */
 

	
 
#ifndef __XML_CHVALID_H__
 
#define __XML_CHVALID_H__
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/xmlstring.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * Define our typedefs and structures
 
 *
 
 */
 
typedef struct _xmlChSRange xmlChSRange;
 
typedef xmlChSRange *xmlChSRangePtr;
 
struct _xmlChSRange {
 
    unsigned short	low;
 
    unsigned short	high;
 
};
 

	
 
typedef struct _xmlChLRange xmlChLRange;
 
typedef xmlChLRange *xmlChLRangePtr;
 
struct _xmlChLRange {
 
    unsigned int	low;
 
    unsigned int	high;
 
};
 

	
 
typedef struct _xmlChRangeGroup xmlChRangeGroup;
 
typedef xmlChRangeGroup *xmlChRangeGroupPtr;
 
struct _xmlChRangeGroup {
 
    int			nbShortRange;
 
    int			nbLongRange;
 
    const xmlChSRange	*shortRange;	/* points to an array of ranges */
 
    const xmlChLRange	*longRange;
 
};
 

	
 
/**
 
 * Range checking routine
 
 */
 
XMLPUBFUN int XMLCALL
 
		xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
 

	
 

	
 
/**
 
 * xmlIsBaseChar_ch:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsBaseChar_ch(c)	(((0x41 <= (c)) && ((c) <= 0x5a)) || \
 
				 ((0x61 <= (c)) && ((c) <= 0x7a)) || \
 
				 ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
 
				 ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
 
				  (0xf8 <= (c)))
 

	
 
/**
 
 * xmlIsBaseCharQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsBaseCharQ(c)	(((c) < 0x100) ? \
 
				 xmlIsBaseChar_ch((c)) : \
 
				 xmlCharInRange((c), &xmlIsBaseCharGroup))
 

	
 
XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
 

	
 
/**
 
 * xmlIsBlank_ch:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsBlank_ch(c)	(((c) == 0x20) || \
 
				 ((0x9 <= (c)) && ((c) <= 0xa)) || \
 
				 ((c) == 0xd))
 

	
 
/**
 
 * xmlIsBlankQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsBlankQ(c)		(((c) < 0x100) ? \
 
				 xmlIsBlank_ch((c)) : 0)
 

	
 

	
 
/**
 
 * xmlIsChar_ch:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsChar_ch(c)		(((0x9 <= (c)) && ((c) <= 0xa)) || \
 
				 ((c) == 0xd) || \
 
				  (0x20 <= (c)))
 

	
 
/**
 
 * xmlIsCharQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsCharQ(c)		(((c) < 0x100) ? \
 
				 xmlIsChar_ch((c)) :\
 
				(((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
 
				 ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
 
				 ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
 

	
 
XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
 

	
 
/**
 
 * xmlIsCombiningQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsCombiningQ(c)	(((c) < 0x100) ? \
 
				 0 : \
 
				 xmlCharInRange((c), &xmlIsCombiningGroup))
 

	
 
XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
 

	
 
/**
 
 * xmlIsDigit_ch:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsDigit_ch(c)	(((0x30 <= (c)) && ((c) <= 0x39)))
 

	
 
/**
 
 * xmlIsDigitQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsDigitQ(c)		(((c) < 0x100) ? \
 
				 xmlIsDigit_ch((c)) : \
 
				 xmlCharInRange((c), &xmlIsDigitGroup))
 

	
 
XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
 

	
 
/**
 
 * xmlIsExtender_ch:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsExtender_ch(c)	(((c) == 0xb7))
 

	
 
/**
 
 * xmlIsExtenderQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsExtenderQ(c)	(((c) < 0x100) ? \
 
				 xmlIsExtender_ch((c)) : \
 
				 xmlCharInRange((c), &xmlIsExtenderGroup))
 

	
 
XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
 

	
 
/**
 
 * xmlIsIdeographicQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsIdeographicQ(c)	(((c) < 0x100) ? \
 
				 0 :\
 
				(((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
 
				 ((c) == 0x3007) || \
 
				 ((0x3021 <= (c)) && ((c) <= 0x3029))))
 

	
 
XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
 
XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
 

	
 
/**
 
 * xmlIsPubidChar_ch:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsPubidChar_ch(c)	(xmlIsPubidChar_tab[(c)])
 

	
 
/**
 
 * xmlIsPubidCharQ:
 
 * @c: char to validate
 
 *
 
 * Automatically generated by genChRanges.py
 
 */
 
#define xmlIsPubidCharQ(c)	(((c) < 0x100) ? \
 
				 xmlIsPubidChar_ch((c)) : 0)
 

	
 
XMLPUBFUN int XMLCALL
 
		xmlIsBaseChar(unsigned int ch);
 
XMLPUBFUN int XMLCALL
 
		xmlIsBlank(unsigned int ch);
 
XMLPUBFUN int XMLCALL
 
		xmlIsChar(unsigned int ch);
 
XMLPUBFUN int XMLCALL
 
		xmlIsCombining(unsigned int ch);
 
XMLPUBFUN int XMLCALL
 
		xmlIsDigit(unsigned int ch);
 
XMLPUBFUN int XMLCALL
 
		xmlIsExtender(unsigned int ch);
 
XMLPUBFUN int XMLCALL
 
		xmlIsIdeographic(unsigned int ch);
 
XMLPUBFUN int XMLCALL
 
		xmlIsPubidChar(unsigned int ch);
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 
#endif /* __XML_CHVALID_H__ */
lib/libxml2/include/libxml/debugXML.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: Tree debugging APIs
 
 * Description: Interfaces to a set of routines used for debugging the tree
 
 *              produced by the XML parser.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __DEBUG_XML__
 
#define __DEBUG_XML__
 
#include <stdio.h>
 
#include <libxml/xmlversion.h>
 
#include <libxml/tree.h>
 

	
 
#ifdef LIBXML_DEBUG_ENABLED
 

	
 
#include <libxml/xpath.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * The standard Dump routines.
 
 */
 
XMLPUBFUN void XMLCALL	
 
	xmlDebugDumpString	(FILE *output,
 
				 const xmlChar *str);
 
XMLPUBFUN void XMLCALL	
 
	xmlDebugDumpAttr	(FILE *output,
 
				 xmlAttrPtr attr,
 
				 int depth);
 
XMLPUBFUN void XMLCALL	
 
	xmlDebugDumpAttrList	(FILE *output,
 
				 xmlAttrPtr attr,
 
				 int depth);
 
XMLPUBFUN void XMLCALL	
 
	xmlDebugDumpOneNode	(FILE *output,
 
				 xmlNodePtr node,
 
				 int depth);
 
XMLPUBFUN void XMLCALL
 
	xmlDebugDumpNode	(FILE *output,
 
				 xmlNodePtr node,
 
				 int depth);
 
XMLPUBFUN void XMLCALL
 
	xmlDebugDumpNodeList	(FILE *output,
 
				 xmlNodePtr node,
 
				 int depth);
 
XMLPUBFUN void XMLCALL
 
	xmlDebugDumpDocumentHead(FILE *output,
 
				 xmlDocPtr doc);
 
XMLPUBFUN void XMLCALL
 
	xmlDebugDumpDocument	(FILE *output,
 
				 xmlDocPtr doc);
 
XMLPUBFUN void XMLCALL	
 
	xmlDebugDumpDTD		(FILE *output,
 
				 xmlDtdPtr dtd);
 
XMLPUBFUN void XMLCALL	
 
	xmlDebugDumpEntities	(FILE *output,
 
				 xmlDocPtr doc);
 

	
 
/****************************************************************
 
 *								*
 
 *	 		Checking routines			*
 
 *								*
 
 ****************************************************************/
 

	
 
XMLPUBFUN int XMLCALL
 
	xmlDebugCheckDocument	(FILE * output,
 
				 xmlDocPtr doc);
 

	
 
/****************************************************************
 
 *								*
 
 *	 		XML shell helpers			*
 
 *								*
 
 ****************************************************************/
 

	
 
XMLPUBFUN void XMLCALL	
 
	xmlLsOneNode		(FILE *output, xmlNodePtr node);
 
XMLPUBFUN int XMLCALL	
 
	xmlLsCountNode		(xmlNodePtr node);
 

	
 
XMLPUBFUN const char * XMLCALL 
 
	xmlBoolToText		(int boolval);
 

	
 
/****************************************************************
 
 *								*
 
 *	 The XML shell related structures and functions		*
 
 *								*
 
 ****************************************************************/
 

	
 
#ifdef LIBXML_XPATH_ENABLED
 
/**
 
 * xmlShellReadlineFunc:
 
 * @prompt:  a string prompt
 
 *
 
 * This is a generic signature for the XML shell input function.
 
 *
 
 * Returns a string which will be freed by the Shell.
 
 */
 
typedef char * (* xmlShellReadlineFunc)(char *prompt);
 

	
 
/**
 
 * xmlShellCtxt:
 
 *
 
 * A debugging shell context.
 
 * TODO: add the defined function tables.
 
 */
 
typedef struct _xmlShellCtxt xmlShellCtxt;
 
typedef xmlShellCtxt *xmlShellCtxtPtr;
 
struct _xmlShellCtxt {
 
    char *filename;
 
    xmlDocPtr doc;
 
    xmlNodePtr node;
 
    xmlXPathContextPtr pctxt;
 
    int loaded;
 
    FILE *output;
 
    xmlShellReadlineFunc input;
 
};
 

	
 
/**
 
 * xmlShellCmd:
 
 * @ctxt:  a shell context
 
 * @arg:  a string argument
 
 * @node:  a first node
 
 * @node2:  a second node
 
 *
 
 * This is a generic signature for the XML shell functions.
 
 *
 
 * Returns an int, negative returns indicating errors.
 
 */
 
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
 
                             char *arg,
 
			     xmlNodePtr node,
 
			     xmlNodePtr node2);
 

	
 
XMLPUBFUN void XMLCALL	
 
	xmlShellPrintXPathError	(int errorType,
 
				 const char *arg);
 
XMLPUBFUN void XMLCALL	
 
	xmlShellPrintXPathResult(xmlXPathObjectPtr list);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellList		(xmlShellCtxtPtr ctxt,
 
				 char *arg,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellBase		(xmlShellCtxtPtr ctxt,
 
				 char *arg,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellDir		(xmlShellCtxtPtr ctxt,
 
				 char *arg,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellLoad		(xmlShellCtxtPtr ctxt,
 
				 char *filename,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
#ifdef LIBXML_OUTPUT_ENABLED
 
XMLPUBFUN void XMLCALL	
 
	xmlShellPrintNode	(xmlNodePtr node);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellCat		(xmlShellCtxtPtr ctxt,
 
				 char *arg,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellWrite		(xmlShellCtxtPtr ctxt,
 
				 char *filename,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellSave		(xmlShellCtxtPtr ctxt,
 
				 char *filename,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
#endif /* LIBXML_OUTPUT_ENABLED */
 
#ifdef LIBXML_VALID_ENABLED
 
XMLPUBFUN int XMLCALL	
 
	xmlShellValidate	(xmlShellCtxtPtr ctxt,
 
				 char *dtd,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 
#endif /* LIBXML_VALID_ENABLED */
 
XMLPUBFUN int XMLCALL	
 
	xmlShellDu		(xmlShellCtxtPtr ctxt,
 
				 char *arg,
 
				 xmlNodePtr tree,
 
				 xmlNodePtr node2);
 
XMLPUBFUN int XMLCALL	
 
	xmlShellPwd		(xmlShellCtxtPtr ctxt,
 
				 char *buffer,
 
				 xmlNodePtr node,
 
				 xmlNodePtr node2);
 

	
 
/*
 
 * The Shell interface.
 
 */
 
XMLPUBFUN void XMLCALL	
 
	xmlShell		(xmlDocPtr doc,
 
				 char *filename,
 
				 xmlShellReadlineFunc input,
 
				 FILE *output);
 
			 
 
#endif /* LIBXML_XPATH_ENABLED */
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* LIBXML_DEBUG_ENABLED */
 
#endif /* __DEBUG_XML__ */
lib/libxml2/include/libxml/dict.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: string dictionnary
 
 * Description: dictionary of reusable strings, just used to avoid allocation
 
 *         and freeing operations.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __XML_DICT_H__
 
#define __XML_DICT_H__
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/tree.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * The dictionnary.
 
 */
 
typedef struct _xmlDict xmlDict;
 
typedef xmlDict *xmlDictPtr;
 

	
 
/*
 
 * Constructor and destructor.
 
 */
 
XMLPUBFUN xmlDictPtr XMLCALL
 
			xmlDictCreate	(void);
 
XMLPUBFUN xmlDictPtr XMLCALL
 
			xmlDictCreateSub(xmlDictPtr sub);
 
XMLPUBFUN int XMLCALL
 
			xmlDictReference(xmlDictPtr dict);
 
XMLPUBFUN void XMLCALL			
 
			xmlDictFree	(xmlDictPtr dict);
 

	
 
/*
 
 * Lookup of entry in the dictionnary.
 
 */
 
XMLPUBFUN const xmlChar * XMLCALL		
 
			xmlDictLookup	(xmlDictPtr dict,
 
		                         const xmlChar *name,
 
		                         int len);
 
XMLPUBFUN const xmlChar * XMLCALL		
 
			xmlDictExists	(xmlDictPtr dict,
 
		                         const xmlChar *name,
 
		                         int len);
 
XMLPUBFUN const xmlChar * XMLCALL		
 
			xmlDictQLookup	(xmlDictPtr dict,
 
		                         const xmlChar *prefix,
 
		                         const xmlChar *name);
 
XMLPUBFUN int XMLCALL
 
			xmlDictOwns	(xmlDictPtr dict,
 
					 const xmlChar *str);
 
XMLPUBFUN int XMLCALL			
 
			xmlDictSize	(xmlDictPtr dict);
 

	
 
/*
 
 * Cleanup function
 
 */
 
XMLPUBFUN void XMLCALL
 
                        xmlDictCleanup  (void);
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 
#endif /* ! __XML_DICT_H__ */
lib/libxml2/include/libxml/encoding.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: interface for the encoding conversion functions
 
 * Description: interface for the encoding conversion functions needed for
 
 *              XML basic encoding and iconv() support.
 
 *
 
 * Related specs are
 
 * rfc2044        (UTF-8 and UTF-16) F. Yergeau Alis Technologies
 
 * [ISO-10646]    UTF-8 and UTF-16 in Annexes
 
 * [ISO-8859-1]   ISO Latin-1 characters codes.
 
 * [UNICODE]      The Unicode Consortium, "The Unicode Standard --
 
 *                Worldwide Character Encoding -- Version 1.0", Addison-
 
 *                Wesley, Volume 1, 1991, Volume 2, 1992.  UTF-8 is
 
 *                described in Unicode Technical Report #4.
 
 * [US-ASCII]     Coded Character Set--7-bit American Standard Code for
 
 *                Information Interchange, ANSI X3.4-1986.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __XML_CHAR_ENCODING_H__
 
#define __XML_CHAR_ENCODING_H__
 

	
 
#include <libxml/xmlversion.h>
 

	
 
#ifdef LIBXML_ICONV_ENABLED
 
#include <iconv.h>
 
#endif
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * xmlCharEncoding:
 
 *
 
 * Predefined values for some standard encodings.
 
 * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
 
 * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
 
 *
 
 * Anything else would have to be translated to UTF8 before being
 
 * given to the parser itself. The BOM for UTF16 and the encoding
 
 * declaration are looked at and a converter is looked for at that
 
 * point. If not found the parser stops here as asked by the XML REC. A
 
 * converter can be registered by the user using xmlRegisterCharEncodingHandler
 
 * but the current form doesn't allow stateful transcoding (a serious
 
 * problem agreed !). If iconv has been found it will be used
 
 * automatically and allow stateful transcoding, the simplest is then
 
 * to be sure to enable iconv and to provide iconv libs for the encoding
 
 * support needed.
 
 *
 
 * Note that the generic "UTF-16" is not a predefined value.  Instead, only
 
 * the specific UTF-16LE and UTF-16BE are present.
 
 */
 
typedef enum {
 
    XML_CHAR_ENCODING_ERROR=   -1, /* No char encoding detected */
 
    XML_CHAR_ENCODING_NONE=	0, /* No char encoding detected */
 
    XML_CHAR_ENCODING_UTF8=	1, /* UTF-8 */
 
    XML_CHAR_ENCODING_UTF16LE=	2, /* UTF-16 little endian */
 
    XML_CHAR_ENCODING_UTF16BE=	3, /* UTF-16 big endian */
 
    XML_CHAR_ENCODING_UCS4LE=	4, /* UCS-4 little endian */
 
    XML_CHAR_ENCODING_UCS4BE=	5, /* UCS-4 big endian */
 
    XML_CHAR_ENCODING_EBCDIC=	6, /* EBCDIC uh! */
 
    XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
 
    XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
 
    XML_CHAR_ENCODING_UCS2=	9, /* UCS-2 */
 
    XML_CHAR_ENCODING_8859_1=	10,/* ISO-8859-1 ISO Latin 1 */
 
    XML_CHAR_ENCODING_8859_2=	11,/* ISO-8859-2 ISO Latin 2 */
 
    XML_CHAR_ENCODING_8859_3=	12,/* ISO-8859-3 */
 
    XML_CHAR_ENCODING_8859_4=	13,/* ISO-8859-4 */
 
    XML_CHAR_ENCODING_8859_5=	14,/* ISO-8859-5 */
 
    XML_CHAR_ENCODING_8859_6=	15,/* ISO-8859-6 */
 
    XML_CHAR_ENCODING_8859_7=	16,/* ISO-8859-7 */
 
    XML_CHAR_ENCODING_8859_8=	17,/* ISO-8859-8 */
 
    XML_CHAR_ENCODING_8859_9=	18,/* ISO-8859-9 */
 
    XML_CHAR_ENCODING_2022_JP=  19,/* ISO-2022-JP */
 
    XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
 
    XML_CHAR_ENCODING_EUC_JP=   21,/* EUC-JP */
 
    XML_CHAR_ENCODING_ASCII=    22 /* pure ASCII */
 
} xmlCharEncoding;
 

	
 
/**
 
 * xmlCharEncodingInputFunc:
 
 * @out:  a pointer to an array of bytes to store the UTF-8 result
 
 * @outlen:  the length of @out
 
 * @in:  a pointer to an array of chars in the original encoding
 
 * @inlen:  the length of @in
 
 *
 
 * Take a block of chars in the original encoding and try to convert
 
 * it to an UTF-8 block of chars out.
 
 *
 
 * Returns the number of bytes written, -1 if lack of space, or -2
 
 *     if the transcoding failed.
 
 * The value of @inlen after return is the number of octets consumed
 
 *     if the return value is positive, else unpredictiable.
 
 * The value of @outlen after return is the number of octets consumed.
 
 */
 
typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
 
                                         const unsigned char *in, int *inlen);
 

	
 

	
 
/**
 
 * xmlCharEncodingOutputFunc:
 
 * @out:  a pointer to an array of bytes to store the result
 
 * @outlen:  the length of @out
 
 * @in:  a pointer to an array of UTF-8 chars
 
 * @inlen:  the length of @in
 
 *
 
 * Take a block of UTF-8 chars in and try to convert it to another
 
 * encoding.
 
 * Note: a first call designed to produce heading info is called with
 
 * in = NULL. If stateful this should also initialize the encoder state.
 
 *
 
 * Returns the number of bytes written, -1 if lack of space, or -2
 
 *     if the transcoding failed.
 
 * The value of @inlen after return is the number of octets consumed
 
 *     if the return value is positive, else unpredictiable.
 
 * The value of @outlen after return is the number of octets produced.
 
 */
 
typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
 
                                          const unsigned char *in, int *inlen);
 

	
 

	
 
/*
 
 * Block defining the handlers for non UTF-8 encodings.
 
 * If iconv is supported, there are two extra fields.
 
 */
 

	
 
typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
 
typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
 
struct _xmlCharEncodingHandler {
 
    char                       *name;
 
    xmlCharEncodingInputFunc   input;
 
    xmlCharEncodingOutputFunc  output;
 
#ifdef LIBXML_ICONV_ENABLED
 
    iconv_t                    iconv_in;
 
    iconv_t                    iconv_out;
 
#endif /* LIBXML_ICONV_ENABLED */
 
};
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 
#include <libxml/tree.h>
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * Interfaces for encoding handlers.
 
 */
 
XMLPUBFUN void XMLCALL	
 
	xmlInitCharEncodingHandlers	(void);
 
XMLPUBFUN void XMLCALL	
 
	xmlCleanupCharEncodingHandlers	(void);
 
XMLPUBFUN void XMLCALL	
 
	xmlRegisterCharEncodingHandler	(xmlCharEncodingHandlerPtr handler);
 
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
 
	xmlGetCharEncodingHandler	(xmlCharEncoding enc);
 
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
 
	xmlFindCharEncodingHandler	(const char *name);
 
XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
 
	xmlNewCharEncodingHandler	(const char *name, 
 
                          		 xmlCharEncodingInputFunc input,
 
                          		 xmlCharEncodingOutputFunc output);
 

	
 
/*
 
 * Interfaces for encoding names and aliases.
 
 */
 
XMLPUBFUN int XMLCALL	
 
	xmlAddEncodingAlias		(const char *name,
 
					 const char *alias);
 
XMLPUBFUN int XMLCALL	
 
	xmlDelEncodingAlias		(const char *alias);
 
XMLPUBFUN const char * XMLCALL
 
	xmlGetEncodingAlias		(const char *alias);
 
XMLPUBFUN void XMLCALL	
 
	xmlCleanupEncodingAliases	(void);
 
XMLPUBFUN xmlCharEncoding XMLCALL
 
	xmlParseCharEncoding		(const char *name);
 
XMLPUBFUN const char * XMLCALL
 
	xmlGetCharEncodingName		(xmlCharEncoding enc);
 

	
 
/*
 
 * Interfaces directly used by the parsers.
 
 */
 
XMLPUBFUN xmlCharEncoding XMLCALL
 
	xmlDetectCharEncoding		(const unsigned char *in,
 
					 int len);
 

	
 
XMLPUBFUN int XMLCALL	
 
	xmlCharEncOutFunc		(xmlCharEncodingHandler *handler,
 
					 xmlBufferPtr out,
 
					 xmlBufferPtr in);
 

	
 
XMLPUBFUN int XMLCALL	
 
	xmlCharEncInFunc		(xmlCharEncodingHandler *handler,
 
					 xmlBufferPtr out,
 
					 xmlBufferPtr in);
 
XMLPUBFUN int XMLCALL
 
	xmlCharEncFirstLine		(xmlCharEncodingHandler *handler,
 
					 xmlBufferPtr out,
 
					 xmlBufferPtr in);
 
XMLPUBFUN int XMLCALL	
 
	xmlCharEncCloseFunc		(xmlCharEncodingHandler *handler);
 

	
 
/*
 
 * Export a few useful functions
 
 */
 
#ifdef LIBXML_OUTPUT_ENABLED
 
XMLPUBFUN int XMLCALL	
 
	UTF8Toisolat1			(unsigned char *out,
 
					 int *outlen,
 
					 const unsigned char *in,
 
					 int *inlen);
 
#endif /* LIBXML_OUTPUT_ENABLED */
 
XMLPUBFUN int XMLCALL	
 
	isolat1ToUTF8			(unsigned char *out,
 
					 int *outlen,
 
					 const unsigned char *in,
 
					 int *inlen);
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* __XML_CHAR_ENCODING_H__ */
lib/libxml2/include/libxml/entities.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: interface for the XML entities handling
 
 * Description: this module provides some of the entity API needed
 
 *              for the parser and applications.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __XML_ENTITIES_H__
 
#define __XML_ENTITIES_H__
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/tree.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * The different valid entity types.
 
 */
 
typedef enum {
 
    XML_INTERNAL_GENERAL_ENTITY = 1,
 
    XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
 
    XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
 
    XML_INTERNAL_PARAMETER_ENTITY = 4,
 
    XML_EXTERNAL_PARAMETER_ENTITY = 5,
 
    XML_INTERNAL_PREDEFINED_ENTITY = 6
 
} xmlEntityType;
 

	
 
/*
 
 * An unit of storage for an entity, contains the string, the value
 
 * and the linkind data needed for the linking in the hash table.
 
 */
 

	
 
struct _xmlEntity {
 
    void           *_private;	        /* application data */
 
    xmlElementType          type;       /* XML_ENTITY_DECL, must be second ! */
 
    const xmlChar          *name;	/* Entity name */
 
    struct _xmlNode    *children;	/* First child link */
 
    struct _xmlNode        *last;	/* Last child link */
 
    struct _xmlDtd       *parent;	/* -> DTD */
 
    struct _xmlNode        *next;	/* next sibling link  */
 
    struct _xmlNode        *prev;	/* previous sibling link  */
 
    struct _xmlDoc          *doc;       /* the containing document */
 

	
 
    xmlChar                *orig;	/* content without ref substitution */
 
    xmlChar             *content;	/* content or ndata if unparsed */
 
    int                   length;	/* the content length */
 
    xmlEntityType          etype;	/* The entity type */
 
    const xmlChar    *ExternalID;	/* External identifier for PUBLIC */
 
    const xmlChar      *SystemID;	/* URI for a SYSTEM or PUBLIC Entity */
 

	
 
    struct _xmlEntity     *nexte;	/* unused */
 
    const xmlChar           *URI;	/* the full URI as computed */
 
    int                    owner;	/* does the entity own the childrens */
 
    int			 checked;	/* was the entity content checked */
 
					/* this is also used to count entites
 
					 * references done from that entity */
 
};
 

	
 
/*
 
 * All entities are stored in an hash table.
 
 * There is 2 separate hash tables for global and parameter entities.
 
 */
 

	
 
typedef struct _xmlHashTable xmlEntitiesTable;
 
typedef xmlEntitiesTable *xmlEntitiesTablePtr;
 

	
 
/*
 
 * External functions:
 
 */
 

	
 
#ifdef LIBXML_LEGACY_ENABLED
 
XMLPUBFUN void XMLCALL
 
		xmlInitializePredefinedEntities	(void);
 
#endif /* LIBXML_LEGACY_ENABLED */
 

	
 
XMLPUBFUN xmlEntityPtr XMLCALL
 
			xmlNewEntity		(xmlDocPtr doc,
 
						 const xmlChar *name,
 
						 int type,
 
						 const xmlChar *ExternalID,
 
						 const xmlChar *SystemID,
 
						 const xmlChar *content);
 
XMLPUBFUN xmlEntityPtr XMLCALL
 
			xmlAddDocEntity		(xmlDocPtr doc,
 
						 const xmlChar *name,
 
						 int type,
 
						 const xmlChar *ExternalID,
 
						 const xmlChar *SystemID,
 
						 const xmlChar *content);
 
XMLPUBFUN xmlEntityPtr XMLCALL
 
			xmlAddDtdEntity		(xmlDocPtr doc,
 
						 const xmlChar *name,
 
						 int type,
 
						 const xmlChar *ExternalID,
 
						 const xmlChar *SystemID,
 
						 const xmlChar *content);
 
XMLPUBFUN xmlEntityPtr XMLCALL
 
			xmlGetPredefinedEntity	(const xmlChar *name);
 
XMLPUBFUN xmlEntityPtr XMLCALL
 
			xmlGetDocEntity		(xmlDocPtr doc,
 
						 const xmlChar *name);
 
XMLPUBFUN xmlEntityPtr XMLCALL
 
			xmlGetDtdEntity		(xmlDocPtr doc,
 
						 const xmlChar *name);
 
XMLPUBFUN xmlEntityPtr XMLCALL
 
			xmlGetParameterEntity	(xmlDocPtr doc,
 
						 const xmlChar *name);
 
#ifdef LIBXML_LEGACY_ENABLED
 
XMLPUBFUN const xmlChar * XMLCALL
 
			xmlEncodeEntities	(xmlDocPtr doc,
 
						 const xmlChar *input);
 
#endif /* LIBXML_LEGACY_ENABLED */
 
XMLPUBFUN xmlChar * XMLCALL
 
			xmlEncodeEntitiesReentrant(xmlDocPtr doc,
 
						 const xmlChar *input);
 
XMLPUBFUN xmlChar * XMLCALL
 
			xmlEncodeSpecialChars	(xmlDocPtr doc,
 
						 const xmlChar *input);
 
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
 
			xmlCreateEntitiesTable	(void);
 
#ifdef LIBXML_TREE_ENABLED
 
XMLPUBFUN xmlEntitiesTablePtr XMLCALL
 
			xmlCopyEntitiesTable	(xmlEntitiesTablePtr table);
 
#endif /* LIBXML_TREE_ENABLED */
 
XMLPUBFUN void XMLCALL
 
			xmlFreeEntitiesTable	(xmlEntitiesTablePtr table);
 
#ifdef LIBXML_OUTPUT_ENABLED
 
XMLPUBFUN void XMLCALL
 
			xmlDumpEntitiesTable	(xmlBufferPtr buf,
 
						 xmlEntitiesTablePtr table);
 
XMLPUBFUN void XMLCALL
 
			xmlDumpEntityDecl	(xmlBufferPtr buf,
 
						 xmlEntityPtr ent);
 
#endif /* LIBXML_OUTPUT_ENABLED */
 
#ifdef LIBXML_LEGACY_ENABLED
 
XMLPUBFUN void XMLCALL
 
			xmlCleanupPredefinedEntities(void);
 
#endif /* LIBXML_LEGACY_ENABLED */
 

	
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
# endif /* __XML_ENTITIES_H__ */
lib/libxml2/include/libxml/globals.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: interface for all global variables of the library
 
 * Description: all the global variables and thread handling for
 
 *              those variables is handled by this module.
 
 *
 
 * The bottom of this file is automatically generated by build_glob.py
 
 * based on the description file global.data
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard
 
 */
 

	
 
#ifndef __XML_GLOBALS_H
 
#define __XML_GLOBALS_H
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/parser.h>
 
#include <libxml/xmlerror.h>
 
#include <libxml/SAX.h>
 
#include <libxml/SAX2.h>
 
#include <libxml/xmlmemory.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
XMLPUBFUN void XMLCALL xmlInitGlobals(void);
 
XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
 

	
 
/**
 
 * xmlParserInputBufferCreateFilenameFunc:
 
 * @URI: the URI to read from
 
 * @enc: the requested source encoding
 
 *
 
 * Signature for the function doing the lookup for a suitable input method
 
 * corresponding to an URI.
 
 *
 
 * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
 
 *         method was found.
 
 */
 
typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
 

	
 
/**
 
 * xmlOutputBufferCreateFilenameFunc:
 
 * @URI: the URI to write to
 
 * @enc: the requested target encoding
 
 *
 
 * Signature for the function doing the lookup for a suitable output method
 
 * corresponding to an URI.
 
 *
 
 * Returns the new xmlOutputBufferPtr in case of success or NULL if no
 
 *         method was found.
 
 */
 
typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
 

	
 
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
 
XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
 
XMLPUBFUN xmlOutputBufferCreateFilenameFunc
 
XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
 

	
 
/*
 
 * Externally global symbols which need to be protected for backwards
 
 * compatibility support.
 
 */
 

	
 
#undef	docbDefaultSAXHandler
 
#undef	htmlDefaultSAXHandler
 
#undef	oldXMLWDcompatibility
 
#undef	xmlBufferAllocScheme
 
#undef	xmlDefaultBufferSize
 
#undef	xmlDefaultSAXHandler
 
#undef	xmlDefaultSAXLocator
 
#undef	xmlDoValidityCheckingDefaultValue
 
#undef	xmlFree
 
#undef	xmlGenericError
 
#undef	xmlStructuredError
 
#undef	xmlGenericErrorContext
 
#undef	xmlStructuredErrorContext
 
#undef	xmlGetWarningsDefaultValue
 
#undef	xmlIndentTreeOutput
 
#undef  xmlTreeIndentString
 
#undef	xmlKeepBlanksDefaultValue
 
#undef	xmlLineNumbersDefaultValue
 
#undef	xmlLoadExtDtdDefaultValue
 
#undef	xmlMalloc
 
#undef	xmlMallocAtomic
 
#undef	xmlMemStrdup
 
#undef	xmlParserDebugEntities
 
#undef	xmlParserVersion
 
#undef	xmlPedanticParserDefaultValue
 
#undef	xmlRealloc
 
#undef	xmlSaveNoEmptyTags
 
#undef	xmlSubstituteEntitiesDefaultValue
 
#undef  xmlRegisterNodeDefaultValue
 
#undef  xmlDeregisterNodeDefaultValue
 
#undef  xmlLastError
 
#undef  xmlParserInputBufferCreateFilenameValue
 
#undef  xmlOutputBufferCreateFilenameValue
 

	
 
/**
 
 * xmlRegisterNodeFunc:
 
 * @node: the current node
 
 *
 
 * Signature for the registration callback of a created node
 
 */
 
typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
 
/**
 
 * xmlDeregisterNodeFunc:
 
 * @node: the current node
 
 *
 
 * Signature for the deregistration callback of a discarded node
 
 */
 
typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
 

	
 
typedef struct _xmlGlobalState xmlGlobalState;
 
typedef xmlGlobalState *xmlGlobalStatePtr;
 
struct _xmlGlobalState
 
{
 
	const char *xmlParserVersion;
 

	
 
	xmlSAXLocator xmlDefaultSAXLocator;
 
	xmlSAXHandlerV1 xmlDefaultSAXHandler;
 
	xmlSAXHandlerV1 docbDefaultSAXHandler;
 
	xmlSAXHandlerV1 htmlDefaultSAXHandler;
 

	
 
	xmlFreeFunc xmlFree;
 
	xmlMallocFunc xmlMalloc;
 
	xmlStrdupFunc xmlMemStrdup;
 
	xmlReallocFunc xmlRealloc;
 

	
 
	xmlGenericErrorFunc xmlGenericError;
 
	xmlStructuredErrorFunc xmlStructuredError;
 
	void *xmlGenericErrorContext;
 

	
 
	int oldXMLWDcompatibility;
 

	
 
	xmlBufferAllocationScheme xmlBufferAllocScheme;
 
	int xmlDefaultBufferSize;
 

	
 
	int xmlSubstituteEntitiesDefaultValue;
 
	int xmlDoValidityCheckingDefaultValue;
 
	int xmlGetWarningsDefaultValue;
 
	int xmlKeepBlanksDefaultValue;
 
	int xmlLineNumbersDefaultValue;
 
	int xmlLoadExtDtdDefaultValue;
 
	int xmlParserDebugEntities;
 
	int xmlPedanticParserDefaultValue;
 

	
 
	int xmlSaveNoEmptyTags;
 
	int xmlIndentTreeOutput;
 
	const char *xmlTreeIndentString;
 

	
 
	xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
 
	xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
 

	
 
	xmlMallocFunc xmlMallocAtomic;
 
	xmlError xmlLastError;
 

	
 
	xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
 
	xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
 

	
 
	void *xmlStructuredErrorContext;
 
};
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 
#include <libxml/threads.h>
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
XMLPUBFUN void XMLCALL	xmlInitializeGlobalState(xmlGlobalStatePtr gs);
 

	
 
XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
 

	
 
XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
 

	
 
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
 
XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
 
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
 
XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
 

	
 
XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
 
	xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
 
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
 
	xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
 

	
 
/** DOC_DISABLE */
 
/*
 
 * In general the memory allocation entry points are not kept
 
 * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
 
 *    - xmlMalloc
 
 *    - xmlMallocAtomic
 
 *    - xmlRealloc
 
 *    - xmlMemStrdup
 
 *    - xmlFree
 
 */
 

	
 
#ifdef LIBXML_THREAD_ALLOC_ENABLED
 
#ifdef LIBXML_THREAD_ENABLED
 
XMLPUBFUN  xmlMallocFunc * XMLCALL __xmlMalloc(void);
 
#define xmlMalloc \
 
(*(__xmlMalloc()))
 
#else
 
XMLPUBVAR xmlMallocFunc xmlMalloc;
 
#endif
 

	
 
#ifdef LIBXML_THREAD_ENABLED
 
XMLPUBFUN  xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
 
#define xmlMallocAtomic \
 
(*(__xmlMallocAtomic()))
 
#else
 
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
 
#endif
 

	
 
#ifdef LIBXML_THREAD_ENABLED
 
XMLPUBFUN  xmlReallocFunc * XMLCALL __xmlRealloc(void);
 
#define xmlRealloc \
 
(*(__xmlRealloc()))
 
#else
 
XMLPUBVAR xmlReallocFunc xmlRealloc;
 
#endif
 

	
 
#ifdef LIBXML_THREAD_ENABLED
 
XMLPUBFUN  xmlFreeFunc * XMLCALL __xmlFree(void);
 
#define xmlFree \
 
(*(__xmlFree()))
 
#else
 
XMLPUBVAR xmlFreeFunc xmlFree;
 
#endif
 

	
 
#ifdef LIBXML_THREAD_ENABLED
 
XMLPUBFUN  xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
 
#define xmlMemStrdup \
 
(*(__xmlMemStrdup()))
 
#else
 
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
 
#endif
 

	
 
#else /* !LIBXML_THREAD_ALLOC_ENABLED */
 
XMLPUBVAR xmlMallocFunc xmlMalloc;
 
XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
 
XMLPUBVAR xmlReallocFunc xmlRealloc;
 
XMLPUBVAR xmlFreeFunc xmlFree;
 
XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
 
#endif /* LIBXML_THREAD_ALLOC_ENABLED */
 

	
 
#ifdef LIBXML_DOCB_ENABLED
 
XMLPUBFUN  xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define docbDefaultSAXHandler \
 
(*(__docbDefaultSAXHandler()))
 
#else
 
XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
 
#endif
 
#endif
 

	
 
#ifdef LIBXML_HTML_ENABLED
 
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define htmlDefaultSAXHandler \
 
(*(__htmlDefaultSAXHandler()))
 
#else
 
XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
 
#endif
 
#endif
 

	
 
XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlLastError \
 
(*(__xmlLastError()))
 
#else
 
XMLPUBVAR xmlError xmlLastError;
 
#endif
 

	
 
/*
 
 * Everything starting from the line below is
 
 * Automatically generated by build_glob.py.
 
 * Do not modify the previous line.
 
 */
 

	
 

	
 
XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define oldXMLWDcompatibility \
 
(*(__oldXMLWDcompatibility()))
 
#else
 
XMLPUBVAR int oldXMLWDcompatibility;
 
#endif
 

	
 
XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlBufferAllocScheme \
 
(*(__xmlBufferAllocScheme()))
 
#else
 
XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
 
#endif
 
XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlDefaultBufferSize \
 
(*(__xmlDefaultBufferSize()))
 
#else
 
XMLPUBVAR int xmlDefaultBufferSize;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
 

	
 
XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlDefaultSAXHandler \
 
(*(__xmlDefaultSAXHandler()))
 
#else
 
XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
 
#endif
 

	
 
XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlDefaultSAXLocator \
 
(*(__xmlDefaultSAXLocator()))
 
#else
 
XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
 
#endif
 

	
 
XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlDoValidityCheckingDefaultValue \
 
(*(__xmlDoValidityCheckingDefaultValue()))
 
#else
 
XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
 

	
 
XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlGenericError \
 
(*(__xmlGenericError()))
 
#else
 
XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
 
#endif
 

	
 
XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlStructuredError \
 
(*(__xmlStructuredError()))
 
#else
 
XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
 
#endif
 

	
 
XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlGenericErrorContext \
 
(*(__xmlGenericErrorContext()))
 
#else
 
XMLPUBVAR void * xmlGenericErrorContext;
 
#endif
 

	
 
XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlStructuredErrorContext \
 
(*(__xmlStructuredErrorContext()))
 
#else
 
XMLPUBVAR void * xmlStructuredErrorContext;
 
#endif
 

	
 
XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlGetWarningsDefaultValue \
 
(*(__xmlGetWarningsDefaultValue()))
 
#else
 
XMLPUBVAR int xmlGetWarningsDefaultValue;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlIndentTreeOutput \
 
(*(__xmlIndentTreeOutput()))
 
#else
 
XMLPUBVAR int xmlIndentTreeOutput;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
 

	
 
XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlTreeIndentString \
 
(*(__xmlTreeIndentString()))
 
#else
 
XMLPUBVAR const char * xmlTreeIndentString;
 
#endif
 
XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlKeepBlanksDefaultValue \
 
(*(__xmlKeepBlanksDefaultValue()))
 
#else
 
XMLPUBVAR int xmlKeepBlanksDefaultValue;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlLineNumbersDefaultValue \
 
(*(__xmlLineNumbersDefaultValue()))
 
#else
 
XMLPUBVAR int xmlLineNumbersDefaultValue;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlLoadExtDtdDefaultValue \
 
(*(__xmlLoadExtDtdDefaultValue()))
 
#else
 
XMLPUBVAR int xmlLoadExtDtdDefaultValue;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlParserDebugEntities \
 
(*(__xmlParserDebugEntities()))
 
#else
 
XMLPUBVAR int xmlParserDebugEntities;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
 

	
 
XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlParserVersion \
 
(*(__xmlParserVersion()))
 
#else
 
XMLPUBVAR const char * xmlParserVersion;
 
#endif
 

	
 
XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlPedanticParserDefaultValue \
 
(*(__xmlPedanticParserDefaultValue()))
 
#else
 
XMLPUBVAR int xmlPedanticParserDefaultValue;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlSaveNoEmptyTags \
 
(*(__xmlSaveNoEmptyTags()))
 
#else
 
XMLPUBVAR int xmlSaveNoEmptyTags;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
 

	
 
XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlSubstituteEntitiesDefaultValue \
 
(*(__xmlSubstituteEntitiesDefaultValue()))
 
#else
 
XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
 
#endif
 
XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
 

	
 
XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlRegisterNodeDefaultValue \
 
(*(__xmlRegisterNodeDefaultValue()))
 
#else
 
XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
 
#endif
 

	
 
XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlDeregisterNodeDefaultValue \
 
(*(__xmlDeregisterNodeDefaultValue()))
 
#else
 
XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
 
#endif
 

	
 
XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlParserInputBufferCreateFilenameValue \
 
(*(__xmlParserInputBufferCreateFilenameValue()))
 
#else
 
XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
 
#endif
 

	
 
XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
 
#ifdef LIBXML_THREAD_ENABLED
 
#define xmlOutputBufferCreateFilenameValue \
 
(*(__xmlOutputBufferCreateFilenameValue()))
 
#else
 
XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
 
#endif
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* __XML_GLOBALS_H */
lib/libxml2/include/libxml/hash.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: Chained hash tables
 
 * Description: This module implements the hash table support used in 
 
 * 		various places in the library.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Bjorn Reese <bjorn.reese@systematic.dk>
 
 */
 

	
 
#ifndef __XML_HASH_H__
 
#define __XML_HASH_H__
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * The hash table.
 
 */
 
typedef struct _xmlHashTable xmlHashTable;
 
typedef xmlHashTable *xmlHashTablePtr;
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/parser.h>
 
#include <libxml/dict.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/*
 
 * Recent version of gcc produce a warning when a function pointer is assigned
 
 * to an object pointer, or vice versa.  The following macro is a dirty hack
 
 * to allow suppression of the warning.  If your architecture has function
 
 * pointers which are a different size than a void pointer, there may be some
 
 * serious trouble within the library.
 
 */
 
/**
 
 * XML_CAST_FPTR:
 
 * @fptr:  pointer to a function
 
 *
 
 * Macro to do a casting from an object pointer to a
 
 * function pointer without encountering a warning from
 
 * gcc
 
 *
 
 * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
 
 * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
 
 * so it is disabled now
 
 */
 

	
 
#define XML_CAST_FPTR(fptr) fptr
 

	
 

	
 
/*
 
 * function types:
 
 */
 
/**
 
 * xmlHashDeallocator:
 
 * @payload:  the data in the hash
 
 * @name:  the name associated
 
 *
 
 * Callback to free data from a hash.
 
 */
 
typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
 
/**
 
 * xmlHashCopier:
 
 * @payload:  the data in the hash
 
 * @name:  the name associated
 
 *
 
 * Callback to copy data from a hash.
 
 *
 
 * Returns a copy of the data or NULL in case of error.
 
 */
 
typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
 
/**
 
 * xmlHashScanner:
 
 * @payload:  the data in the hash
 
 * @data:  extra scannner data
 
 * @name:  the name associated
 
 *
 
 * Callback when scanning data in a hash with the simple scanner.
 
 */
 
typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
 
/**
 
 * xmlHashScannerFull:
 
 * @payload:  the data in the hash
 
 * @data:  extra scannner data
 
 * @name:  the name associated
 
 * @name2:  the second name associated
 
 * @name3:  the third name associated
 
 *
 
 * Callback when scanning data in a hash with the full scanner.
 
 */
 
typedef void (*xmlHashScannerFull)(void *payload, void *data,
 
				   const xmlChar *name, const xmlChar *name2,
 
				   const xmlChar *name3);
 

	
 
/*
 
 * Constructor and destructor.
 
 */
 
XMLPUBFUN xmlHashTablePtr XMLCALL
 
			xmlHashCreate	(int size);
 
XMLPUBFUN xmlHashTablePtr XMLCALL
 
			xmlHashCreateDict(int size,
 
					 xmlDictPtr dict);
 
XMLPUBFUN void XMLCALL			
 
			xmlHashFree	(xmlHashTablePtr table,
 
					 xmlHashDeallocator f);
 

	
 
/*
 
 * Add a new entry to the hash table.
 
 */
 
XMLPUBFUN int XMLCALL			
 
			xmlHashAddEntry	(xmlHashTablePtr table,
 
		                         const xmlChar *name,
 
		                         void *userdata);
 
XMLPUBFUN int XMLCALL			
 
			xmlHashUpdateEntry(xmlHashTablePtr table,
 
		                         const xmlChar *name,
 
		                         void *userdata,
 
					 xmlHashDeallocator f);
 
XMLPUBFUN int XMLCALL		    
 
			xmlHashAddEntry2(xmlHashTablePtr table,
 
		                         const xmlChar *name,
 
		                         const xmlChar *name2,
 
		                         void *userdata);
 
XMLPUBFUN int XMLCALL			
 
			xmlHashUpdateEntry2(xmlHashTablePtr table,
 
		                         const xmlChar *name,
 
		                         const xmlChar *name2,
 
		                         void *userdata,
 
					 xmlHashDeallocator f);
 
XMLPUBFUN int XMLCALL			
 
			xmlHashAddEntry3(xmlHashTablePtr table,
 
		                         const xmlChar *name,
 
		                         const xmlChar *name2,
 
		                         const xmlChar *name3,
 
		                         void *userdata);
 
XMLPUBFUN int XMLCALL			
 
			xmlHashUpdateEntry3(xmlHashTablePtr table,
 
		                         const xmlChar *name,
 
		                         const xmlChar *name2,
 
		                         const xmlChar *name3,
 
		                         void *userdata,
 
					 xmlHashDeallocator f);
 

	
 
/*
 
 * Remove an entry from the hash table.
 
 */
 
XMLPUBFUN int XMLCALL     
 
			xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
 
                           xmlHashDeallocator f);
 
XMLPUBFUN int XMLCALL     
 
			xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
 
                            const xmlChar *name2, xmlHashDeallocator f);
 
XMLPUBFUN int  XMLCALL    
 
			xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
 
                            const xmlChar *name2, const xmlChar *name3,
 
                            xmlHashDeallocator f);
 

	
 
/*
 
 * Retrieve the userdata.
 
 */
 
XMLPUBFUN void * XMLCALL			
 
			xmlHashLookup	(xmlHashTablePtr table,
 
					 const xmlChar *name);
 
XMLPUBFUN void * XMLCALL			
 
			xmlHashLookup2	(xmlHashTablePtr table,
 
					 const xmlChar *name,
 
					 const xmlChar *name2);
 
XMLPUBFUN void * XMLCALL			
 
			xmlHashLookup3	(xmlHashTablePtr table,
 
					 const xmlChar *name,
 
					 const xmlChar *name2,
 
					 const xmlChar *name3);
 
XMLPUBFUN void * XMLCALL			
 
			xmlHashQLookup	(xmlHashTablePtr table,
 
					 const xmlChar *name,
 
					 const xmlChar *prefix);
 
XMLPUBFUN void * XMLCALL			
 
			xmlHashQLookup2	(xmlHashTablePtr table,
 
					 const xmlChar *name,
 
					 const xmlChar *prefix,
 
					 const xmlChar *name2,
 
					 const xmlChar *prefix2);
 
XMLPUBFUN void * XMLCALL			
 
			xmlHashQLookup3	(xmlHashTablePtr table,
 
					 const xmlChar *name,
 
					 const xmlChar *prefix,
 
					 const xmlChar *name2,
 
					 const xmlChar *prefix2,
 
					 const xmlChar *name3,
 
					 const xmlChar *prefix3);
 

	
 
/*
 
 * Helpers.
 
 */
 
XMLPUBFUN xmlHashTablePtr XMLCALL		
 
			xmlHashCopy	(xmlHashTablePtr table,
 
					 xmlHashCopier f);
 
XMLPUBFUN int XMLCALL			
 
			xmlHashSize	(xmlHashTablePtr table);
 
XMLPUBFUN void XMLCALL			
 
			xmlHashScan	(xmlHashTablePtr table,
 
					 xmlHashScanner f,
 
					 void *data);
 
XMLPUBFUN void XMLCALL			
 
			xmlHashScan3	(xmlHashTablePtr table,
 
					 const xmlChar *name,
 
					 const xmlChar *name2,
 
					 const xmlChar *name3,
 
					 xmlHashScanner f,
 
					 void *data);
 
XMLPUBFUN void XMLCALL			
 
			xmlHashScanFull	(xmlHashTablePtr table,
 
					 xmlHashScannerFull f,
 
					 void *data);
 
XMLPUBFUN void XMLCALL			
 
			xmlHashScanFull3(xmlHashTablePtr table,
 
					 const xmlChar *name,
 
					 const xmlChar *name2,
 
					 const xmlChar *name3,
 
					 xmlHashScannerFull f,
 
					 void *data);
 
#ifdef __cplusplus
 
}
 
#endif
 
#endif /* ! __XML_HASH_H__ */
lib/libxml2/include/libxml/list.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: lists interfaces
 
 * Description: this module implement the list support used in 
 
 * various place in the library.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Gary Pennington <Gary.Pennington@uk.sun.com>
 
 */
 

	
 
#ifndef __XML_LINK_INCLUDE__
 
#define __XML_LINK_INCLUDE__
 

	
 
#include <libxml/xmlversion.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
typedef struct _xmlLink xmlLink;
 
typedef xmlLink *xmlLinkPtr;
 

	
 
typedef struct _xmlList xmlList;
 
typedef xmlList *xmlListPtr;
 

	
 
/**
 
 * xmlListDeallocator:
 
 * @lk:  the data to deallocate
 
 *
 
 * Callback function used to free data from a list.
 
 */
 
typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
 
/**
 
 * xmlListDataCompare:
 
 * @data0: the first data
 
 * @data1: the second data
 
 *
 
 * Callback function used to compare 2 data.
 
 *
 
 * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
 
 */
 
typedef int  (*xmlListDataCompare) (const void *data0, const void *data1);
 
/**
 
 * xmlListWalker:
 
 * @data: the data found in the list
 
 * @user: extra user provided data to the walker
 
 *
 
 * Callback function used when walking a list with xmlListWalk().
 
 *
 
 * Returns 0 to stop walking the list, 1 otherwise.
 
 */
 
typedef int (*xmlListWalker) (const void *data, const void *user);
 

	
 
/* Creation/Deletion */
 
XMLPUBFUN xmlListPtr XMLCALL
 
		xmlListCreate		(xmlListDeallocator deallocator,
 
	                                 xmlListDataCompare compare);
 
XMLPUBFUN void XMLCALL		
 
		xmlListDelete		(xmlListPtr l);
 

	
 
/* Basic Operators */
 
XMLPUBFUN void * XMLCALL		
 
		xmlListSearch		(xmlListPtr l,
 
					 void *data);
 
XMLPUBFUN void * XMLCALL		
 
		xmlListReverseSearch	(xmlListPtr l,
 
					 void *data);
 
XMLPUBFUN int XMLCALL		
 
		xmlListInsert		(xmlListPtr l,
 
					 void *data) ;
 
XMLPUBFUN int XMLCALL		
 
		xmlListAppend		(xmlListPtr l,
 
					 void *data) ;
 
XMLPUBFUN int XMLCALL		
 
		xmlListRemoveFirst	(xmlListPtr l,
 
					 void *data);
 
XMLPUBFUN int XMLCALL		
 
		xmlListRemoveLast	(xmlListPtr l,
 
					 void *data);
 
XMLPUBFUN int XMLCALL		
 
		xmlListRemoveAll	(xmlListPtr l,
 
					 void *data);
 
XMLPUBFUN void XMLCALL		
 
		xmlListClear		(xmlListPtr l);
 
XMLPUBFUN int XMLCALL		
 
		xmlListEmpty		(xmlListPtr l);
 
XMLPUBFUN xmlLinkPtr XMLCALL	
 
		xmlListFront		(xmlListPtr l);
 
XMLPUBFUN xmlLinkPtr XMLCALL	
 
		xmlListEnd		(xmlListPtr l);
 
XMLPUBFUN int XMLCALL		
 
		xmlListSize		(xmlListPtr l);
 

	
 
XMLPUBFUN void XMLCALL		
 
		xmlListPopFront		(xmlListPtr l);
 
XMLPUBFUN void XMLCALL		
 
		xmlListPopBack		(xmlListPtr l);
 
XMLPUBFUN int XMLCALL		
 
		xmlListPushFront	(xmlListPtr l,
 
					 void *data);
 
XMLPUBFUN int XMLCALL		
 
		xmlListPushBack		(xmlListPtr l,
 
					 void *data);
 

	
 
/* Advanced Operators */
 
XMLPUBFUN void XMLCALL		
 
		xmlListReverse		(xmlListPtr l);
 
XMLPUBFUN void XMLCALL		
 
		xmlListSort		(xmlListPtr l);
 
XMLPUBFUN void XMLCALL		
 
		xmlListWalk		(xmlListPtr l,
 
					 xmlListWalker walker,
 
					 const void *user);
 
XMLPUBFUN void XMLCALL		
 
		xmlListReverseWalk	(xmlListPtr l,
 
					 xmlListWalker walker,
 
					 const void *user);
 
XMLPUBFUN void XMLCALL		
 
		xmlListMerge		(xmlListPtr l1,
 
					 xmlListPtr l2);
 
XMLPUBFUN xmlListPtr XMLCALL	
 
		xmlListDup		(const xmlListPtr old);
 
XMLPUBFUN int XMLCALL		
 
		xmlListCopy		(xmlListPtr cur,
 
					 const xmlListPtr old);
 
/* Link operators */
 
XMLPUBFUN void * XMLCALL          
 
		xmlLinkGetData          (xmlLinkPtr lk);
 

	
 
/* xmlListUnique() */
 
/* xmlListSwap */
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* __XML_LINK_INCLUDE__ */
lib/libxml2/include/libxml/nanoftp.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: minimal FTP implementation
 
 * Description: minimal FTP implementation allowing to fetch resources
 
 *              like external subset.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 
 
 
#ifndef __NANO_FTP_H__
 
#define __NANO_FTP_H__
 

	
 
#include <libxml/xmlversion.h>
 

	
 
#ifdef LIBXML_FTP_ENABLED
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/**
 
 * ftpListCallback: 
 
 * @userData:  user provided data for the callback
 
 * @filename:  the file name (including "->" when links are shown)
 
 * @attrib:  the attribute string
 
 * @owner:  the owner string
 
 * @group:  the group string
 
 * @size:  the file size
 
 * @links:  the link count
 
 * @year:  the year
 
 * @month:  the month
 
 * @day:  the day
 
 * @hour:  the hour
 
 * @minute:  the minute
 
 *
 
 * A callback for the xmlNanoFTPList command.
 
 * Note that only one of year and day:minute are specified.
 
 */
 
typedef void (*ftpListCallback) (void *userData,
 
	                         const char *filename, const char *attrib,
 
	                         const char *owner, const char *group,
 
				 unsigned long size, int links, int year,
 
				 const char *month, int day, int hour,
 
				 int minute);
 
/**
 
 * ftpDataCallback: 
 
 * @userData: the user provided context
 
 * @data: the data received
 
 * @len: its size in bytes
 
 *
 
 * A callback for the xmlNanoFTPGet command.
 
 */
 
typedef void (*ftpDataCallback) (void *userData,
 
				 const char *data,
 
				 int len);
 

	
 
/*
 
 * Init
 
 */
 
XMLPUBFUN void XMLCALL
 
	xmlNanoFTPInit		(void);
 
XMLPUBFUN void XMLCALL	
 
	xmlNanoFTPCleanup	(void);
 

	
 
/*
 
 * Creating/freeing contexts.
 
 */
 
XMLPUBFUN void * XMLCALL	
 
	xmlNanoFTPNewCtxt	(const char *URL);
 
XMLPUBFUN void XMLCALL	
 
	xmlNanoFTPFreeCtxt	(void * ctx);
 
XMLPUBFUN void * XMLCALL 	
 
	xmlNanoFTPConnectTo	(const char *server,
 
				 int port);
 
/*
 
 * Opening/closing session connections.
 
 */
 
XMLPUBFUN void * XMLCALL 	
 
	xmlNanoFTPOpen		(const char *URL);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPConnect	(void *ctx);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPClose		(void *ctx);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPQuit		(void *ctx);
 
XMLPUBFUN void XMLCALL	
 
	xmlNanoFTPScanProxy	(const char *URL);
 
XMLPUBFUN void XMLCALL	
 
	xmlNanoFTPProxy		(const char *host,
 
				 int port,
 
				 const char *user,
 
				 const char *passwd,
 
				 int type);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPUpdateURL	(void *ctx,
 
				 const char *URL);
 

	
 
/*
 
 * Rather internal commands.
 
 */
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPGetResponse	(void *ctx);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPCheckResponse	(void *ctx);
 

	
 
/*
 
 * CD/DIR/GET handlers.
 
 */
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPCwd		(void *ctx,
 
				 const char *directory);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPDele		(void *ctx,
 
				 const char *file);
 

	
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPGetConnection	(void *ctx);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPCloseConnection(void *ctx);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPList		(void *ctx,
 
				 ftpListCallback callback,
 
				 void *userData,
 
				 const char *filename);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPGetSocket	(void *ctx,
 
				 const char *filename);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPGet		(void *ctx,
 
				 ftpDataCallback callback,
 
				 void *userData,
 
				 const char *filename);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoFTPRead		(void *ctx,
 
				 void *dest,
 
				 int len);
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 
#endif /* LIBXML_FTP_ENABLED */
 
#endif /* __NANO_FTP_H__ */
lib/libxml2/include/libxml/nanohttp.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: minimal HTTP implementation
 
 * Description: minimal HTTP implementation allowing to fetch resources
 
 *              like external subset.
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 
 
 
#ifndef __NANO_HTTP_H__
 
#define __NANO_HTTP_H__
 

	
 
#include <libxml/xmlversion.h>
 

	
 
#ifdef LIBXML_HTTP_ENABLED
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 
XMLPUBFUN void XMLCALL
 
	xmlNanoHTTPInit		(void);
 
XMLPUBFUN void XMLCALL	
 
	xmlNanoHTTPCleanup	(void);
 
XMLPUBFUN void XMLCALL	
 
	xmlNanoHTTPScanProxy	(const char *URL);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoHTTPFetch	(const char *URL,
 
				 const char *filename,
 
				 char **contentType);
 
XMLPUBFUN void * XMLCALL	
 
	xmlNanoHTTPMethod	(const char *URL,
 
				 const char *method,
 
				 const char *input,
 
				 char **contentType,
 
				 const char *headers,
 
				 int   ilen);
 
XMLPUBFUN void * XMLCALL	
 
	xmlNanoHTTPMethodRedir	(const char *URL,
 
				 const char *method,
 
				 const char *input,
 
				 char **contentType,
 
				 char **redir,
 
				 const char *headers,
 
				 int   ilen);
 
XMLPUBFUN void * XMLCALL	
 
	xmlNanoHTTPOpen		(const char *URL,
 
				 char **contentType);
 
XMLPUBFUN void * XMLCALL	
 
	xmlNanoHTTPOpenRedir	(const char *URL,
 
				 char **contentType,
 
				 char **redir);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoHTTPReturnCode	(void *ctx);
 
XMLPUBFUN const char * XMLCALL 
 
	xmlNanoHTTPAuthHeader	(void *ctx);
 
XMLPUBFUN const char * XMLCALL
 
	xmlNanoHTTPRedir	(void *ctx);
 
XMLPUBFUN int XMLCALL
 
	xmlNanoHTTPContentLength( void * ctx );
 
XMLPUBFUN const char * XMLCALL
 
	xmlNanoHTTPEncoding	(void *ctx);
 
XMLPUBFUN const char * XMLCALL
 
	xmlNanoHTTPMimeType	(void *ctx);
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoHTTPRead		(void *ctx,
 
				 void *dest,
 
				 int len);
 
#ifdef LIBXML_OUTPUT_ENABLED
 
XMLPUBFUN int XMLCALL	
 
	xmlNanoHTTPSave		(void *ctxt,
 
				 const char *filename);
 
#endif /* LIBXML_OUTPUT_ENABLED */
 
XMLPUBFUN void XMLCALL	
 
	xmlNanoHTTPClose	(void *ctx);
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#endif /* LIBXML_HTTP_ENABLED */
 
#endif /* __NANO_HTTP_H__ */
lib/libxml2/include/libxml/parser.h
Show inline comments
 
new file 100755
 
/*
 
 * Summary: the core parser module
 
 * Description: Interfaces, constants and types related to the XML parser
 
 *
 
 * Copy: See Copyright for the status of this software.
 
 *
 
 * Author: Daniel Veillard
 
 */
 

	
 
#ifndef __XML_PARSER_H__
 
#define __XML_PARSER_H__
 

	
 
#include <stdarg.h>
 

	
 
#include <libxml/xmlversion.h>
 
#include <libxml/tree.h>
 
#include <libxml/dict.h>
 
#include <libxml/hash.h>
 
#include <libxml/valid.h>
 
#include <libxml/entities.h>
 
#include <libxml/xmlerror.h>
 
#include <libxml/xmlstring.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 
/**
 
 * XML_DEFAULT_VERSION:
 
 *
 
 * The default version of XML used: 1.0
 
 */
 
#define XML_DEFAULT_VERSION	"1.0"
 

	
 
/**
 
 * xmlParserInput:
 
 *
 
 * An xmlParserInput is an input flow for the XML processor.
 
 * Each entity parsed is associated an xmlParserInput (except the
 
 * few predefined ones). This is the case both for internal entities
 
 * - in which case the flow is already completely in memory - or
 
 * external entities - in which case we use the buf structure for
 
 * progressive reading and I18N conversions to the internal UTF-8 format.
 
 */
 

	
 
/**
 
 * xmlParserInputDeallocate:
 
 * @str:  the string to deallocate
 
 *
 
 * Callback for freeing some parser input allocations.
 
 */
 
typedef void (* xmlParserInputDeallocate)(xmlChar *str);
 

	
 
struct _xmlParserInput {
 
    /* Input buffer */
 
    xmlParserInputBufferPtr buf;      /* UTF-8 encoded buffer */
 

	
 
    const char *filename;             /* The file analyzed, if any */
 
    const char *directory;            /* the directory/base of the file */
 
    const xmlChar *base;              /* Base of the array to parse */
 
    const xmlChar *cur;               /* Current char being parsed */
 
    const xmlChar *end;               /* end of the array to parse */
 
    int length;                       /* length if known */
 
    int line;                         /* Current line */
 
    int col;                          /* Current column */
 
    /*
 
     * NOTE: consumed is only tested for equality in the parser code,
 
     *       so even if there is an overflow this should not give troubles
 
     *       for parsing very large instances.
 
     */
 
    unsigned long consumed;           /* How many xmlChars already consumed */
 
    xmlParserInputDeallocate free;    /* function to deallocate the base */
 
    const xmlChar *encoding;          /* the encoding string for entity */
 
    const xmlChar *version;           /* the version string for entity */
 
    int standalone;                   /* Was that entity marked standalone */
 
    int id;                           /* an unique identifier for the entity */
 
};
 

	
 
/**
 
 * xmlParserNodeInfo:
 
 *
 
 * The parser can be asked to collect Node informations, i.e. at what
 
 * place in the file they were detected. 
 
 * NOTE: This is off by default and not very well tested.
 
 */
 
typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
 
typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
 

	
 
struct _xmlParserNodeInfo {
 
  const struct _xmlNode* node;
 
  /* Position & line # that text that created the node begins & ends on */
 
  unsigned long begin_pos;
 
  unsigned long begin_line;
 
  unsigned long end_pos;
 
  unsigned long end_line;
 
};
 

	
 
typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
 
typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
 
struct _xmlParserNodeInfoSeq {
 
  unsigned long maximum;
 
  unsigned long length;
 
  xmlParserNodeInfo* buffer;
 
};
 

	
 
/**
 
 * xmlParserInputState:
 
 *
 
 * The parser is now working also as a state based parser.
 
 * The recursive one use the state info for entities processing.
 
 */
 
typedef enum {
 
    XML_PARSER_EOF = -1,	/* nothing is to be parsed */
 
    XML_PARSER_START = 0,	/* nothing has been parsed */
 
    XML_PARSER_MISC,		/* Misc* before int subset */
 
    XML_PARSER_PI,		/* Within a processing instruction */
 
    XML_PARSER_DTD,		/* within some DTD content */
 
    XML_PARSER_PROLOG,		/* Misc* after internal subset */
 
    XML_PARSER_COMMENT,		/* within a comment */
 
    XML_PARSER_START_TAG,	/* within a start tag */
 
    XML_PARSER_CONTENT,		/* within the content */
 
    XML_PARSER_CDATA_SECTION,	/* within a CDATA section */
 
    XML_PARSER_END_TAG,		/* within a closing tag */
 
    XML_PARSER_ENTITY_DECL,	/* within an entity declaration */
 
    XML_PARSER_ENTITY_VALUE,	/* within an entity value in a decl */
 
    XML_PARSER_ATTRIBUTE_VALUE,	/* within an attribute value */
 
    XML_PARSER_SYSTEM_LITERAL,	/* within a SYSTEM value */
 
    XML_PARSER_EPILOG, 		/* the Misc* after the last end tag */
 
    XML_PARSER_IGNORE,		/* within an IGNORED section */
 
    XML_PARSER_PUBLIC_LITERAL 	/* within a PUBLIC value */
 
} xmlParserInputState;
 

	
 
/**
 
 * XML_DETECT_IDS:
 
 *
 
 * Bit in the loadsubset context field to tell to do ID/REFs lookups.
 
 * Use it to initialize xmlLoadExtDtdDefaultValue.
 
 */
 
#define XML_DETECT_IDS		2
 

	
 
/**
 
 * XML_COMPLETE_ATTRS:
 
 *
 
 * Bit in the loadsubset context field to tell to do complete the
 
 * elements attributes lists with the ones defaulted from the DTDs.
 
 * Use it to initialize xmlLoadExtDtdDefaultValue.
 
 */
 
#define XML_COMPLETE_ATTRS	4
 

	
 
/**
 
 * XML_SKIP_IDS:
 
 *
 
 * Bit in the loadsubset context field to tell to not do ID/REFs registration.
 
 * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
 
 */
 
#define XML_SKIP_IDS		8
 

	
 
/**
 
 * xmlParserMode:
 
 *
 
 * A parser can operate in various modes
 
 */
 
typedef enum {
 
    XML_PARSE_UNKNOWN = 0,
 
    XML_PARSE_DOM = 1,
 
    XML_PARSE_SAX = 2,
 
    XML_PARSE_PUSH_DOM = 3,
 
    XML_PARSE_PUSH_SAX = 4,
 
    XML_PARSE_READER = 5
 
} xmlParserMode;
 

	
 
/**
 
 * xmlParserCtxt:
 
 *
 
 * The parser context.
 
 * NOTE This doesn't completely define the parser state, the (current ?)
 
 *      design of the parser uses recursive function calls since this allow
 
 *      and easy mapping from the production rules of the specification
 
 *      to the actual code. The drawback is that the actual function call
 
 *      also reflect the parser state. However most of the parsing routines
 
 *      takes as the only argument the parser context pointer, so migrating
 
 *      to a state based parser for progressive parsing shouldn't be too hard.
 
 */
 
struct _xmlParserCtxt {
 
    struct _xmlSAXHandler *sax;       /* The SAX handler */
 
    void            *userData;        /* For SAX interface only, used by DOM build */
 
    xmlDocPtr           myDoc;        /* the document being built */
 
    int            wellFormed;        /* is the document well formed */
 
    int       replaceEntities;        /* shall we replace entities ? */
 
    const xmlChar    *version;        /* the XML version string */
 
    const xmlChar   *encoding;        /* the declared encoding, if any */
 
    int            standalone;        /* standalone document */
 
    int                  html;        /* an HTML(1)/Docbook(2) document
 
                                       * 3 is HTML after <head>
 
                                       * 10 is HTML after <body>
 
                                       */
 

	
 
    /* Input stream stack */
 
    xmlParserInputPtr  input;         /* Current input stream */
 
    int                inputNr;       /* Number of current input streams */
 
    int                inputMax;      /* Max number of input streams */
 
    xmlParserInputPtr *inputTab;      /* stack of inputs */
 

	
 
    /* Node analysis stack only used for DOM building */
 
    xmlNodePtr         node;          /* Current parsed Node */
 
    int                nodeNr;        /* Depth of the parsing stack */
 
    int                nodeMax;       /* Max depth of the parsing stack */
 
    xmlNodePtr        *nodeTab;       /* array of nodes */
 

	
 
    int record_info;                  /* Whether node info should be kept */
 
    xmlParserNodeInfoSeq node_seq;    /* info about each node parsed */
 

	
 
    int errNo;                        /* error code */
 

	
 
    int     hasExternalSubset;        /* reference and external subset */
 
    int             hasPErefs;        /* the internal subset has PE refs */
 
    int              external;        /* are we parsing an external entity */
 

	
 
    int                 valid;        /* is the document valid */
 
    int              validate;        /* shall we try to validate ? */
 
    xmlValidCtxt        vctxt;        /* The validity context */
 

	
 
    xmlParserInputState instate;      /* current type of input */
 
    int                 token;        /* next char look-ahead */    
 

	
 
    char           *directory;        /* the data directory */
 

	
 
    /* Node name stack */
 
    const xmlChar     *name;          /* Current parsed Node */
 
    int                nameNr;        /* Depth of the parsing stack */
 
    int                nameMax;       /* Max depth of the parsing stack */
 
    const xmlChar *   *nameTab;       /* array of nodes */
 

	
 
    long               nbChars;       /* number of xmlChar processed */
 
    long            checkIndex;       /* used by progressive parsing lookup */
 
    int             keepBlanks;       /* ugly but ... */
 
    int             disableSAX;       /* SAX callbacks are disabled */
 
    int               inSubset;       /* Parsing is in int 1/ext 2 subset */
 
    const xmlChar *    intSubName;    /* name of subset */
 
    xmlChar *          extSubURI;     /* URI of external subset */
 
    xmlChar *          extSubSystem;  /* SYSTEM ID of external subset */
 

	
 
    /* xml:space values */
 
    int *              space;         /* Should the parser preserve spaces */
 
    int                spaceNr;       /* Depth of the parsing stack */
 
    int                spaceMax;      /* Max depth of the parsing stack */
 
    int *              spaceTab;      /* array of space infos */
 

	
 
    int                depth;         /* to prevent entity substitution loops */
 
    xmlParserInputPtr  entity;        /* used to check entities boundaries */
 
    int                charset;       /* encoding of the in-memory content
 
				         actually an xmlCharEncoding */
 
    int                nodelen;       /* Those two fields are there to */
 
    int                nodemem;       /* Speed up large node parsing */
 
    int                pedantic;      /* signal pedantic warnings */
 
    void              *_private;      /* For user data, libxml won't touch it */
 

	
 
    int                loadsubset;    /* should the external subset be loaded */
 
    int                linenumbers;   /* set line number in element content */
 
    void              *catalogs;      /* document's own catalog */
 
    int                recovery;      /* run in recovery mode */
 
    int                progressive;   /* is this a progressive parsing */
 
    xmlDictPtr         dict;          /* dictionnary for the parser */
 
    const xmlChar *   *atts;          /* array for the attributes callbacks */
 
    int                maxatts;       /* the size of the array */
 
    int                docdict;       /* use strings from dict to build tree */
 

	
 
    /*
 
     * pre-interned strings
 
     */
 
    const xmlChar *str_xml;
 
    const xmlChar *str_xmlns;
 
    const xmlChar *str_xml_ns;
 

	
 
    /*
 
     * Everything below is used only by the new SAX mode
 
     */
 
    int                sax2;          /* operating in the new SAX mode */
 
    int                nsNr;          /* the number of inherited namespaces */
 
    int                nsMax;         /* the size of the arrays */
 
    const xmlChar *   *nsTab;         /* the array of prefix/namespace name */
 
    int               *attallocs;     /* which attribute were allocated */
 
    void *            *pushTab;       /* array of data for push */
 
    xmlHashTablePtr    attsDefault;   /* defaulted attributes if any */
 
    xmlHashTablePtr    attsSpecial;   /* non-CDATA attributes if any */
 
    int                nsWellFormed;  /* is the document XML Nanespace okay */
 
    int                options;       /* Extra options */
 

	
 
    /*
 
     * Those fields are needed only for treaming parsing so far
 
     */
 
    int               dictNames;    /* Use dictionary names for the tree */
 
    int               freeElemsNr;  /* number of freed element nodes */
 
    xmlNodePtr        freeElems;    /* List of freed element nodes */
 
    int               freeAttrsNr;  /* number of freed attributes nodes */
 
    xmlAttrPtr        freeAttrs;    /* List of freed attributes nodes */
 

	
 
    /*
 
     * the complete error informations for the last error.
 
     */
 
    xmlError          lastError;
 
    xmlParserMode     parseMode;    /* the parser mode */
 
    unsigned long    nbentities;    /* number of entities references */
 
    unsigned long  sizeentities;    /* size of parsed entities */
 

	
 
    /* for use by HTML non-recursive parser */
 
    xmlParserNodeInfo *nodeInfo;      /* Current NodeInfo */
 
    int                nodeInfoNr;    /* Depth of the parsing stack */
 
    int                nodeInfoMax;   /* Max depth of the parsing stack */
 
    xmlParserNodeInfo *nodeInfoTab;   /* array of nodeInfos */
 
};
 

	
 
/**
 
 * xmlSAXLocator:
 
 *
 
 * A SAX Locator.
 
 */
 
struct _xmlSAXLocator {
 
    const xmlChar *(*getPublicId)(void *ctx);
 
    const xmlChar *(*getSystemId)(void *ctx);
 
    int (*getLineNumber)(void *ctx);
 
    int (*getColumnNumber)(void *ctx);
 
};
 

	
 
/**
 
 * xmlSAXHandler:
 
 *
 
 * A SAX handler is bunch of callbacks called by the parser when processing
 
 * of the input generate data or structure informations.
 
 */
 

	
 
/**
 
 * resolveEntitySAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @publicId: The public ID of the entity
 
 * @systemId: The system ID of the entity
 
 *
 
 * Callback:
 
 * The entity loader, to control the loading of external entities,
 
 * the application can either:
 
 *    - override this resolveEntity() callback in the SAX block
 
 *    - or better use the xmlSetExternalEntityLoader() function to
 
 *      set up it's own entity resolution routine
 
 *
 
 * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
 
 */
 
typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
 
				const xmlChar *publicId,
 
				const xmlChar *systemId);
 
/**
 
 * internalSubsetSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  the root element name
 
 * @ExternalID:  the external ID
 
 * @SystemID:  the SYSTEM ID (e.g. filename or URL)
 
 *
 
 * Callback on internal subset declaration.
 
 */
 
typedef void (*internalSubsetSAXFunc) (void *ctx,
 
				const xmlChar *name,
 
				const xmlChar *ExternalID,
 
				const xmlChar *SystemID);
 
/**
 
 * externalSubsetSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  the root element name
 
 * @ExternalID:  the external ID
 
 * @SystemID:  the SYSTEM ID (e.g. filename or URL)
 
 *
 
 * Callback on external subset declaration.
 
 */
 
typedef void (*externalSubsetSAXFunc) (void *ctx,
 
				const xmlChar *name,
 
				const xmlChar *ExternalID,
 
				const xmlChar *SystemID);
 
/**
 
 * getEntitySAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name: The entity name
 
 *
 
 * Get an entity by name.
 
 *
 
 * Returns the xmlEntityPtr if found.
 
 */
 
typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
 
				const xmlChar *name);
 
/**
 
 * getParameterEntitySAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name: The entity name
 
 *
 
 * Get a parameter entity by name.
 
 *
 
 * Returns the xmlEntityPtr if found.
 
 */
 
typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
 
				const xmlChar *name);
 
/**
 
 * entityDeclSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  the entity name 
 
 * @type:  the entity type 
 
 * @publicId: The public ID of the entity
 
 * @systemId: The system ID of the entity
 
 * @content: the entity value (without processing).
 
 *
 
 * An entity definition has been parsed.
 
 */
 
typedef void (*entityDeclSAXFunc) (void *ctx,
 
				const xmlChar *name,
 
				int type,
 
				const xmlChar *publicId,
 
				const xmlChar *systemId,
 
				xmlChar *content);
 
/**
 
 * notationDeclSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name: The name of the notation
 
 * @publicId: The public ID of the entity
 
 * @systemId: The system ID of the entity
 
 *
 
 * What to do when a notation declaration has been parsed.
 
 */
 
typedef void (*notationDeclSAXFunc)(void *ctx,
 
				const xmlChar *name,
 
				const xmlChar *publicId,
 
				const xmlChar *systemId);
 
/**
 
 * attributeDeclSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @elem:  the name of the element
 
 * @fullname:  the attribute name 
 
 * @type:  the attribute type 
 
 * @def:  the type of default value
 
 * @defaultValue: the attribute default value
 
 * @tree:  the tree of enumerated value set
 
 *
 
 * An attribute definition has been parsed.
 
 */
 
typedef void (*attributeDeclSAXFunc)(void *ctx,
 
				const xmlChar *elem,
 
				const xmlChar *fullname,
 
				int type,
 
				int def,
 
				const xmlChar *defaultValue,
 
				xmlEnumerationPtr tree);
 
/**
 
 * elementDeclSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  the element name 
 
 * @type:  the element type 
 
 * @content: the element value tree
 
 *
 
 * An element definition has been parsed.
 
 */
 
typedef void (*elementDeclSAXFunc)(void *ctx,
 
				const xmlChar *name,
 
				int type,
 
				xmlElementContentPtr content);
 
/**
 
 * unparsedEntityDeclSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name: The name of the entity
 
 * @publicId: The public ID of the entity
 
 * @systemId: The system ID of the entity
 
 * @notationName: the name of the notation
 
 *
 
 * What to do when an unparsed entity declaration is parsed.
 
 */
 
typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
 
				const xmlChar *name,
 
				const xmlChar *publicId,
 
				const xmlChar *systemId,
 
				const xmlChar *notationName);
 
/**
 
 * setDocumentLocatorSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @loc: A SAX Locator
 
 *
 
 * Receive the document locator at startup, actually xmlDefaultSAXLocator.
 
 * Everything is available on the context, so this is useless in our case.
 
 */
 
typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
 
				xmlSAXLocatorPtr loc);
 
/**
 
 * startDocumentSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 *
 
 * Called when the document start being processed.
 
 */
 
typedef void (*startDocumentSAXFunc) (void *ctx);
 
/**
 
 * endDocumentSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 *
 
 * Called when the document end has been detected.
 
 */
 
typedef void (*endDocumentSAXFunc) (void *ctx);
 
/**
 
 * startElementSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  The element name, including namespace prefix
 
 * @atts:  An array of name/value attributes pairs, NULL terminated
 
 *
 
 * Called when an opening tag has been processed.
 
 */
 
typedef void (*startElementSAXFunc) (void *ctx,
 
				const xmlChar *name,
 
				const xmlChar **atts);
 
/**
 
 * endElementSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  The element name
 
 *
 
 * Called when the end of an element has been detected.
 
 */
 
typedef void (*endElementSAXFunc) (void *ctx,
 
				const xmlChar *name);
 
/**
 
 * attributeSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  The attribute name, including namespace prefix
 
 * @value:  The attribute value
 
 *
 
 * Handle an attribute that has been read by the parser.
 
 * The default handling is to convert the attribute into an
 
 * DOM subtree and past it in a new xmlAttr element added to
 
 * the element.
 
 */
 
typedef void (*attributeSAXFunc) (void *ctx,
 
				const xmlChar *name,
 
				const xmlChar *value);
 
/**
 
 * referenceSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @name:  The entity name
 
 *
 
 * Called when an entity reference is detected. 
 
 */
 
typedef void (*referenceSAXFunc) (void *ctx,
 
				const xmlChar *name);
 
/**
 
 * charactersSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @ch:  a xmlChar string
 
 * @len: the number of xmlChar
 
 *
 
 * Receiving some chars from the parser.
 
 */
 
typedef void (*charactersSAXFunc) (void *ctx,
 
				const xmlChar *ch,
 
				int len);
 
/**
 
 * ignorableWhitespaceSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @ch:  a xmlChar string
 
 * @len: the number of xmlChar
 
 *
 
 * Receiving some ignorable whitespaces from the parser.
 
 * UNUSED: by default the DOM building will use characters.
 
 */
 
typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
 
				const xmlChar *ch,
 
				int len);
 
/**
 
 * processingInstructionSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @target:  the target name
 
 * @data: the PI data's
 
 *
 
 * A processing instruction has been parsed.
 
 */
 
typedef void (*processingInstructionSAXFunc) (void *ctx,
 
				const xmlChar *target,
 
				const xmlChar *data);
 
/**
 
 * commentSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @value:  the comment content
 
 *
 
 * A comment has been parsed.
 
 */
 
typedef void (*commentSAXFunc) (void *ctx,
 
				const xmlChar *value);
 
/**
 
 * cdataBlockSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 * @value:  The pcdata content
 
 * @len:  the block length
 
 *
 
 * Called when a pcdata block has been parsed.
 
 */
 
typedef void (*cdataBlockSAXFunc) (
 
	                        void *ctx,
 
				const xmlChar *value,
 
				int len);
 
/**
 
 * warningSAXFunc:
 
 * @ctx:  an XML parser context
 
 * @msg:  the message to display/transmit
 
 * @...:  extra parameters for the message display
 
 * 
 
 * Display and format a warning messages, callback.
 
 */
 
typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
 
				const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
/**
 
 * errorSAXFunc:
 
 * @ctx:  an XML parser context
 
 * @msg:  the message to display/transmit
 
 * @...:  extra parameters for the message display
 
 * 
 
 * Display and format an error messages, callback.
 
 */
 
typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
 
				const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
/**
 
 * fatalErrorSAXFunc:
 
 * @ctx:  an XML parser context
 
 * @msg:  the message to display/transmit
 
 * @...:  extra parameters for the message display
 
 * 
 
 * Display and format fatal error messages, callback.
 
 * Note: so far fatalError() SAX callbacks are not used, error()
 
 *       get all the callbacks for errors.
 
 */
 
typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
 
				const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
 
/**
 
 * isStandaloneSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 *
 
 * Is this document tagged standalone?
 
 *
 
 * Returns 1 if true
 
 */
 
typedef int (*isStandaloneSAXFunc) (void *ctx);
 
/**
 
 * hasInternalSubsetSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 *
 
 * Does this document has an internal subset.
 
 *
 
 * Returns 1 if true
 
 */
 
typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
 

	
 
/**
 
 * hasExternalSubsetSAXFunc:
 
 * @ctx:  the user data (XML parser context)
 
 *
 
 * Does this document has an external subset?
 
 *
 
 * Returns 1 if true
 
 */
 
typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
 

	
 
/************************************************************************
 
 *									*
 
 *			The SAX version 2 API extensions		*
 
 *									*
 
 ************************************************************************/
 
/**
 
 * XML_SAX2_MAGIC:
 
 *
 
 * Special constant found in SAX2 blocks initialized fields
 
 */
 
#define XML_SAX2_MAGIC 0xDEEDBEAF
 

	
 
/**
 
 * startElementNsSAX2Func:
 
 * @ctx:  the user data (XML parser context)
 
 * @localname:  the local name of the element
 
 * @prefix:  the element namespace prefix if available
 
 * @URI:  the element namespace name if available
 
 * @nb_namespaces:  number of namespace definitions on that node
 
 * @namespaces:  pointer to the array of prefix/URI pairs namespace definitions
 
 * @nb_attributes:  the number of attributes on that node
 
 * @nb_defaulted:  the number of defaulted attributes. The defaulted
 
 *                  ones are at the end of the array
 
 * @attributes:  pointer to the array of (localname/prefix/URI/value/end)
 
 *               attribute values.
 
 *
 
 * SAX2 callback when an element start has been detected by the parser.
 
 * It provides the namespace informations for the element, as well as
 
 * the new namespace declarations on the element.
 
 */
 

	
 
typedef void (*startElementNsSAX2Func) (void *ctx,
 
					const xmlChar *localname,
 
					const xmlChar *prefix,
 
					const xmlChar *URI,
 
					int nb_namespaces,
 
					const xmlChar **namespaces,
 
					int nb_attributes,
 
					int nb_defaulted,
 
					const xmlChar **attributes);
 
 
 
/**
 
 * endElementNsSAX2Func:
 
 * @ctx:  the user data (XML parser context)
 
 * @localname:  the local name of the element
 
 * @prefix:  the element namespace prefix if available
 
 * @URI:  the element namespace name if available
 
 *
 
 * SAX2 callback when an element end has been detected by the parser.
 
 * It provides the namespace informations for the element.
 
 */
 

	
 
typedef void (*endElementNsSAX2Func)   (void *ctx,
 
					const xmlChar *localname,
 
					const xmlChar *prefix,
 
					const xmlChar *URI);
 

	
 

	
 
struct _xmlSAXHandler {
 
    internalSubsetSAXFunc internalSubset;
 
    isStandaloneSAXFunc isStandalone;
 
    hasInternalSubsetSAXFunc hasInternalSubset;
 
    hasExternalSubsetSAXFunc hasExternalSubset;
 
    resolveEntitySAXFunc resolveEntity;
 
    getEntitySAXFunc getEntity;
 
    entityDeclSAXFunc entityDecl;
 
    notationDeclSAXFunc notationDecl;
 
    attributeDeclSAXFunc attributeDecl;
 
    elementDeclSAXFunc elementDecl;
 
    unparsedEntityDeclSAXFunc unparsedEntityDecl;
 
    setDocumentLocatorSAXFunc setDocumentLocator;
 
    startDocumentSAXFunc startDocument;
 
    endDocumentSAXFunc endDocument;
 
    startElementSAXFunc startElement;
 
    endElementSAXFunc endElement;
 
    referenceSAXFunc reference;
 
    charactersSAXFunc characters;
 
    ignorableWhitespaceSAXFunc ignorableWhitespace;
 
    processingInstructionSAXFunc processingInstruction;
 
    commentSAXFunc comment;
 
    warningSAXFunc warning;
 
    errorSAXFunc error;
 
    fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
 
    getParameterEntitySAXFunc getParameterEntity;
 
    cdataBlockSAXFunc cdataBlock;
 
    externalSubsetSAXFunc externalSubset;
 
    unsigned int initialized;
 
    /* The following fields are extensions available only on version 2 */
 
    void *_private;
 
    startElementNsSAX2Func startElementNs;
 
    endElementNsSAX2Func endElementNs;
 
    xmlStructuredErrorFunc serror;
 
};
 

	
 
/*
 
 * SAX Version 1
 
 */
 
typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
 
typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
 
struct _xmlSAXHandlerV1 {
 
    internalSubsetSAXFunc internalSubset;
 
    isStandaloneSAXFunc isStandalone;
 
    hasInternalSubsetSAXFunc hasInternalSubset;
 
    hasExternalSubsetSAXFunc hasExternalSubset;
 
    resolveEntitySAXFunc resolveEntity;
 
    getEntitySAXFunc getEntity;
 
    entityDeclSAXFunc entityDecl;
 
    notationDeclSAXFunc notationDecl;
 
    attributeDeclSAXFunc attributeDecl;
 
    elementDeclSAXFunc elementDecl;
 
    unparsedEntityDeclSAXFunc unparsedEntityDecl;
 
    setDocumentLocatorSAXFunc setDocumentLocator;
 
    startDocumentSAXFunc startDocument;
 
    endDocumentSAXFunc endDocument;
 
    startElementSAXFunc startElement;
 
    endElementSAXFunc endElement;
 
    referenceSAXFunc reference;
 
    charactersSAXFunc characters;
 
    ignorableWhitespaceSAXFunc ignorableWhitespace;
 
    processingInstructionSAXFunc processingInstruction;
 
    commentSAXFunc comment;
 
    warningSAXFunc warning;
 
    errorSAXFunc error;
 
    fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
 
    getParameterEntitySAXFunc getParameterEntity;
 
    cdataBlockSAXFunc cdataBlock;
 
    externalSubsetSAXFunc externalSubset;
 
    unsigned int initialized;
 
};
 

	
 

	
 
/**
 
 * xmlExternalEntityLoader:
 
 * @URL: The System ID of the resource requested
 
 * @ID: The Public ID of the resource requested
 
 * @context: the XML parser context 
 
 *
 
 * External entity loaders types.
 
 *
 
 * Returns the entity input parser.
 
 */
 
typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
 
					 const char *ID,
 
					 xmlParserCtxtPtr context);
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 

	
 
#include <libxml/encoding.h>
 
#include <libxml/xmlIO.h>
 
#include <libxml/globals.h>
 

	
 
#ifdef __cplusplus
 
extern "C" {
 
#endif
 

	
 

	
 
/*
 
 * Init/Cleanup
 
 */
 
XMLPUBFUN void XMLCALL		
 
		xmlInitParser		(void);
 
XMLPUBFUN void XMLCALL		
 
		xmlCleanupParser	(void);
 

	
 
/*
 
 * Input functions
 
 */
 
XMLPUBFUN int XMLCALL		
 
		xmlParserInputRead	(xmlParserInputPtr in,
 
					 int len);
 
XMLPUBFUN int XMLCALL		
 
		xmlParserInputGrow	(xmlParserInputPtr in,
 
					 int len);
 

	
 
/*
 
 * Basic parsing Interfaces
 
 */
 
#ifdef LIBXML_SAX1_ENABLED
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlParseDoc		(const xmlChar *cur);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlParseFile		(const char *filename);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlParseMemory		(const char *buffer,
 
					 int size);
 
#endif /* LIBXML_SAX1_ENABLED */
 
XMLPUBFUN int XMLCALL		
 
		xmlSubstituteEntitiesDefault(int val);
 
XMLPUBFUN int XMLCALL		
 
		xmlKeepBlanksDefault	(int val);
 
XMLPUBFUN void XMLCALL		
 
		xmlStopParser		(xmlParserCtxtPtr ctxt);
 
XMLPUBFUN int XMLCALL		
 
		xmlPedanticParserDefault(int val);
 
XMLPUBFUN int XMLCALL		
 
		xmlLineNumbersDefault	(int val);
 

	
 
#ifdef LIBXML_SAX1_ENABLED
 
/*
 
 * Recovery mode 
 
 */
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlRecoverDoc		(const xmlChar *cur);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlRecoverMemory	(const char *buffer,
 
					 int size);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlRecoverFile		(const char *filename);
 
#endif /* LIBXML_SAX1_ENABLED */
 

	
 
/*
 
 * Less common routines and SAX interfaces
 
 */
 
XMLPUBFUN int XMLCALL		
 
		xmlParseDocument	(xmlParserCtxtPtr ctxt);
 
XMLPUBFUN int XMLCALL		
 
		xmlParseExtParsedEnt	(xmlParserCtxtPtr ctxt);
 
#ifdef LIBXML_SAX1_ENABLED
 
XMLPUBFUN int XMLCALL		
 
		xmlSAXUserParseFile	(xmlSAXHandlerPtr sax,
 
					 void *user_data,
 
					 const char *filename);
 
XMLPUBFUN int XMLCALL		
 
		xmlSAXUserParseMemory	(xmlSAXHandlerPtr sax,
 
					 void *user_data,
 
					 const char *buffer,
 
					 int size);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlSAXParseDoc		(xmlSAXHandlerPtr sax,
 
					 const xmlChar *cur,
 
					 int recovery);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlSAXParseMemory	(xmlSAXHandlerPtr sax,
 
					 const char *buffer,
 
                                   	 int size,
 
					 int recovery);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
 
					 const char *buffer,
 
                                   	 int size,
 
					 int recovery,
 
					 void *data);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlSAXParseFile		(xmlSAXHandlerPtr sax,
 
					 const char *filename,
 
					 int recovery);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlSAXParseFileWithData	(xmlSAXHandlerPtr sax,
 
					 const char *filename,
 
					 int recovery,
 
					 void *data);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlSAXParseEntity	(xmlSAXHandlerPtr sax,
 
					 const char *filename);
 
XMLPUBFUN xmlDocPtr XMLCALL	
 
		xmlParseEntity		(const char *filename);
 
#endif /* LIBXML_SAX1_ENABLED */
 

	
 
#ifdef LIBXML_VALID_ENABLED
 
XMLPUBFUN xmlDtdPtr XMLCALL	
 
		xmlSAXParseDTD		(xmlSAXHandlerPtr sax,
 
					 const xmlChar *ExternalID,
 
					 const xmlChar *SystemID);
 
XMLPUBFUN xmlDtdPtr XMLCALL	
 
		xmlParseDTD		(const xmlChar *ExternalID,
 
					 const xmlChar *SystemID);
 
XMLPUBFUN xmlDtdPtr XMLCALL	
 
		xmlIOParseDTD		(xmlSAXHandlerPtr sax,
 
					 xmlParserInputBufferPtr input,
 
					 xmlCharEncoding enc);
 
#endif /* LIBXML_VALID_ENABLE */
 
#ifdef LIBXML_SAX1_ENABLED
 
XMLPUBFUN int XMLCALL	
 
		xmlParseBalancedChunkMemory(xmlDocPtr doc,
 
					 xmlSAXHandlerPtr sax,
 
					 void *user_data,
 
					 int depth,
 
					 const xmlChar *string,
 
					 xmlNodePtr *lst);
 
#endif /* LIBXML_SAX1_ENABLED */
 
XMLPUBFUN xmlParserErrors XMLCALL
 
		xmlParseInNodeContext	(xmlNodePtr node,
 
					 const char *data,
 
					 int datalen,
 
					 int options,
 
					 xmlNodePtr *lst);
 
#ifdef LIBXML_SAX1_ENABLED
 
XMLPUBFUN int XMLCALL          
 
		xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
 
                     xmlSAXHandlerPtr sax,
 
                     void *user_data,
 
                     int depth,
 
                     const xmlChar *string,
 
                     xmlNodePtr *lst,
 
                     int recover);
 
XMLPUBFUN int XMLCALL		
 
		xmlParseExternalEntity	(xmlDocPtr doc,
 
					 xmlSAXHandlerPtr sax,
 
					 void *user_data,
 
					 int depth,
 
					 const xmlChar *URL,
 
					 const xmlChar *ID,
 
					 xmlNodePtr *lst);
 
#endif /* LIBXML_SAX1_ENABLED */
 
XMLPUBFUN int XMLCALL		
 
		xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
 
					 const xmlChar *URL,
 
					 const xmlChar *ID,
 
					 xmlNodePtr *lst);
 

	
 
/*
 
 * Parser contexts handling.
 
 */
 
XMLPUBFUN xmlParserCtxtPtr XMLCALL	
 
		xmlNewParserCtxt	(void);
 
XMLPUBFUN int XMLCALL		
 
		xmlInitParserCtxt	(xmlParserCtxtPtr ctxt);
 
XMLPUBFUN void XMLCALL		
 
		xmlClearParserCtxt	(xmlParserCtxtPtr ctxt);
 
XMLPUBFUN void XMLCALL		
 
		xmlFreeParserCtxt	(xmlParserCtxtPtr ctxt);
 
#ifdef LIBXML_SAX1_ENABLED
 
XMLPUBFUN void XMLCALL		
 
		xmlSetupParserForBuffer	(xmlParserCtxtPtr ctxt,
 
					 const xmlChar* buffer,
 
					 const char *filename);
 
#endif /* LIBXML_SAX1_ENABLED */
 
XMLPUBFUN xmlParserCtxtPtr XMLCALL 
 
		xmlCreateDocParserCtxt	(const xmlChar *cur);
 

	
 
#ifdef LIBXML_LEGACY_ENABLED
 
/*
 
 * Reading/setting optional parsing features.
 
 */
 
XMLPUBFUN int XMLCALL		
 
		xmlGetFeaturesList	(int *len,
 
					 const char **result);
 
XMLPUBFUN int XMLCALL		
 
		xmlGetFeature		(xmlParserCtxtPtr ctxt,
 
					 const char *name,
 
					 void *result);
 
XMLPUBFUN int XMLCALL		
 
		xmlSetFeature		(xmlParserCtxtPtr ctxt,
 
					 const char *name,
 
					 void *value);
 
#endif /* LIBXML_LEGACY_ENABLED */
 

	
 
#ifdef LIBXML_PUSH_ENABLED
 
/*
 
 * Interfaces for the Push mode.
 
 */
 
XMLPUBFUN xmlParserCtxtPtr XMLCALL 
 
		xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
 
					 void *user_data,
 
					 const char *chunk,
 
					 int size,
 
					 const char *filename);
 
XMLPUBFUN int XMLCALL		 
 
		xmlParseChunk		(xmlParserCtxtPtr ctxt,
 
					 const char *chunk,
 
					 int size,
 
					 int terminate);
 
#endif /* LIBXML_PUSH_ENABLED */
 

	
 
/*
 
 * Special I/O mode.
 
 */
 

	
 
XMLPUBFUN xmlParserCtxtPtr XMLCALL 
 
		xmlCreateIOParserCtxt	(xmlSAXHandlerPtr sax,
 
					 void *user_data,
 
					 xmlInputReadCallback   ioread,
 
					 xmlInputCloseCallback  ioclose,
 
					 void *ioctx,
 
					 xmlCharEncoding enc);
 

	
 
XMLPUBFUN xmlParserInputPtr XMLCALL 
 
		xmlNewIOInputStream	(xmlParserCtxtPtr ctxt,
 
					 xmlParserInputBufferPtr input,
 
					 xmlCharEncoding enc);
 

	
 
/*
 
 * Node infos.
 
 */
 
XMLPUBFUN const xmlParserNodeInfo* XMLCALL
 
		xmlParserFindNodeInfo	(const xmlParserCtxtPtr ctxt,
 
				         const xmlNodePtr node);
 
XMLPUBFUN void XMLCALL		
 
		xmlInitNodeInfoSeq	(xmlParserNodeInfoSeqPtr seq);
 
XMLPUBFUN void XMLCALL		
 
		xmlClearNodeInfoSeq	(xmlParserNodeInfoSeqPtr seq);
 
XMLPUBFUN unsigned long XMLCALL 
 
		xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
 
                                         const xmlNodePtr node);
 
XMLPUBFUN void XMLCALL		
 
		xmlParserAddNodeInfo	(xmlParserCtxtPtr ctxt,
 
					 const xmlParserNodeInfoPtr info);
 

	
 
/*
 
 * External entities handling actually implemented in xmlIO.
 
 */
 

	
 
XMLPUBFUN void XMLCALL		
 
		xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
 
XMLPUBFUN xmlExternalEntityLoader XMLCALL
 
		xmlGetExternalEntityLoader(void);
 
XMLPUBFUN xmlParserInputPtr XMLCALL
 
		xmlLoadExternalEntity	(const char *URL,
 
					 const char *ID,
 
					 xmlParserCtxtPtr ctxt);
 

	
 
/*
 
 * Index lookup, actually implemented in the encoding module
 
 */
 
XMLPUBFUN long XMLCALL
 
		xmlByteConsumed		(xmlParserCtxtPtr ctxt);
 

	
 
/*
 
 * New set of simpler/more flexible APIs
 
 */
 
/**
 
 * xmlParserOption:
 
 *
 
 * This is the set of XML parser options that can be passed down
 
 * to the xmlReadDoc() and similar calls.
 
 */
 
typedef enum {
 
    XML_PARSE_RECOVER	= 1<<0,	/* recover on errors */
 
    XML_PARSE_NOENT	= 1<<1,	/* substitute entities */
 
    XML_PARSE_DTDLOAD	= 1<<2,	/* load the external subset */
 
    XML_PARSE_DTDATTR	= 1<<3,	/* default DTD attributes */
 
    XML_PARSE_DTDVALID	= 1<<4,	/* validate with the DTD */
 
    XML_PARSE_NOERROR	= 1<<5,	/* suppress error reports */
 
    XML_PARSE_NOWARNING	= 1<<6,	/* suppress warning reports */
 
    XML_PARSE_PEDANTIC	= 1<<7,	/* pedantic error reporting */
 
    XML_PARSE_NOBLANKS	= 1<<8,	/* remove blank nodes */
 
    XML_PARSE_SAX1	= 1<<9,	/* use the SAX1 interface internally */
 
    XML_PARSE_XINCLUDE	= 1<<10,/* Implement XInclude substitition  */
 
    XML_PARSE_NONET	= 1<<11,/* Forbid network access */
 
    XML_PARSE_NODICT	= 1<<12,/* Do not reuse the context dictionnary */
 
    XML_PARSE_NSCLEAN	= 1<<13,/* remove redundant namespaces declarations */
 
    XML_PARSE_NOCDATA	= 1<<14,/* merge CDATA as text nodes */
 
    XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
 
    XML_PARSE_COMPACT   = 1<<16,/* compact small text nodes; no modification of
 
                                   the tree allowed afterwards (will possibly
 
				   crash if you try to modify the tree) */
 
    XML_PARSE_OLD10	= 1<<17,/* parse using XML-1.0 before update 5 */
 
    XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
 
    XML_PARSE_HUGE      = 1<<19, /* relax any hardcoded limit from the parser */
 
    XML_PARSE_OLDSAX    = 1<<20 /* parse using SAX2 interface from before 2.7.0 */
 
} xmlParserOption;
 

	
 
XMLPUBFUN void XMLCALL
 
		xmlCtxtReset		(xmlParserCtxtPtr ctxt);
 
XMLPUBFUN int XMLCALL
 
		xmlCtxtResetPush	(xmlParserCtxtPtr ctxt,
 
					 const char *chunk,
 
					 int size,
 
					 const char *filename,
 
					 const char *encoding);
 
XMLPUBFUN int XMLCALL
 
		xmlCtxtUseOptions	(xmlParserCtxtPtr ctxt,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlReadDoc		(const xmlChar *cur,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlReadFile		(const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlReadMemory		(const char *buffer,
 
					 int size,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlReadFd		(int fd,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlReadIO		(xmlInputReadCallback ioread,
 
					 xmlInputCloseCallback ioclose,
 
					 void *ioctx,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlCtxtReadDoc		(xmlParserCtxtPtr ctxt,
 
					 const xmlChar *cur,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlCtxtReadFile		(xmlParserCtxtPtr ctxt,
 
					 const char *filename,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlCtxtReadMemory		(xmlParserCtxtPtr ctxt,
 
					 const char *buffer,
 
					 int size,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlCtxtReadFd		(xmlParserCtxtPtr ctxt,
 
					 int fd,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 
XMLPUBFUN xmlDocPtr XMLCALL
 
		xmlCtxtReadIO		(xmlParserCtxtPtr ctxt,
 
					 xmlInputReadCallback ioread,
 
					 xmlInputCloseCallback ioclose,
 
					 void *ioctx,
 
					 const char *URL,
 
					 const char *encoding,
 
					 int options);
 

	
 
/*
 
 * Library wide options
 
 */
 
/**
 
 * xmlFeature:
 
 *
 
 * Used to examine the existance of features that can be enabled
 
 * or disabled at compile-time.
 
 * They used to be called XML_FEATURE_xxx but this clashed with Expat
 
 */
 
typedef enum {
 
    XML_WITH_THREAD = 1,
 
    XML_WITH_TREE = 2,
 
    XML_WITH_OUTPUT = 3,
 
    XML_WITH_PUSH = 4,
 
    XML_WITH_READER = 5,
 
    XML_WITH_PATTERN = 6,
 
    XML_WITH_WRITER = 7,
 
    XML_WITH_SAX1 = 8,
 
    XML_WITH_FTP = 9,
 
    XML_WITH_HTTP = 10,
 
    XML_WITH_VALID = 11,
 
    XML_WITH_HTML = 12,
 
    XML_WITH_LEGACY = 13,
 
    XML_WITH_C14N = 14,
 
    XML_WITH_CATALOG = 15,
 
    XML_WITH_XPATH = 16,
 
    XML_WITH_XPTR = 17,
 
    XML_WITH_XINCLUDE = 18,
 
    XML_WITH_ICONV = 19,
 
    XML_WITH_ISO8859X = 20,
 
    XML_WITH_UNICODE = 21,
 
    XML_WITH_REGEXP = 22,
 
    XML_WITH_AUTOMATA = 23,
 
    XML_WITH_EXPR = 24,
 
    XML_WITH_SCHEMAS = 25,
 
    XML_WITH_SCHEMATRON = 26,
 
    XML_WITH_MODULES = 27,
 
    XML_WITH_DEBUG = 28,
 
    XML_WITH_DEBUG_MEM = 29,
 
    XML_WITH_DEBUG_RUN = 30,
 
    XML_WITH_ZLIB = 31,
 
    XML_WITH_NONE = 99999 /* just to be sure of allocation size */
 
} xmlFeature;
 

	
 
XMLPUBFUN int XMLCALL
 
		xmlHasFeature		(xmlFeature feature);
 

	
 
#ifdef __cplusplus
 
}
 
#endif
 
#endif /* __XML_PARSER_H__ */
 

	

Changeset was too big and was cut off... Show full diff anyway

0 comments (0 inline, 0 general)