--- xqilla-2.0.0.orig/libtool +++ xqilla-2.0.0/libtool @@ -0,0 +1,7528 @@ +#! /bin/sh + +# libtoolT - Provide generalized library-building support services. +# Generated automatically by (GNU XQilla 2.0.0) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED="/bin/sed" + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="/bin/sed -e 1s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# The names of the tagged configurations supported by this script. +available_tags=" CXX" + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host faro: + +# Shell to use when invoking shell scripts. +SHELL="/bin/sh" + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=no + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias=i486-linux-gnu +host=i486-pc-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias=i486-linux-gnu +build=i486-pc-linux-gnu +build_os=linux-gnu + +# An echo program that does not interpret backslashes. +echo="echo" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A C compiler. +LTCC="i486-linux-gnu-gcc" + +# LTCC compiler flags. +LTCFLAGS=" -I/home/ruoso/dbxml/xqilla-2.0.0/debian/xercesc-private/" + +# A language-specific compiler. +CC="i486-linux-gnu-gcc" + +# Is the compiler the GNU C compiler? +with_gcc=yes + +# An ERE matcher. +EGREP="/bin/grep -E" + +# The linker used to build libraries. +LD="/usr/bin/ld" + +# Whether we need hard or soft links. +LN_S="ln -s" + +# A BSD-compatible nm program. +NM="/usr/bin/nm -B" + +# A symbol stripping program +STRIP="strip" + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=file + +# Used on cygwin: DLL creation program. +DLLTOOL="dlltool" + +# Used on cygwin: object dumper. +OBJDUMP="objdump" + +# Used on cygwin: assembler. +AS="as" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Object file suffix (normally "o"). +objext="o" + +# Old archive suffix (normally "a"). +libext="a" + +# Shared library suffix (normally ".so"). +shrext_cmds='.so' + +# Executable file suffix (normally ""). +exeext="" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" +pic_mode=default + +# What is the maximum length of a command? +max_cmd_len=32768 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Must we lock files when doing compilation? +need_locks="no" + +# Do we need the lib prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec="" + +# Library versioning type. +version_type=linux + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Commands used to build and install an old-style archive. +RANLIB="ranlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build and install a shared archive. +archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~ + cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~ + \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~ + \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib" +postinstall_cmds="" +postuninstall_cmds="" + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds="" +module_expsym_cmds="" + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects="" + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps="" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="" + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd="\$MAGIC_CMD" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that forces no undefined symbols. +no_undefined_flag="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" + +# This is the shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# This is the shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist. +hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into +# a binary during linking. This must work even if $libdir does +# not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="" + +# Set to yes if using DIR/libNAME during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=no + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=no + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=no + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=no + +# Compile-time system search path for libraries +sys_lib_search_path_spec=" /usr/lib/gcc/i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/ /lib/i486-linux-gnu/4.2.3/ /lib/../lib/ /usr/lib/i486-linux-gnu/4.2.3/ /usr/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../ /lib/ /usr/lib/" + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib hwcap 0 nosegneg " + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to yes if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + +# Symbols that must always be exported. +include_expsyms="" + +# ### END LIBTOOL CONFIG + +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 +# Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +basename="s,^.*/,,g" + +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" + +# The name of this program: +progname=`echo "$progpath" | $SED $basename` +modename="$progname" + +# Global variables: +EXIT_SUCCESS=0 +EXIT_FAILURE=1 + +PROGRAM=ltmain.sh +PACKAGE=libtool +VERSION="1.5.22 Debian 1.5.22-2" +TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" + +# See if we are running on zsh, and set the options which allow our +# commands through without removal of \ escapes. +if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST +fi + +# Check that we have a working $echo. +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then + # Yippee, $echo works! + : +else + # Restart under the correct shell, and then maybe $echo will work. + exec $SHELL "$progpath" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat <&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE +fi + +# Global variables. +mode=$default_mode +nonopt= +prev= +prevopt= +run= +show="$echo" +show_help= +execute_dlfiles= +duplicate_deps=no +preserve_args= +lo2o="s/\\.lo\$/.${objext}/" +o2lo="s/\\.${objext}\$/.lo/" + +##################################### +# Shell function definitions: +# This seems to be the best place for them + +# func_mktempdir [string] +# Make a temporary directory that won't clash with other running +# libtool processes, and avoids race conditions if possible. If +# given, STRING is the basename for that directory. +func_mktempdir () +{ + my_template="${TMPDIR-/tmp}/${1-$progname}" + + if test "$run" = ":"; then + # Return a directory name, but don't create it in dry-run mode + my_tmpdir="${my_template}-$$" + else + + # If mktemp works, use that first and foremost + my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` + + if test ! -d "$my_tmpdir"; then + # Failing that, at least try and use $RANDOM to avoid a race + my_tmpdir="${my_template}-${RANDOM-0}$$" + + save_mktempdir_umask=`umask` + umask 0077 + $mkdir "$my_tmpdir" + umask $save_mktempdir_umask + fi + + # If we're not in dry-run mode, bomb out on failure + test -d "$my_tmpdir" || { + $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 + exit $EXIT_FAILURE + } + fi + + $echo "X$my_tmpdir" | $Xsed +} + + +# func_win32_libid arg +# return the library type of file 'arg' +# +# Need a lot of goo to handle *both* DLLs and import libs +# Has to be a shell function in order to 'eat' the argument +# that is supplied when $file_magic_command is called. +func_win32_libid () +{ + win32_libid_type="unknown" + win32_fileres=`file -L $1 2>/dev/null` + case $win32_fileres in + *ar\ archive\ import\ library*) # definitely import + win32_libid_type="x86 archive import" + ;; + *ar\ archive*) # could be an import, or static + if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ + $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + win32_nmres=`eval $NM -f posix -A $1 | \ + $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` + case $win32_nmres in + import*) win32_libid_type="x86 archive import";; + *) win32_libid_type="x86 archive static";; + esac + fi + ;; + *DLL*) + win32_libid_type="x86 DLL" + ;; + *executable*) # but shell scripts are "executable" too... + case $win32_fileres in + *MS\ Windows\ PE\ Intel*) + win32_libid_type="x86 DLL" + ;; + esac + ;; + esac + $echo $win32_libid_type +} + + +# func_infer_tag arg +# Infer tagged configuration to use if any are available and +# if one wasn't chosen via the "--tag" command line option. +# Only attempt this if the compiler in the base compile +# command doesn't match the default compiler. +# arg is usually of the form 'gcc ...' +func_infer_tag () +{ + if test -n "$available_tags" && test -z "$tagname"; then + CC_quoted= + for arg in $CC; do + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case $@ in + # Blanks in the command may have been stripped by the calling shell, + # but not from the CC environment variable when configure was run. + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; + # Blanks at the start of $base_compile will cause this to fail + # if we don't check for them as well. + *) + for z in $available_tags; do + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" + CC_quoted= + for arg in $CC; do + # Double-quote args containing other shell metacharacters. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + CC_quoted="$CC_quoted $arg" + done + case "$@ " in + " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) + # The compiler in the base compile command matches + # the one in the tagged configuration. + # Assume this is the tagged configuration we want. + tagname=$z + break + ;; + esac + fi + done + # If $tagname still isn't set, then no tagged configuration + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" + $echo "$modename: specify a tag with \`--tag'" 1>&2 + exit $EXIT_FAILURE +# else +# $echo "$modename: using $tagname tagged configuration" + fi + ;; + esac + fi +} + + +# func_extract_an_archive dir oldlib +func_extract_an_archive () +{ + f_ex_an_ar_dir="$1"; shift + f_ex_an_ar_oldlib="$1" + + $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" + $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? + if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 + exit $EXIT_FAILURE + fi +} + +# func_extract_archives gentop oldlib ... +func_extract_archives () +{ + my_gentop="$1"; shift + my_oldlibs=${1+"$@"} + my_oldobjs="" + my_xlib="" + my_xabs="" + my_xdir="" + my_status="" + + $show "${rm}r $my_gentop" + $run ${rm}r "$my_gentop" + $show "$mkdir $my_gentop" + $run $mkdir "$my_gentop" + my_status=$? + if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then + exit $my_status + fi + + for my_xlib in $my_oldlibs; do + # Extract the objects. + case $my_xlib in + [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; + *) my_xabs=`pwd`"/$my_xlib" ;; + esac + my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` + my_xdir="$my_gentop/$my_xlib" + + $show "${rm}r $my_xdir" + $run ${rm}r "$my_xdir" + $show "$mkdir $my_xdir" + $run $mkdir "$my_xdir" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then + exit $exit_status + fi + case $host in + *-darwin*) + $show "Extracting $my_xabs" + # Do not bother doing anything if just a dry run + if test -z "$run"; then + darwin_orig_dir=`pwd` + cd $my_xdir || exit $? + darwin_archive=$my_xabs + darwin_curdir=`pwd` + darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` + darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` + if test -n "$darwin_arches"; then + darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` + darwin_arch= + $show "$darwin_base_archive has multiple architectures $darwin_arches" + for darwin_arch in $darwin_arches ; do + mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" + lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" + cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" + func_extract_an_archive "`pwd`" "${darwin_base_archive}" + cd "$darwin_curdir" + $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" + done # $darwin_arches + ## Okay now we have a bunch of thin objects, gotta fatten them up :) + darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` + darwin_file= + darwin_files= + for darwin_file in $darwin_filelist; do + darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + lipo -create -output "$darwin_file" $darwin_files + done # $darwin_filelist + ${rm}r unfat-$$ + cd "$darwin_orig_dir" + else + cd "$darwin_orig_dir" + func_extract_an_archive "$my_xdir" "$my_xabs" + fi # $darwin_arches + fi # $run + ;; + *) + func_extract_an_archive "$my_xdir" "$my_xabs" + ;; + esac + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + done + func_extract_archives_result="$my_oldobjs" +} +# End of Shell function definitions +##################################### + +# Darwin sucks +eval std_shrext=\"$shrext_cmds\" + +disable_libs=no + +# Parse our command line options once, thoroughly. +while test "$#" -gt 0 +do + arg="$1" + shift + + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + execute_dlfiles) + execute_dlfiles="$execute_dlfiles $arg" + ;; + tag) + tagname="$arg" + preserve_args="${preserve_args}=$arg" + + # Check whether tagname contains only valid characters + case $tagname in + *[!-_A-Za-z0-9,/]*) + $echo "$progname: invalid tag name: $tagname" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $tagname in + CC) + # Don't test for the "default" C tag, as we know, it's there, but + # not specially marked. + ;; + *) + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then + taglist="$taglist $tagname" + # Evaluate the configuration. + eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" + else + $echo "$progname: ignoring unknown tag $tagname" 1>&2 + fi + ;; + esac + ;; + *) + eval "$prev=\$arg" + ;; + esac + + prev= + prevopt= + continue + fi + + # Have we seen a non-optional argument yet? + case $arg in + --help) + show_help=yes + ;; + + --version) + $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" + $echo + $echo "Copyright (C) 2005 Free Software Foundation, Inc." + $echo "This is free software; see the source for copying conditions. There is NO" + $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + exit $? + ;; + + --config) + ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath + # Now print the configurations for the tags. + for tagname in $taglist; do + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" + done + exit $? + ;; + + --debug) + $echo "$progname: enabling shell trace mode" + set -x + preserve_args="$preserve_args $arg" + ;; + + --dry-run | -n) + run=: + ;; + + --features) + $echo "host: $host" + if test "$build_libtool_libs" = yes; then + $echo "enable shared libraries" + else + $echo "disable shared libraries" + fi + if test "$build_old_libs" = yes; then + $echo "enable static libraries" + else + $echo "disable static libraries" + fi + exit $? + ;; + + --finish) mode="finish" ;; + + --mode) prevopt="--mode" prev=mode ;; + --mode=*) mode="$optarg" ;; + + --preserve-dup-deps) duplicate_deps="yes" ;; + + --quiet | --silent) + show=: + preserve_args="$preserve_args $arg" + ;; + + --tag) + prevopt="--tag" + prev=tag + preserve_args="$preserve_args --tag" + ;; + --tag=*) + set tag "$optarg" ${1+"$@"} + shift + prev=tag + preserve_args="$preserve_args --tag" + ;; + + -dlopen) + prevopt="-dlopen" + prev=execute_dlfiles + ;; + + -*) + $echo "$modename: unrecognized option \`$arg'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + + *) + nonopt="$arg" + break + ;; + esac +done + +if test -n "$prevopt"; then + $echo "$modename: option \`$prevopt' requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE +fi + +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + +# If this variable is set in any of the actions, the command in it +# will be execed at the end. This prevents here-documents from being +# left over by shells. +exec_cmd= + +if test -z "$show_help"; then + + # Infer the operation mode. + if test -z "$mode"; then + $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 + $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 + case $nonopt in + *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) + mode=link + for arg + do + case $arg in + -c) + mode=compile + break + ;; + esac + done + ;; + *db | *dbx | *strace | *truss) + mode=execute + ;; + *install*|cp|mv) + mode=install + ;; + *rm) + mode=uninstall + ;; + *) + # If we have no mode, but dlfiles were specified, then do execute mode. + test -n "$execute_dlfiles" && mode=execute + + # Just use the default operation mode. + if test -z "$mode"; then + if test -n "$nonopt"; then + $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 + else + $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 + fi + fi + ;; + esac + fi + + # Only execute mode is allowed to have -dlopen flags. + if test -n "$execute_dlfiles" && test "$mode" != execute; then + $echo "$modename: unrecognized option \`-dlopen'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$modename --help --mode=$mode' for more information." + + # These modes are in order of execution frequency so that they run quickly. + case $mode in + # libtool compile mode + compile) + modename="$modename: compile" + # Get the compilation command and the source file. + base_compile= + srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes + suppress_output= + arg_mode=normal + libobj= + later= + + for arg + do + case $arg_mode in + arg ) + # do not "continue". Instead, add this to base_compile + lastarg="$arg" + arg_mode=normal + ;; + + target ) + libobj="$arg" + arg_mode=normal + continue + ;; + + normal ) + # Accept any command-line options. + case $arg in + -o) + if test -n "$libobj" ; then + $echo "$modename: you cannot specify \`-o' more than once" 1>&2 + exit $EXIT_FAILURE + fi + arg_mode=target + continue + ;; + + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" + continue + ;; + + -no-suppress) + suppress_opt=no + continue + ;; + + -Xcompiler) + arg_mode=arg # the next one goes into the "base_compile" arg list + continue # The current "srcfile" will either be retained or + ;; # replaced later. I would guess that would be a bug. + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` + lastarg= + save_ifs="$IFS"; IFS=',' + for arg in $args; do + IFS="$save_ifs" + + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + lastarg="$lastarg $arg" + done + IFS="$save_ifs" + lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` + + # Add the arguments to base_compile. + base_compile="$base_compile $lastarg" + continue + ;; + + * ) + # Accept the current argument as the source file. + # The previous "srcfile" becomes the current argument. + # + lastarg="$srcfile" + srcfile="$arg" + ;; + esac # case $arg + ;; + esac # case $arg_mode + + # Aesthetically quote the previous argument. + lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` + + case $lastarg in + # Double-quote args containing other shell metacharacters. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, and some SunOS ksh mistreat backslash-escaping + # in scan sets (worked around with variable expansion), + # and furthermore cannot handle '|' '&' '(' ')' in scan sets + # at all, so we specify them separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + lastarg="\"$lastarg\"" + ;; + esac + + base_compile="$base_compile $lastarg" + done # for arg + + case $arg_mode in + arg) + $echo "$modename: you must specify an argument for -Xcompile" + exit $EXIT_FAILURE + ;; + target) + $echo "$modename: you must specify a target with \`-o'" 1>&2 + exit $EXIT_FAILURE + ;; + *) + # Get the name of the library object. + [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` + ;; + esac + + # Recognize several different file suffixes. + # If the user specifies -o file.o, it is replaced with file.lo + xform='[cCFSifmso]' + case $libobj in + *.ada) xform=ada ;; + *.adb) xform=adb ;; + *.ads) xform=ads ;; + *.asm) xform=asm ;; + *.c++) xform=c++ ;; + *.cc) xform=cc ;; + *.ii) xform=ii ;; + *.class) xform=class ;; + *.cpp) xform=cpp ;; + *.cxx) xform=cxx ;; + *.f90) xform=f90 ;; + *.for) xform=for ;; + *.java) xform=java ;; + esac + + libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` + + case $libobj in + *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; + *) + $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + func_infer_tag $base_compile + + for arg in $later; do + case $arg in + -static) + build_old_libs=yes + continue + ;; + + -prefer-pic) + pic_mode=yes + continue + ;; + + -prefer-non-pic) + pic_mode=no + continue + ;; + esac + done + + qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` + case $qlibobj in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qlibobj="\"$qlibobj\"" ;; + esac + test "X$libobj" != "X$qlibobj" \ + && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ + && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." + objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$obj"; then + xdir= + else + xdir=$xdir/ + fi + lobj=${xdir}$objdir/$objname + + if test -z "$base_compile"; then + $echo "$modename: you must specify a compilation command" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Delete any leftover library objects. + if test "$build_old_libs" = yes; then + removelist="$obj $lobj $libobj ${libobj}T" + else + removelist="$lobj $libobj ${libobj}T" + fi + + $run $rm $removelist + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + + # On Cygwin there's no "real" PIC flag so we must build both object types + case $host_os in + cygwin* | mingw* | pw32* | os2*) + pic_mode=default + ;; + esac + if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then + # non-PIC code in shared libraries is not supported + pic_mode=default + fi + + # Calculate the filename of the output object if compiler does + # not support -o with -c + if test "$compiler_c_o" = no; then + output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + lockfile="$output_obj.lock" + removelist="$removelist $output_obj $lockfile" + trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 + else + output_obj= + need_locks=no + lockfile= + fi + + # Lock this critical section if it is needed + # We use this script file to make the link, it avoids creating a new file + if test "$need_locks" = yes; then + until $run ln "$progpath" "$lockfile" 2>/dev/null; do + $show "Waiting for $lockfile to be removed" + sleep 2 + done + elif test "$need_locks" = warn; then + if test -f "$lockfile"; then + $echo "\ +*** ERROR, $lockfile exists and contains: +`cat $lockfile 2>/dev/null` + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + $echo "$srcfile" > "$lockfile" + fi + + if test -n "$fix_srcfile_path"; then + eval srcfile=\"$fix_srcfile_path\" + fi + qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` + case $qsrcfile in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qsrcfile="\"$qsrcfile\"" ;; + esac + + $run $rm "$libobj" "${libobj}T" + + # Create a libtool object file (analogous to a ".la" file), + # but don't create it if we're doing a dry run. + test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed, then go on to compile the next one + if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then + $show "$mv $output_obj $lobj" + if $run $mv $output_obj $lobj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the PIC object to the libtool object file. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then + $echo "\ +*** ERROR, $lockfile contains: +`cat $lockfile 2>/dev/null` + +but it should contain: +$srcfile + +This indicates that another process is trying to use the same +temporary object file, and libtool could not work around it because +your compiler does not support \`-c' and \`-o' together. If you +repeat this compilation, it may succeed, by chance, but you had better +avoid parallel builds (make -j) in this platform, or get a better +compiler." + + $run $rm $removelist + exit $EXIT_FAILURE + fi + + # Just move the object if needed + if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then + $show "$mv $output_obj $obj" + if $run $mv $output_obj $obj; then : + else + error=$? + $run $rm $removelist + exit $error + fi + fi + + # Append the name of the non-PIC object the libtool object file. + # Only append if the libtool object file exists. + test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 + fi + if test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=yes + else + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static + fi + prefer_static_libs=built + fi + build_libtool_libs=no + build_old_libs=yes + break + ;; + esac + done + + # See if our shared archives depend on static archives. + test -n "$old_archive_from_new_cmds" && build_old_libs=yes + + # Go through the arguments, transforming them on the way. + while test "$#" -gt 0; do + arg="$1" + shift + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test + ;; + *) qarg=$arg ;; + esac + libtool_args="$libtool_args $qarg" + + # If the previous option needs an argument, assign it. + if test -n "$prev"; then + case $prev in + output) + compile_command="$compile_command @OUTPUT@" + finalize_command="$finalize_command @OUTPUT@" + ;; + esac + + case $prev in + dlfiles|dlprefiles) + if test "$preload" = no; then + # Add the symbol object into the linking commands. + compile_command="$compile_command @SYMFILE@" + finalize_command="$finalize_command @SYMFILE@" + preload=yes + fi + case $arg in + *.la | *.lo) ;; # We handle these cases below. + force) + if test "$dlself" = no; then + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + self) + if test "$prev" = dlprefiles; then + dlself=yes + elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then + dlself=yes + else + dlself=needless + export_dynamic=yes + fi + prev= + continue + ;; + *) + if test "$prev" = dlfiles; then + dlfiles="$dlfiles $arg" + else + dlprefiles="$dlprefiles $arg" + fi + prev= + continue + ;; + esac + ;; + expsyms) + export_symbols="$arg" + if test ! -f "$arg"; then + $echo "$modename: symbol file \`$arg' does not exist" + exit $EXIT_FAILURE + fi + prev= + continue + ;; + expsyms_regex) + export_symbols_regex="$arg" + prev= + continue + ;; + inst_prefix) + inst_prefix_dir="$arg" + prev= + continue + ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; + release) + release="-$arg" + prev= + continue + ;; + objectlist) + if test -f "$arg"; then + save_arg=$arg + moreargs= + for fil in `cat $save_arg` + do +# moreargs="$moreargs $fil" + arg=$fil + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + done + else + $echo "$modename: link input file \`$save_arg' does not exist" + exit $EXIT_FAILURE + fi + arg=$save_arg + prev= + continue + ;; + rpath | xrpath) + # We need an absolute path. + case $arg in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + if test "$prev" = rpath; then + case "$rpath " in + *" $arg "*) ;; + *) rpath="$rpath $arg" ;; + esac + else + case "$xrpath " in + *" $arg "*) ;; + *) xrpath="$xrpath $arg" ;; + esac + fi + prev= + continue + ;; + xcompiler) + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + xlinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $wl$qarg" + prev= + compile_command="$compile_command $wl$qarg" + finalize_command="$finalize_command $wl$qarg" + continue + ;; + xcclinker) + linker_flags="$linker_flags $qarg" + compiler_flags="$compiler_flags $qarg" + prev= + compile_command="$compile_command $qarg" + finalize_command="$finalize_command $qarg" + continue + ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; + darwin_framework|darwin_framework_skip) + test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + prev= + continue + ;; + *) + eval "$prev=\"\$arg\"" + prev= + continue + ;; + esac + fi # test -n "$prev" + + prevarg="$arg" + + case $arg in + -all-static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" + fi + continue + ;; + + -allow-undefined) + # FIXME: remove this flag sometime in the future. + $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 + continue + ;; + + -avoid-version) + avoid_version=yes + continue + ;; + + -dlopen) + prev=dlfiles + continue + ;; + + -dlpreopen) + prev=dlprefiles + continue + ;; + + -export-dynamic) + export_dynamic=yes + continue + ;; + + -export-symbols | -export-symbols-regex) + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: more than one -exported-symbols argument is not allowed" + exit $EXIT_FAILURE + fi + if test "X$arg" = "X-export-symbols"; then + prev=expsyms + else + prev=expsyms_regex + fi + continue + ;; + + -framework|-arch|-isysroot) + case " $CC " in + *" ${arg} ${1} "* | *" ${arg} ${1} "*) + prev=darwin_framework_skip ;; + *) compiler_flags="$compiler_flags $arg" + prev=darwin_framework ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -inst-prefix-dir) + prev=inst_prefix + continue + ;; + + # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* + # so, if we see these flags be careful not to treat them like -L + -L[A-Z][A-Z]*:*) + case $with_gcc/$host in + no/*-*-irix* | /*-*-irix*) + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + ;; + esac + continue + ;; + + -L*) + dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + notinst_path="$notinst_path $dir" + fi + dir="$absdir" + ;; + esac + case "$deplibs " in + *" -L$dir "*) ;; + *) + deplibs="$deplibs -L$dir" + lib_search_path="$lib_search_path $dir" + ;; + esac + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$dir:"*) ;; + *) dllsearchpath="$dllsearchpath:$dir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + continue + ;; + + -l*) + if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) + # These systems don't actually have a C or math library (as such) + continue + ;; + *-*-os2*) + # These systems don't actually have a C library (as such) + test "X$arg" = "X-lc" && continue + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + test "X$arg" = "X-lc" && continue + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C and math libraries are in the System framework + deplibs="$deplibs -framework System" + continue + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + test "X$arg" = "X-lc" && continue + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + test "X$arg" = "X-lc" && continue + ;; + esac + elif test "X$arg" = "X-lc_r"; then + case $host in + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc_r directly, use -pthread flag. + continue + ;; + esac + fi + deplibs="$deplibs $arg" + continue + ;; + + # Tru64 UNIX uses -model [arg] to determine the layout of C++ + # classes, name mangling, and exception handling. + -model) + compile_command="$compile_command $arg" + compiler_flags="$compiler_flags $arg" + finalize_command="$finalize_command $arg" + prev=xcompiler + continue + ;; + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + compiler_flags="$compiler_flags $arg" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + continue + ;; + + -module) + module=yes + continue + ;; + + # -64, -mips[0-9] enable 64-bit mode on the SGI compiler + # -r[0-9][0-9]* specifies the processor on the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler + # +DA*, +DD* enable 64-bit mode on the HP compiler + # -q* pass through compiler args for the IBM compiler + # -m* pass through architecture-specific compiler args for GCC + # -m*, -t[45]*, -txscale* pass through architecture-specific + # compiler args for GCC + # -pg pass through profiling flag for GCC + # @file GCC response files + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ + -t[45]*|-txscale*|@*) + + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + compiler_flags="$compiler_flags $arg" + continue + ;; + + -shrext) + prev=shrext + continue + ;; + + -no-fast-install) + fast_install=no + continue + ;; + + -no-install) + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + # The PATH hackery in wrapper scripts is required on Windows + # in order for the loader to find any dlls it needs. + $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 + $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 + fast_install=no + ;; + *) no_install=yes ;; + esac + continue + ;; + + -no-undefined) + allow_undefined=no + continue + ;; + + -objectlist) + prev=objectlist + continue + ;; + + -o) prev=output ;; + + -precious-files-regex) + prev=precious_regex + continue + ;; + + -release) + prev=release + continue + ;; + + -rpath) + prev=rpath + continue + ;; + + -R) + prev=xrpath + continue + ;; + + -R*) + dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + $echo "$modename: only absolute run-paths are allowed" 1>&2 + exit $EXIT_FAILURE + ;; + esac + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + continue + ;; + + -static) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects + # would be equivalent was wrong. It would break on at least + # Digital Unix and AIX. + continue + ;; + + -thread-safe) + thread_safe=yes + continue + ;; + + -version-info) + prev=vinfo + continue + ;; + -version-number) + prev=vinfo + vinfo_number=yes + continue + ;; + + -Wc,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Wl,*) + args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` + arg= + save_ifs="$IFS"; IFS=',' + for flag in $args; do + IFS="$save_ifs" + case $flag in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + flag="\"$flag\"" + ;; + esac + arg="$arg $wl$flag" + compiler_flags="$compiler_flags $wl$flag" + linker_flags="$linker_flags $flag" + done + IFS="$save_ifs" + arg=`$echo "X$arg" | $Xsed -e "s/^ //"` + ;; + + -Xcompiler) + prev=xcompiler + continue + ;; + + -Xlinker) + prev=xlinker + continue + ;; + + -XCClinker) + prev=xcclinker + continue + ;; + + # Some other compiler flag. + -* | +*) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + + *.$objext) + # A standard object. + objs="$objs $arg" + ;; + + *.lo) + # A libtool-controlled object. + + # Check to see that this really is a libtool object. + if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + pic_object= + non_pic_object= + + # Read the .lo file + # If there is no directory component, then add one. + case $arg in + */* | *\\*) . $arg ;; + *) . ./$arg ;; + esac + + if test -z "$pic_object" || \ + test -z "$non_pic_object" || + test "$pic_object" = none && \ + test "$non_pic_object" = none; then + $echo "$modename: cannot find name of object for \`$arg'" 1>&2 + exit $EXIT_FAILURE + fi + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + if test "$pic_object" != none; then + # Prepend the subdirectory the object is found in. + pic_object="$xdir$pic_object" + + if test "$prev" = dlfiles; then + if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then + dlfiles="$dlfiles $pic_object" + prev= + continue + else + # If libtool objects are unsupported, then we need to preload. + prev=dlprefiles + fi + fi + + # CHECK ME: I think I busted this. -Ossama + if test "$prev" = dlprefiles; then + # Preload the old-style object. + dlprefiles="$dlprefiles $pic_object" + prev= + fi + + # A PIC object. + libobjs="$libobjs $pic_object" + arg="$pic_object" + fi + + # Non-PIC object. + if test "$non_pic_object" != none; then + # Prepend the subdirectory the object is found in. + non_pic_object="$xdir$non_pic_object" + + # A standard non-PIC object + non_pic_objects="$non_pic_objects $non_pic_object" + if test -z "$pic_object" || test "$pic_object" = none ; then + arg="$non_pic_object" + fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + else + # Only an error if not doing a dry-run. + if test -z "$run"; then + $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 + exit $EXIT_FAILURE + else + # Dry-run case. + + # Extract subdirectory from the argument. + xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` + if test "X$xdir" = "X$arg"; then + xdir= + else + xdir="$xdir/" + fi + + pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` + non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` + libobjs="$libobjs $pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" + fi + fi + ;; + + *.$libext) + # An archive. + deplibs="$deplibs $arg" + old_deplibs="$old_deplibs $arg" + continue + ;; + + *.la) + # A libtool-controlled library. + + if test "$prev" = dlfiles; then + # This library was specified with -dlopen. + dlfiles="$dlfiles $arg" + prev= + elif test "$prev" = dlprefiles; then + # The library was specified with -dlpreopen. + dlprefiles="$dlprefiles $arg" + prev= + else + deplibs="$deplibs $arg" + fi + continue + ;; + + # Some other compiler argument. + *) + # Unknown arguments in both finalize_command and compile_command need + # to be aesthetically quoted because they are evaled later. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + ;; + esac # arg + + # Now actually substitute the argument into the commands. + if test -n "$arg"; then + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + done # argument parsing loop + + if test -n "$prev"; then + $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then + eval arg=\"$export_dynamic_flag_spec\" + compile_command="$compile_command $arg" + finalize_command="$finalize_command $arg" + fi + + oldlibs= + # calculate the name of the file, without its directory + outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` + libobjs_save="$libobjs" + + if test -n "$shlibpath_var"; then + # get the directories listed in $shlibpath_var + eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + else + shlib_search_path= + fi + eval sys_lib_search_path=\"$sys_lib_search_path_spec\" + eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" + + output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` + if test "X$output_objdir" = "X$output"; then + output_objdir="$objdir" + else + output_objdir="$output_objdir/$objdir" + fi + # Create the object directory. + if test ! -d "$output_objdir"; then + $show "$mkdir $output_objdir" + $run $mkdir $output_objdir + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then + exit $exit_status + fi + fi + + # Determine the type of output + case $output in + "") + $echo "$modename: you must specify an output file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + *.$libext) linkmode=oldlib ;; + *.lo | *.$objext) linkmode=obj ;; + *.la) linkmode=lib ;; + *) linkmode=prog ;; # Anything else should be a program. + esac + + case $host in + *cygwin* | *mingw* | *pw32*) + # don't eliminate duplications in $postdeps and $predeps + duplicate_compiler_generated_deps=yes + ;; + *) + duplicate_compiler_generated_deps=$duplicate_deps + ;; + esac + specialdeplibs= + + libs= + # Find all interdependent deplibs by searching for libraries + # that are linked more than once (e.g. -la -lb -la) + for deplib in $deplibs; do + if test "X$duplicate_deps" = "Xyes" ; then + case "$libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + libs="$libs $deplib" + done + + if test "$linkmode" = lib; then + libs="$predeps $libs $compiler_lib_search_path $postdeps" + + # Compute libraries that are listed more than once in $predeps + # $postdeps and mark them as special (i.e., whose duplicates are + # not to be eliminated). + pre_post_deps= + if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then + for pre_post_dep in $predeps $postdeps; do + case "$pre_post_deps " in + *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + esac + pre_post_deps="$pre_post_deps $pre_post_dep" + done + fi + pre_post_deps= + fi + + deplibs= + newdependency_libs= + newlib_search_path= + need_relink=no # whether we're linking any uninstalled libtool libraries + notinst_deplibs= # not-installed libtool libraries + case $linkmode in + lib) + passes="conv link" + for file in $dlfiles $dlprefiles; do + case $file in + *.la) ;; + *) + $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + prog) + compile_deplibs= + finalize_deplibs= + alldeplibs=no + newdlfiles= + newdlprefiles= + passes="conv scan dlopen dlpreopen link" + ;; + *) passes="conv" + ;; + esac + for pass in $passes; do + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan"; then + libs="$deplibs" + deplibs= + fi + if test "$linkmode" = prog; then + case $pass in + dlopen) libs="$dlfiles" ;; + dlpreopen) libs="$dlprefiles" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; + esac + fi + if test "$pass" = dlopen; then + # Collect dlpreopened libraries + save_deplibs="$deplibs" + deplibs= + fi + for deplib in $libs; do + lib= + found=no + case $deplib in + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + compiler_flags="$compiler_flags $deplib" + fi + continue + ;; + -l*) + if test "$linkmode" != lib && test "$linkmode" != prog; then + $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 + continue + fi + name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` + for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do + for search_ext in .la $std_shrext .so .a; do + # Search the libtool library + lib="$searchdir/lib${name}${search_ext}" + if test -f "$lib"; then + if test "$search_ext" = ".la"; then + found=yes + else + found=no + fi + break 2 + fi + done + done + if test "$found" != yes; then + # deplib doesn't seem to be a libtool library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + else # deplib is a libtool library + # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, + # We need to do some special things here, and not later. + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $deplib "*) + if (${SED} -e '2q' $lib | + grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + library_names= + old_library= + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + for l in $old_library $library_names; do + ll="$l" + done + if test "X$ll" = "X$old_library" ; then # only static version available + found=no + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + lib=$ladir/$old_library + if test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + deplibs="$deplib $deplibs" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" + fi + continue + fi + fi + ;; + *) ;; + esac + fi + fi + ;; # -l + -L*) + case $linkmode in + lib) + deplibs="$deplib $deplibs" + test "$pass" = conv && continue + newdependency_libs="$deplib $newdependency_libs" + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + prog) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + if test "$pass" = scan; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` + ;; + *) + $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 + ;; + esac # linkmode + continue + ;; # -L + -R*) + if test "$pass" = link; then + dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` + # Make sure the xrpath contains only unique directories. + case "$xrpath " in + *" $dir "*) ;; + *) xrpath="$xrpath $dir" ;; + esac + fi + deplibs="$deplib $deplibs" + continue + ;; + *.la) lib="$deplib" ;; + *.$libext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + continue + fi + case $linkmode in + lib) + valid_a_lib=no + case $deplibs_check_method in + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + if eval $echo \"$deplib\" 2>/dev/null \ + | $SED 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + valid_a_lib=yes + fi + ;; + pass_all) + valid_a_lib=yes + ;; + esac + if test "$valid_a_lib" != yes; then + $echo + $echo "*** Warning: Trying to link with static lib archive $deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because the file extensions .$libext of this argument makes me believe" + $echo "*** that it is just a static archive that I should not used here." + else + $echo + $echo "*** Warning: Linking the shared library $output against the" + $echo "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + fi + continue + ;; + prog) + if test "$pass" != link; then + deplibs="$deplib $deplibs" + else + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + fi + continue + ;; + esac # linkmode + ;; # *.$libext + *.lo | *.$objext) + if test "$pass" = conv; then + deplibs="$deplib $deplibs" + elif test "$linkmode" = prog; then + if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then + # If there is no dlopen support or we're linking statically, + # we need to preload. + newdlprefiles="$newdlprefiles $deplib" + compile_deplibs="$deplib $compile_deplibs" + finalize_deplibs="$deplib $finalize_deplibs" + else + newdlfiles="$newdlfiles $deplib" + fi + fi + continue + ;; + %DEPLIBS%) + alldeplibs=yes + continue + ;; + esac # case $deplib + if test "$found" = yes || test -f "$lib"; then : + else + $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 + exit $EXIT_FAILURE + fi + + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + + ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` + test "X$ladir" = "X$lib" && ladir="." + + dlname= + dlopen= + dlpreopen= + libdir= + library_names= + old_library= + # If the library was installed with an old release of libtool, + # it will not redefine variables installed, or shouldnotlink + installed=yes + shouldnotlink=no + avoidtemprpath= + + + # Read the .la file + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + + if test "$linkmode,$pass" = "lib,link" || + test "$linkmode,$pass" = "prog,scan" || + { test "$linkmode" != prog && test "$linkmode" != lib; }; then + test -n "$dlopen" && dlfiles="$dlfiles $dlopen" + test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + fi + + if test "$pass" = conv; then + # Only check for convenience libraries + deplibs="$lib $deplibs" + if test -z "$libdir"; then + if test -z "$old_library"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # It is a libtool convenience library, so add in its objects. + convenience="$convenience $ladir/$objdir/$old_library" + old_convenience="$old_convenience $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + elif test "$linkmode" != prog && test "$linkmode" != lib; then + $echo "$modename: \`$lib' is not a convenience library" 1>&2 + exit $EXIT_FAILURE + fi + continue + fi # $pass = conv + + + # Get the name of the library we link against. + linklib= + for l in $old_library $library_names; do + linklib="$l" + done + if test -z "$linklib"; then + $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + + # This library was specified with -dlopen. + if test "$pass" = dlopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + if test -z "$dlname" || + test "$dlopen_support" != yes || + test "$build_libtool_libs" = no; then + # If there is no dlname, no dlopen support or we're linking + # statically, we need to preload. We also need to preload any + # dependent libraries so libltdl's deplib preloader doesn't + # bomb out in the load deplibs phase. + dlprefiles="$dlprefiles $lib $dependency_libs" + else + newdlfiles="$newdlfiles $lib" + fi + continue + fi # $pass = dlopen + + # We need an absolute path. + case $ladir in + [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; + *) + abs_ladir=`cd "$ladir" && pwd` + if test -z "$abs_ladir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 + $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 + abs_ladir="$ladir" + fi + ;; + esac + laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + + # Find the relevant object directory and library name. + if test "X$installed" = Xyes; then + if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + $echo "$modename: warning: library \`$lib' was moved." 1>&2 + dir="$ladir" + absdir="$abs_ladir" + libdir="$abs_ladir" + else + dir="$libdir" + absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else + if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then + dir="$ladir" + absdir="$abs_ladir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + else + dir="$ladir/$objdir" + absdir="$abs_ladir/$objdir" + # Remove this search path later + notinst_path="$notinst_path $abs_ladir" + fi + fi # $installed = yes + name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + + # This library was specified with -dlpreopen. + if test "$pass" = dlpreopen; then + if test -z "$libdir"; then + $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 + exit $EXIT_FAILURE + fi + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + newdlprefiles="$newdlprefiles $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + newdlprefiles="$newdlprefiles $dir/$dlname" + else + newdlprefiles="$newdlprefiles $dir/$linklib" + fi + fi # $pass = dlpreopen + + if test -z "$libdir"; then + # Link the convenience library + if test "$linkmode" = lib; then + deplibs="$dir/$old_library $deplibs" + elif test "$linkmode,$pass" = "prog,link"; then + compile_deplibs="$dir/$old_library $compile_deplibs" + finalize_deplibs="$dir/$old_library $finalize_deplibs" + else + deplibs="$lib $deplibs" # used for prog,scan pass + fi + continue + fi + + + if test "$linkmode" = prog && test "$pass" != link; then + newlib_search_path="$newlib_search_path $ladir" + deplibs="$lib $deplibs" + + linkalldeplibs=no + if test "$link_all_deplibs" != no || test -z "$library_names" || + test "$build_libtool_libs" = no; then + linkalldeplibs=yes + fi + + tmp_libs= + for deplib in $dependency_libs; do + case $deplib in + -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test + esac + # Need to link against all dependency_libs? + if test "$linkalldeplibs" = yes; then + deplibs="$deplib $deplibs" + else + # Need to hardcode shared library paths + # or/and link against static libraries + newdependency_libs="$deplib $newdependency_libs" + fi + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done # for deplib + continue + fi # $linkmode = prog... + + if test "$linkmode,$pass" = "prog,link"; then + if test -n "$library_names" && + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + # We need to hardcode the library path + if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then + # Make sure the rpath contains only unique directories. + case "$temp_rpath " in + *" $dir "*) ;; + *" $absdir "*) ;; + *) temp_rpath="$temp_rpath $absdir" ;; + esac + fi + + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi # $linkmode,$pass = prog,link... + + if test "$alldeplibs" = yes && + { test "$deplibs_check_method" = pass_all || + { test "$build_libtool_libs" = yes && + test -n "$library_names"; }; }; then + # We only need to search for static libraries + continue + fi + fi + + link_static=no # Whether the deplib will be linked statically + use_static_libs=$prefer_static_libs + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi + if test -n "$library_names" && + { test "$use_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" + need_relink=yes + fi + # This is a shared library + + # Warn about portability, can't link against -module's on + # some systems (darwin) + if test "$shouldnotlink" = yes && test "$pass" = link ; then + $echo + if test "$linkmode" = prog; then + $echo "*** Warning: Linking the executable $output against the loadable module" + else + $echo "*** Warning: Linking the shared library $output against the loadable module" + fi + $echo "*** $linklib is not portable!" + fi + if test "$linkmode" = lib && + test "$hardcode_into_libs" = yes; then + # Hardcode the library path. + # Skip directories that are in the system default run-time + # search path. + case " $sys_lib_dlsearch_path " in + *" $absdir "*) ;; + *) + case "$compile_rpath " in + *" $absdir "*) ;; + *) compile_rpath="$compile_rpath $absdir" + esac + ;; + esac + case " $sys_lib_dlsearch_path " in + *" $libdir "*) ;; + *) + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" + esac + ;; + esac + fi + + if test -n "$old_archive_from_expsyms_cmds"; then + # figure out the soname + set dummy $library_names + realname="$2" + shift; shift + libname=`eval \\$echo \"$libname_spec\"` + # use dlname if we got it. it's perfectly good, no? + if test -n "$dlname"; then + soname="$dlname" + elif test -n "$soname_spec"; then + # bleh windows + case $host in + *cygwin* | mingw*) + major=`expr $current - $age` + versuffix="-$major" + ;; + esac + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + + # Make a new name for the extract_expsyms_cmds to use + soroot="$soname" + soname=`$echo $soroot | ${SED} -e 's/^.*\///'` + newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" + + # If the library has no export list, then create one now + if test -f "$output_objdir/$soname-def"; then : + else + $show "extracting exported symbol list from \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$extract_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + # Create $newlib + if test -f "$output_objdir/$newlib"; then :; else + $show "generating import library for \`$soname'" + save_ifs="$IFS"; IFS='~' + cmds=$old_archive_from_expsyms_cmds + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + # make sure the library variables are pointing to the new library + dir=$output_objdir + linklib=$newlib + fi # test -n "$old_archive_from_expsyms_cmds" + + if test "$linkmode" = prog || test "$mode" != relink; then + add_shlibpath= + add_dir= + add= + lib_linked=yes + case $hardcode_action in + immediate | unsupported) + if test "$hardcode_direct" = no; then + add="$dir/$linklib" + case $host in + *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; + *-*-sysv4*uw2*) add_dir="-L$dir" ;; + *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ + *-*-unixware7*) add_dir="-L$dir" ;; + *-*-darwin* ) + # if the lib is a module then we can not link against + # it, someone is ignoring the new warnings I added + if /usr/bin/file -L $add 2> /dev/null | + $EGREP ": [^:]* bundle" >/dev/null ; then + $echo "** Warning, lib $linklib is a module, not a shared library" + if test -z "$old_library" ; then + $echo + $echo "** And there doesn't seem to be a static archive available" + $echo "** The link will probably fail, sorry" + else + add="$dir/$old_library" + fi + fi + esac + elif test "$hardcode_minus_L" = no; then + case $host in + *-*-sunos*) add_shlibpath="$dir" ;; + esac + add_dir="-L$dir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = no; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + relink) + if test "$hardcode_direct" = yes; then + add="$dir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$dir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + add_shlibpath="$dir" + add="-l$name" + else + lib_linked=no + fi + ;; + *) lib_linked=no ;; + esac + + if test "$lib_linked" != yes; then + $echo "$modename: configuration error: unsupported hardcode properties" + exit $EXIT_FAILURE + fi + + if test -n "$add_shlibpath"; then + case :$compile_shlibpath: in + *":$add_shlibpath:"*) ;; + *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + esac + fi + if test "$linkmode" = prog; then + test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" + test -n "$add" && compile_deplibs="$add $compile_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + if test "$hardcode_direct" != yes && \ + test "$hardcode_minus_L" != yes && \ + test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + fi + fi + fi + + if test "$linkmode" = prog || test "$mode" = relink; then + add_shlibpath= + add_dir= + add= + # Finalize command for both is simple: just hardcode it. + if test "$hardcode_direct" = yes; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then + add_dir="-L$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in + *":$libdir:"*) ;; + *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + esac + add="-l$name" + elif test "$hardcode_automatic" = yes; then + if test -n "$inst_prefix_dir" && + test -f "$inst_prefix_dir$libdir/$linklib" ; then + add="$inst_prefix_dir$libdir/$linklib" + else + add="$libdir/$linklib" + fi + else + # We cannot seem to hardcode it, guess we'll fake it. + add_dir="-L$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) + add_dir="$add_dir -L$inst_prefix_dir$libdir" + ;; + esac + fi + add="-l$name" + fi + + if test "$linkmode" = prog; then + test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" + test -n "$add" && finalize_deplibs="$add $finalize_deplibs" + else + test -n "$add_dir" && deplibs="$add_dir $deplibs" + test -n "$add" && deplibs="$add $deplibs" + fi + fi + elif test "$linkmode" = prog; then + # Here we assume that one of hardcode_direct or hardcode_minus_L + # is not unsupported. This is valid on all known static and + # shared platforms. + if test "$hardcode_direct" != unsupported; then + test -n "$old_library" && linklib="$old_library" + compile_deplibs="$dir/$linklib $compile_deplibs" + finalize_deplibs="$dir/$linklib $finalize_deplibs" + else + compile_deplibs="-l$name -L$dir $compile_deplibs" + finalize_deplibs="-l$name -L$dir $finalize_deplibs" + fi + elif test "$build_libtool_libs" = yes; then + # Not a shared library + if test "$deplibs_check_method" != pass_all; then + # We're trying link a shared library against a static one + # but the system doesn't support it. + + # Just print a warning and add the library to dependency_libs so + # that the program can be linked against the static library. + $echo + $echo "*** Warning: This system can not link to static lib archive $lib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have." + if test "$module" = yes; then + $echo "*** But as you try to build a module library, libtool will still create " + $echo "*** a static module, that should work as long as the dlopening application" + $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + else + deplibs="$dir/$old_library $deplibs" + link_static=yes + fi + fi # link shared/static library? + + if test "$linkmode" = lib; then + if test -n "$dependency_libs" && + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || + test "$link_static" = yes; }; then + # Extract -R from dependency_libs + temp_deplibs= + for libdir in $dependency_libs; do + case $libdir in + -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` + case " $xrpath " in + *" $temp_xrpath "*) ;; + *) xrpath="$xrpath $temp_xrpath";; + esac;; + *) temp_deplibs="$temp_deplibs $libdir";; + esac + done + dependency_libs="$temp_deplibs" + fi + + newlib_search_path="$newlib_search_path $absdir" + # Link against this library + test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" + # ... and its dependency_libs + tmp_libs= + for deplib in $dependency_libs; do + newdependency_libs="$deplib $newdependency_libs" + if test "X$duplicate_deps" = "Xyes" ; then + case "$tmp_libs " in + *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + esac + fi + tmp_libs="$tmp_libs $deplib" + done + + if test "$link_all_deplibs" != no; then + # Add the search paths of all dependency libraries + for deplib in $dependency_libs; do + case $deplib in + -L*) path="$deplib" ;; + *.la) + dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$deplib" && dir="." + # We need an absolute path. + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; + *) + absdir=`cd "$dir" && pwd` + if test -z "$absdir"; then + $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 + absdir="$dir" + fi + ;; + esac + if grep "^installed=no" $deplib > /dev/null; then + path="$absdir/$objdir" + else + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + if test "$absdir" != "$libdir"; then + $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 + fi + path="$absdir" + fi + depdepl= + case $host in + *-*-darwin*) + # we do not want to link against static libs, + # but need to link against shared + eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` + if test -n "$deplibrary_names" ; then + for tmp in $deplibrary_names ; do + depdepl=$tmp + done + if test -f "$path/$depdepl" ; then + depdepl="$path/$depdepl" + fi + # do not add paths which are already there + case " $newlib_search_path " in + *" $path "*) ;; + *) newlib_search_path="$newlib_search_path $path";; + esac + fi + path="" + ;; + *) + path="-L$path" + ;; + esac + ;; + -l*) + case $host in + *-*-darwin*) + # Again, we only want to link against shared libraries + eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` + for tmp in $newlib_search_path ; do + if test -f "$tmp/lib$tmp_libs.dylib" ; then + eval depdepl="$tmp/lib$tmp_libs.dylib" + break + fi + done + path="" + ;; + *) continue ;; + esac + ;; + *) continue ;; + esac + case " $deplibs " in + *" $path "*) ;; + *) deplibs="$path $deplibs" ;; + esac + case " $deplibs " in + *" $depdepl "*) ;; + *) deplibs="$depdepl $deplibs" ;; + esac + done + fi # link_all_deplibs != no + fi # linkmode = lib + done # for deplib in $libs + dependency_libs="$newdependency_libs" + if test "$pass" = dlpreopen; then + # Link the dlpreopened libraries before other libraries + for deplib in $save_deplibs; do + deplibs="$deplib $deplibs" + done + fi + if test "$pass" != dlopen; then + if test "$pass" != conv; then + # Make sure lib_search_path contains only unique directories. + lib_search_path= + for dir in $newlib_search_path; do + case "$lib_search_path " in + *" $dir "*) ;; + *) lib_search_path="$lib_search_path $dir" ;; + esac + done + newlib_search_path= + fi + + if test "$linkmode,$pass" != "prog,link"; then + vars="deplibs" + else + vars="compile_deplibs finalize_deplibs" + fi + for var in $vars dependency_libs; do + # Add libraries to $var in reverse order + eval tmp_libs=\"\$$var\" + new_libs= + for deplib in $tmp_libs; do + # FIXME: Pedantically, this is the right thing to do, so + # that some nasty dependency loop isn't accidentally + # broken: + #new_libs="$deplib $new_libs" + # Pragmatically, this seems to cause very few problems in + # practice: + case $deplib in + -L*) new_libs="$deplib $new_libs" ;; + -R*) ;; + *) + # And here is the reason: when a library appears more + # than once as an explicit dependence of a library, or + # is implicitly linked in more than once by the + # compiler, it is considered special, and multiple + # occurrences thereof are not removed. Compare this + # with having the same library being listed as a + # dependency of multiple other libraries: in this case, + # we know (pedantically, we assume) the library does not + # need to be listed more than once, so we keep only the + # last copy. This is not always right, but it is rare + # enough that we require users that really mean to play + # such unportable linking tricks to link the library + # using -Wl,-lname, so that libtool does not consider it + # for duplicate removal. + case " $specialdeplibs " in + *" $deplib "*) new_libs="$deplib $new_libs" ;; + *) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$deplib $new_libs" ;; + esac + ;; + esac + ;; + esac + done + tmp_libs= + for deplib in $new_libs; do + case $deplib in + -L*) + case " $tmp_libs " in + *" $deplib "*) ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + ;; + *) tmp_libs="$tmp_libs $deplib" ;; + esac + done + eval $var=\"$tmp_libs\" + done # for var + fi + # Last step: remove runtime libs from dependency_libs + # (they stay in deplibs) + tmp_libs= + for i in $dependency_libs ; do + case " $predeps $postdeps $compiler_lib_search_path " in + *" $i "*) + i="" + ;; + esac + if test -n "$i" ; then + tmp_libs="$tmp_libs $i" + fi + done + dependency_libs=$tmp_libs + done # for pass + if test "$linkmode" = prog; then + dlfiles="$newdlfiles" + dlprefiles="$newdlprefiles" + fi + + case $linkmode in + oldlib) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 + fi + + if test -n "$export_symbols" || test -n "$export_symbols_regex"; then + $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 + fi + + # Now set the variables for building old libraries. + build_libtool_libs=no + oldlibs="$output" + objs="$objs$old_deplibs" + ;; + + lib) + # Make sure we only generate libraries of the form `libNAME.la'. + case $outputname in + lib*) + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + ;; + *) + if test "$module" = no; then + $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + if test "$need_lib_prefix" != no; then + # Add the "lib" prefix for modules if required + name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + eval shared_ext=\"$shrext_cmds\" + eval libname=\"$libname_spec\" + else + libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` + fi + ;; + esac + + if test -n "$objs"; then + if test "$deplibs_check_method" != pass_all; then + $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 + exit $EXIT_FAILURE + else + $echo + $echo "*** Warning: Linking the shared library $output against the non-libtool" + $echo "*** objects $objs is not portable!" + libobjs="$libobjs $objs" + fi + fi + + if test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 + fi + + set dummy $rpath + if test "$#" -gt 2; then + $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 + fi + install_libdir="$2" + + oldlibs= + if test -z "$rpath"; then + if test "$build_libtool_libs" = yes; then + # Building a libtool convenience library. + # Some compilers have problems with a `.al' extension so + # convenience libraries should have the same extension an + # archive normally would. + oldlibs="$output_objdir/$libname.$libext $oldlibs" + build_libtool_libs=convenience + build_old_libs=yes + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 + fi + else + + # Parse the version information argument. + save_ifs="$IFS"; IFS=':' + set dummy $vinfo 0 0 0 + IFS="$save_ifs" + + if test -n "$8"; then + $echo "$modename: too many parameters to \`-version-info'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # convert absolute version numbers to libtool ages + # this retains compatibility with .la files and attempts + # to make the code below a bit more comprehensible + + case $vinfo_number in + yes) + number_major="$2" + number_minor="$3" + number_revision="$4" + # + # There are really only two kinds -- those that + # use the current revision as the major version + # and those that subtract age and use age as + # a minor version. But, then there is irix + # which has an extra 1 added just for fun + # + case $version_type in + darwin|linux|osf|windows) + current=`expr $number_major + $number_minor` + age="$number_minor" + revision="$number_revision" + ;; + freebsd-aout|freebsd-elf|sunos) + current="$number_major" + revision="$number_minor" + age="0" + ;; + irix|nonstopux) + current=`expr $number_major + $number_minor - 1` + age="$number_minor" + revision="$number_minor" + ;; + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + ;; + no) + current="$2" + revision="$3" + age="$4" + ;; + esac + + # Check that each of the things are valid numbers. + case $current in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $revision in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + case $age in + 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; + *) + $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test "$age" -gt "$current"; then + $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 + $echo "$modename: \`$vinfo' is not valid version information" 1>&2 + exit $EXIT_FAILURE + fi + + # Calculate the version variables. + major= + versuffix= + verstring= + case $version_type in + none) ;; + + darwin) + # Like Linux, but with the current version available in + # verstring for coding it into the library header + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + # Darwin ld doesn't like 0 for these options... + minor_current=`expr $current + 1` + verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" + ;; + + freebsd-aout) + major=".$current" + versuffix=".$current.$revision"; + ;; + + freebsd-elf) + major=".$current" + versuffix=".$current"; + ;; + + irix | nonstopux) + major=`expr $current - $age + 1` + + case $version_type in + nonstopux) verstring_prefix=nonstopux ;; + *) verstring_prefix=sgi ;; + esac + verstring="$verstring_prefix$major.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$revision + while test "$loop" -ne 0; do + iface=`expr $revision - $loop` + loop=`expr $loop - 1` + verstring="$verstring_prefix$major.$iface:$verstring" + done + + # Before this point, $major must not contain `.'. + major=.$major + versuffix="$major.$revision" + ;; + + linux) + major=.`expr $current - $age` + versuffix="$major.$age.$revision" + ;; + + osf) + major=.`expr $current - $age` + versuffix=".$current.$age.$revision" + verstring="$current.$age.$revision" + + # Add in all the interfaces that we are compatible with. + loop=$age + while test "$loop" -ne 0; do + iface=`expr $current - $loop` + loop=`expr $loop - 1` + verstring="$verstring:${iface}.0" + done + + # Make executables depend on our current version. + verstring="$verstring:${current}.0" + ;; + + sunos) + major=".$current" + versuffix=".$current.$revision" + ;; + + windows) + # Use '-' rather than '.', since we only want one + # extension on DOS 8.3 filesystems. + major=`expr $current - $age` + versuffix="-$major" + ;; + + *) + $echo "$modename: unknown library version type \`$version_type'" 1>&2 + $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Clear the version info if we defaulted, and they specified a release. + if test -z "$vinfo" && test -n "$release"; then + major= + case $version_type in + darwin) + # we can't check for "0.0" in archive_cmds due to quoting + # problems, so we reset it completely + verstring= + ;; + *) + verstring="0.0" + ;; + esac + if test "$need_version" = no; then + versuffix= + else + versuffix=".0.0" + fi + fi + + # Remove version info from name if versioning should be avoided + if test "$avoid_version" = yes && test "$need_version" = no; then + major= + versuffix= + verstring="" + fi + + # Check to see if the archive will have undefined symbols. + if test "$allow_undefined" = yes; then + if test "$allow_undefined_flag" = unsupported; then + $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 + build_libtool_libs=no + build_old_libs=yes + fi + else + # Don't allow undefined symbols. + allow_undefined_flag="$no_undefined_flag" + fi + fi + + if test "$mode" != relink; then + # Remove our outputs, but don't remove object files since they + # may have been created when compiling PIC objects. + removelist= + tempremovelist=`$echo "$output_objdir/*"` + for p in $tempremovelist; do + case $p in + *.$objext) + ;; + $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) + if test "X$precious_files_regex" != "X"; then + if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 + then + continue + fi + fi + removelist="$removelist $p" + ;; + *) ;; + esac + done + if test -n "$removelist"; then + $show "${rm}r $removelist" + $run ${rm}r $removelist + fi + fi + + # Now set the variables for building old libraries. + if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then + oldlibs="$oldlibs $output_objdir/$libname.$libext" + + # Transform .lo files to .o files. + oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + fi + + # Eliminate all temporary directories. + for path in $notinst_path; do + lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` + deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` + dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` + done + + if test -n "$xrpath"; then + # If the user specified any rpath flags, then add them. + temp_xrpath= + for libdir in $xrpath; do + temp_xrpath="$temp_xrpath -R$libdir" + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then + dependency_libs="$temp_xrpath $dependency_libs" + fi + fi + + # Make sure dlfiles contains only unique files that won't be dlpreopened + old_dlfiles="$dlfiles" + dlfiles= + for lib in $old_dlfiles; do + case " $dlprefiles $dlfiles " in + *" $lib "*) ;; + *) dlfiles="$dlfiles $lib" ;; + esac + done + + # Make sure dlprefiles contains only unique files + old_dlprefiles="$dlprefiles" + dlprefiles= + for lib in $old_dlprefiles; do + case "$dlprefiles " in + *" $lib "*) ;; + *) dlprefiles="$dlprefiles $lib" ;; + esac + done + + if test "$build_libtool_libs" = yes; then + if test -n "$rpath"; then + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) + # these systems don't actually have a c library (as such)! + ;; + *-*-rhapsody* | *-*-darwin1.[012]) + # Rhapsody C library is in the System framework + deplibs="$deplibs -framework System" + ;; + *-*-netbsd*) + # Don't link with libc until the a.out ld.so is fixed. + ;; + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) + # Do not include libc due to us having libc/libc_r. + ;; + *-*-sco3.2v5* | *-*-sco5v6*) + # Causes problems with __ctype + ;; + *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) + # Compiler inserts libc in the correct place for threads to work + ;; + *) + # Add libc to deplibs on all other systems if necessary. + if test "$build_libtool_need_lc" = "yes"; then + deplibs="$deplibs -lc" + fi + ;; + esac + fi + + # Transform deplibs into only deplibs that can be linked in shared. + name_save=$name + libname_save=$libname + release_save=$release + versuffix_save=$versuffix + major_save=$major + # I'm not sure if I'm treating the release correctly. I think + # release should show up in the -l (ie -lgmp5) so we don't want to + # add it in twice. Is that correct? + release="" + versuffix="" + major="" + newdeplibs= + droppeddeps=no + case $deplibs_check_method in + pass_all) + # Don't check for shared/static. Everything works. + # This might be a little naive. We might want to check + # whether the library exists or not. But this is on + # osf3 & osf4 and I'm not really sure... Just + # implementing what was already the behavior. + newdeplibs=$deplibs + ;; + test_compile) + # This code stresses the "libraries are programs" paradigm to its + # limits. Maybe even breaks it. We compile a program, linking it + # against the deplibs as a proxy for the library. Then we can check + # whether they linked in statically or dynamically with ldd. + $rm conftest.c + cat > conftest.c </dev/null` + for potent_lib in $potential_libs; do + # Follow soft links. + if ls -lLd "$potent_lib" 2>/dev/null \ + | grep " -> " >/dev/null; then + continue + fi + # The statement above tries to avoid entering an + # endless loop below, in case of cyclic links. + # We might still enter an endless loop, since a link + # loop can be closed while we follow links, + # but so what? + potlib="$potent_lib" + while test -h "$potlib" 2>/dev/null; do + potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` + case $potliblink in + [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; + *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + esac + done + if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$file_magic_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for file magic test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a file magic. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + match_pattern*) + set dummy $deplibs_check_method + match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` + for a_deplib in $deplibs; do + name=`expr $a_deplib : '-l\(.*\)'` + # If $name is empty we are operating on a -L argument. + if test -n "$name" && test "$name" != "0"; then + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + case " $predeps $postdeps " in + *" $a_deplib "*) + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + ;; + esac + fi + if test -n "$a_deplib" ; then + libname=`eval \\$echo \"$libname_spec\"` + for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do + potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + for potent_lib in $potential_libs; do + potlib="$potent_lib" # see symlink-check above in file_magic test + if eval $echo \"$potent_lib\" 2>/dev/null \ + | ${SED} 10q \ + | $EGREP "$match_pattern_regex" > /dev/null; then + newdeplibs="$newdeplibs $a_deplib" + a_deplib="" + break 2 + fi + done + done + fi + if test -n "$a_deplib" ; then + droppeddeps=yes + $echo + $echo "*** Warning: linker path does not have real file for library $a_deplib." + $echo "*** I have the capability to make that library automatically link in when" + $echo "*** you link to this library. But I can only do this if you have a" + $echo "*** shared version of the library, which you do not appear to have" + $echo "*** because I did check the linker path looking for a file starting" + if test -z "$potlib" ; then + $echo "*** with $libname but no candidates were found. (...for regex pattern test)" + else + $echo "*** with $libname and none of the candidates passed a file format test" + $echo "*** using a regex pattern. Last file checked: $potlib" + fi + fi + else + # Add a -L argument. + newdeplibs="$newdeplibs $a_deplib" + fi + done # Gone through all deplibs. + ;; + none | unknown | *) + newdeplibs="" + tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ + -e 's/ -[LR][^ ]*//g'` + if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then + for i in $predeps $postdeps ; do + # can't use Xsed below, because $i might contain '/' + tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` + done + fi + if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ + | grep . >/dev/null; then + $echo + if test "X$deplibs_check_method" = "Xnone"; then + $echo "*** Warning: inter-library dependencies are not supported in this platform." + else + $echo "*** Warning: inter-library dependencies are not known to be supported." + fi + $echo "*** All declared inter-library dependencies are being dropped." + droppeddeps=yes + fi + ;; + esac + versuffix=$versuffix_save + major=$major_save + release=$release_save + libname=$libname_save + name=$name_save + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + if test "$droppeddeps" = yes; then + if test "$module" = yes; then + $echo + $echo "*** Warning: libtool could not satisfy all declared inter-library" + $echo "*** dependencies of module $libname. Therefore, libtool will create" + $echo "*** a static module, that should work as long as the dlopening" + $echo "*** application is linked with the -dlopen flag." + if test -z "$global_symbol_pipe"; then + $echo + $echo "*** However, this would only work if libtool was able to extract symbol" + $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + $echo "*** not find such a program. So, this module is probably useless." + $echo "*** \`nm' from GNU binutils and a full rebuild may help." + fi + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + else + $echo "*** The inter-library dependencies that have been dropped here will be" + $echo "*** automatically added whenever a program is linked with this library" + $echo "*** or is declared to -dlopen it." + + if test "$allow_undefined" = no; then + $echo + $echo "*** Since this library must not contain undefined symbols," + $echo "*** because either the platform does not support them or" + $echo "*** it was explicitly requested with -no-undefined," + $echo "*** libtool will only create a static version of it." + if test "$build_old_libs" = no; then + oldlibs="$output_objdir/$libname.$libext" + build_libtool_libs=module + build_old_libs=yes + else + build_libtool_libs=no + fi + fi + fi + fi + # Done checking deplibs! + deplibs=$newdeplibs + fi + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + + # All the library-specific variables (install_libdir is set above). + library_names= + old_library= + dlname= + + # Test again, we may have decided not to build it any more + if test "$build_libtool_libs" = yes; then + if test "$hardcode_into_libs" = yes; then + # Hardcode the library paths + hardcode_libdirs= + dep_rpath= + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + dep_rpath="$dep_rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + if test -n "$hardcode_libdir_flag_spec_ld"; then + eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" + else + eval dep_rpath=\"$hardcode_libdir_flag_spec\" + fi + fi + if test -n "$runpath_var" && test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" + fi + test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" + fi + + shlibpath="$finalize_shlibpath" + test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + if test -n "$shlibpath"; then + eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" + fi + + # Get the real and link names of the library. + eval shared_ext=\"$shrext_cmds\" + eval library_names=\"$library_names_spec\" + set dummy $library_names + realname="$2" + shift; shift + + if test -n "$soname_spec"; then + eval soname=\"$soname_spec\" + else + soname="$realname" + fi + if test -z "$dlname"; then + dlname=$soname + fi + + lib="$output_objdir/$realname" + linknames= + for link + do + linknames="$linknames $link" + done + + # Use standard objects if they are pic + test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + cmds=$export_symbols_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + if len=`expr "X$cmd" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + $show "$cmd" + $run eval "$cmd" || exit $? + skipped_export=false + else + # The command line is too long to execute in one step. + $show "using reloadable object file for export list..." + skipped_export=: + # Break out early, otherwise skipped_export may be + # set to false by a later but shorter cmd. + break + fi + done + IFS="$save_ifs" + if test -n "$export_symbols_regex"; then + $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" + $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' + $show "$mv \"${export_symbols}T\" \"$export_symbols\"" + $run eval '$mv "${export_symbols}T" "$export_symbols"' + fi + fi + fi + + if test -n "$export_symbols" && test -n "$include_expsyms"; then + $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' + fi + + tmp_deplibs= + for test_deplib in $deplibs; do + case " $convenience " in + *" $test_deplib "*) ;; + *) + tmp_deplibs="$tmp_deplibs $test_deplib" + ;; + esac + done + deplibs="$tmp_deplibs" + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + libobjs="$libobjs $func_extract_archives_result" + fi + fi + + if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then + eval flag=\"$thread_safe_flag_spec\" + linker_flags="$linker_flags $flag" + fi + + # Make a backup of the uninstalled library when relinking + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? + fi + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds + else + eval test_cmds=\"$module_cmds\" + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + eval test_cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds + else + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi + fi + + if test "X$skipped_export" != "X:" && + len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + : + else + # The command line is too long to link in one step, link piecewise. + $echo "creating reloadable object files..." + + # Save the value of $output and $libobjs because we want to + # use them later. If we have whole_archive_flag_spec, we + # want to use save_libobjs as it was before + # whole_archive_flag_spec was expanded, because we can't + # assume the linker understands whole_archive_flag_spec. + # This may have to be revisited, in case too many + # convenience libraries get linked in and end up exceeding + # the spec. + if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then + save_libobjs=$libobjs + fi + save_output=$output + output_la=`$echo "X$output" | $Xsed -e "$basename"` + + # Clear the reloadable object creation command queue and + # initialize k to one. + test_cmds= + concat_cmds= + objlist= + delfiles= + last_robj= + k=1 + output=$output_objdir/$output_la-${k}.$objext + # Loop over the list of objects to be linked. + for obj in $save_libobjs + do + eval test_cmds=\"$reload_cmds $objlist $last_robj\" + if test "X$objlist" = X || + { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; }; then + objlist="$objlist $obj" + else + # The command $test_cmds is almost too long, add a + # command to the queue. + if test "$k" -eq 1 ; then + # The first file doesn't have a previous command to add. + eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + else + # All subsequent reloadable object files will link in + # the last one created. + eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" + fi + last_robj=$output_objdir/$output_la-${k}.$objext + k=`expr $k + 1` + output=$output_objdir/$output_la-${k}.$objext + objlist=$obj + len=1 + fi + done + # Handle the remaining objects by creating one last + # reloadable object file. All subsequent reloadable object + # files will link in the last one created. + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + + if ${skipped_export-false}; then + $show "generating symbol list for \`$libname.la'" + export_symbols="$output_objdir/$libname.exp" + $run $rm $export_symbols + libobjs=$output + # Append the command to create the export file. + eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" + fi + + # Set up a command to remove the reloadable object files + # after they are used. + i=0 + while test "$i" -lt "$k" + do + i=`expr $i + 1` + delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" + done + + $echo "creating a temporary reloadable object file: $output" + + # Loop through the commands generated above and execute them. + save_ifs="$IFS"; IFS='~' + for cmd in $concat_cmds; do + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + libobjs=$output + # Restore the value of output. + output=$save_output + + if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then + eval libobjs=\"\$libobjs $whole_archive_flag_spec\" + fi + # Expand the library linking commands again to reset the + # value of $libobjs for piecewise linking. + + # Do each of the archive commands. + if test "$module" = yes && test -n "$module_cmds" ; then + if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then + cmds=$module_expsym_cmds + else + cmds=$module_cmds + fi + else + if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then + cmds=$archive_expsym_cmds + else + cmds=$archive_cmds + fi + fi + + # Append the command to remove the reloadable object files + # to the just-reset $cmds. + eval cmds=\"\$cmds~\$rm $delfiles\" + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? + + if test -n "$convenience"; then + if test -z "$whole_archive_flag_spec"; then + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + fi + fi + + exit $EXIT_SUCCESS + fi + + # Create links to the real library. + for linkname in $linknames; do + if test "$realname" != "$linkname"; then + $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" + $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? + fi + done + + # If -module or -export-dynamic was specified, set the dlname. + if test "$module" = yes || test "$export_dynamic" = yes; then + # On all known operating systems, these are identical. + dlname="$soname" + fi + fi + ;; + + obj) + if test -n "$deplibs"; then + $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 + fi + + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 + fi + + if test -n "$rpath"; then + $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 + fi + + if test -n "$xrpath"; then + $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 + fi + + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 + fi + + case $output in + *.lo) + if test -n "$objs$old_deplibs"; then + $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 + exit $EXIT_FAILURE + fi + libobj="$output" + obj=`$echo "X$output" | $Xsed -e "$lo2o"` + ;; + *) + libobj= + obj="$output" + ;; + esac + + # Delete the old objects. + $run $rm $obj $libobj + + # Objects from convenience libraries. This assumes + # single-version convenience libraries. Whenever we create + # different ones for PIC/non-PIC, this we'll have to duplicate + # the extraction. + reload_conv_objs= + gentop= + # reload_cmds runs $LD directly, so let us get rid of + # -Wl from whole_archive_flag_spec + wl= + + if test -n "$convenience"; then + if test -n "$whole_archive_flag_spec"; then + eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" + else + gentop="$output_objdir/${obj}x" + generated="$generated $gentop" + + func_extract_archives $gentop $convenience + reload_conv_objs="$reload_objs $func_extract_archives_result" + fi + fi + + # Create the old-style object. + reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + + output="$obj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + + # Exit if we aren't doing a library object file. + if test -z "$libobj"; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + fi + + if test "$build_libtool_libs" != yes; then + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + # Create an invalid libtool object if no PIC, so that we don't + # accidentally link it into a program. + # $show "echo timestamp > $libobj" + # $run eval "echo timestamp > $libobj" || exit $? + exit $EXIT_SUCCESS + fi + + if test -n "$pic_flag" || test "$pic_mode" != default; then + # Only do commands if we really have different PIC objects. + reload_objs="$libobjs $reload_conv_objs" + output="$libobj" + cmds=$reload_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + fi + + if test -n "$gentop"; then + $show "${rm}r $gentop" + $run ${rm}r $gentop + fi + + exit $EXIT_SUCCESS + ;; + + prog) + case $host in + *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; + esac + if test -n "$vinfo"; then + $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 + fi + + if test -n "$release"; then + $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 + fi + + if test "$preload" = yes; then + if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && + test "$dlopen_self_static" = unknown; then + $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." + fi + fi + + case $host in + *-*-rhapsody* | *-*-darwin1.[012]) + # On Rhapsody replace the C library is the System framework + compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` + ;; + esac + + case $host in + *darwin*) + # Don't allow lazy linking, it breaks C++ global constructors + if test "$tagname" = CXX ; then + compile_command="$compile_command ${wl}-bind_at_load" + finalize_command="$finalize_command ${wl}-bind_at_load" + fi + ;; + esac + + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + + compile_command="$compile_command $compile_deplibs" + finalize_command="$finalize_command $finalize_deplibs" + + if test -n "$rpath$xrpath"; then + # If the user specified any rpath flags, then add them. + for libdir in $rpath $xrpath; do + # This is the magic to use -rpath. + case "$finalize_rpath " in + *" $libdir "*) ;; + *) finalize_rpath="$finalize_rpath $libdir" ;; + esac + done + fi + + # Now hardcode the library paths + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$perm_rpath " in + *" $libdir "*) ;; + *) perm_rpath="$perm_rpath $libdir" ;; + esac + fi + case $host in + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) + testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` + case :$dllsearchpath: in + *":$libdir:"*) ;; + *) dllsearchpath="$dllsearchpath:$libdir";; + esac + case :$dllsearchpath: in + *":$testbindir:"*) ;; + *) dllsearchpath="$dllsearchpath:$testbindir";; + esac + ;; + esac + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + compile_rpath="$rpath" + + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else + # Just accumulate the unique libdirs. + case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in + *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) + ;; + *) + hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + ;; + esac + fi + else + eval flag=\"$hardcode_libdir_flag_spec\" + rpath="$rpath $flag" + fi + elif test -n "$runpath_var"; then + case "$finalize_perm_rpath " in + *" $libdir "*) ;; + *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + esac + fi + done + # Substitute the hardcoded libdirs into the rpath. + if test -n "$hardcode_libdir_separator" && + test -n "$hardcode_libdirs"; then + libdir="$hardcode_libdirs" + eval rpath=\" $hardcode_libdir_flag_spec\" + fi + finalize_rpath="$rpath" + + if test -n "$libobjs" && test "$build_old_libs" = yes; then + # Transform all the library objects into standard objects. + compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + fi + + dlsyms= + if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then + if test -n "$NM" && test -n "$global_symbol_pipe"; then + dlsyms="${outputname}S.c" + else + $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 + fi + fi + + if test -n "$dlsyms"; then + case $dlsyms in + "") ;; + *.c) + # Discover the nlist of each of the dlfiles. + nlist="$output_objdir/${outputname}.nm" + + $show "$rm $nlist ${nlist}S ${nlist}T" + $run $rm "$nlist" "${nlist}S" "${nlist}T" + + # Parse the name list into a source file. + $show "creating $output_objdir/$dlsyms" + + test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ + +#ifdef __cplusplus +extern \"C\" { +#endif + +/* Prevent the only kind of declaration conflicts we can make. */ +#define lt_preloaded_symbols some_other_symbol + +/* External symbol declarations for the compiler. */\ +" + + if test "$dlself" = yes; then + $show "generating symbol list for \`$output'" + + test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" + + # Add our own program objects to the symbol list. + progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + for arg in $progfiles; do + $show "extracting global C symbols from \`$arg'" + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -n "$exclude_expsyms"; then + $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + if test -n "$export_symbols_regex"; then + $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' + $run eval '$mv "$nlist"T "$nlist"' + fi + + # Prepare the list of exported symbols + if test -z "$export_symbols"; then + export_symbols="$output_objdir/$outputname.exp" + $run $rm $export_symbols + $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' + ;; + esac + else + $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' + $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' + $run eval 'mv "$nlist"T "$nlist"' + case $host in + *cygwin* | *mingw* ) + $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' + $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' + ;; + esac + fi + fi + + for arg in $dlprefiles; do + $show "extracting global C symbols from \`$arg'" + name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` + $run eval '$echo ": $name " >> "$nlist"' + $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" + done + + if test -z "$run"; then + # Make sure we have at least an empty file. + test -f "$nlist" || : > "$nlist" + + if test -n "$exclude_expsyms"; then + $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T + $mv "$nlist"T "$nlist" + fi + + # Try sorting and uniquifying the output. + if grep -v "^: " < "$nlist" | + if sort -k 3 /dev/null 2>&1; then + sort -k 3 + else + sort +2 + fi | + uniq > "$nlist"S; then + : + else + grep -v "^: " < "$nlist" > "$nlist"S + fi + + if test -f "$nlist"S; then + eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' + else + $echo '/* NONE */' >> "$output_objdir/$dlsyms" + fi + + $echo >> "$output_objdir/$dlsyms" "\ + +#undef lt_preloaded_symbols + +#if defined (__STDC__) && __STDC__ +# define lt_ptr void * +#else +# define lt_ptr char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +" + + case $host in + *cygwin* | *mingw* ) + $echo >> "$output_objdir/$dlsyms" "\ +/* DATA imports from DLLs on WIN32 can't be const, because + runtime relocations are performed -- see ld's documentation + on pseudo-relocs */ +struct { +" + ;; + * ) + $echo >> "$output_objdir/$dlsyms" "\ +const struct { +" + ;; + esac + + + $echo >> "$output_objdir/$dlsyms" "\ + const char *name; + lt_ptr address; +} +lt_preloaded_symbols[] = +{\ +" + + eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" + + $echo >> "$output_objdir/$dlsyms" "\ + {0, (lt_ptr) 0} +}; + +/* This works around a problem in FreeBSD linker */ +#ifdef FREEBSD_WORKAROUND +static const void *lt_preloaded_setup() { + return lt_preloaded_symbols; +} +#endif + +#ifdef __cplusplus +} +#endif\ +" + fi + + pic_flag_for_symtable= + case $host in + # compiling the symbol table file with pic_flag works around + # a FreeBSD bug that causes programs to crash when -lm is + # linked before any other PIC object. But we must not use + # pic_flag when linking with -static. The problem exists in + # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. + *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; + esac;; + *-*-hpux*) + case "$compile_command " in + *" -static "*) ;; + *) pic_flag_for_symtable=" $pic_flag";; + esac + esac + + # Now compile the dynamic symbol file. + $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" + $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? + + # Clean up the generated files. + $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" + $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" + + # Transform the symbol file into the correct name. + case $host in + *cygwin* | *mingw* ) + if test -f "$output_objdir/${outputname}.def" ; then + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` + else + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + fi + ;; + * ) + compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` + ;; + esac + ;; + *) + $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 + exit $EXIT_FAILURE + ;; + esac + else + # We keep going just in case the user didn't refer to + # lt_preloaded_symbols. The linker will fail if global_symbol_pipe + # really was required. + + # Nullify the symbol file. + compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` + finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + fi + + if test "$need_relink" = no || test "$build_libtool_libs" != yes; then + # Replace the output file specification. + compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command="$compile_command$compile_rpath" + + # We have no uninstalled library dependencies, so finalize right now. + $show "$link_command" + $run eval "$link_command" + exit_status=$? + + # Delete the generated files. + if test -n "$dlsyms"; then + $show "$rm $output_objdir/${outputname}S.${objext}" + $run $rm "$output_objdir/${outputname}S.${objext}" + fi + + exit $exit_status + fi + + if test -n "$shlibpath_var"; then + # We should set the shlibpath_var + rpath= + for dir in $temp_rpath; do + case $dir in + [\\/]* | [A-Za-z]:[\\/]*) + # Absolute path. + rpath="$rpath$dir:" + ;; + *) + # Relative path: add a thisdir entry. + rpath="$rpath\$thisdir/$dir:" + ;; + esac + done + temp_rpath="$rpath" + fi + + if test -n "$compile_shlibpath$finalize_shlibpath"; then + compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" + fi + if test -n "$finalize_shlibpath"; then + finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" + fi + + compile_var= + finalize_var= + if test -n "$runpath_var"; then + if test -n "$perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $perm_rpath; do + rpath="$rpath$dir:" + done + compile_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + if test -n "$finalize_perm_rpath"; then + # We should set the runpath_var. + rpath= + for dir in $finalize_perm_rpath; do + rpath="$rpath$dir:" + done + finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " + fi + fi + + if test "$no_install" = yes; then + # We don't need to create a wrapper script. + link_command="$compile_var$compile_command$compile_rpath" + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + # Delete the old output file. + $run $rm $output + # Link the executable and exit + $show "$link_command" + $run eval "$link_command" || exit $? + exit $EXIT_SUCCESS + fi + + if test "$hardcode_action" = relink; then + # Fast installation is not supported + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + + $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 + $echo "$modename: \`$output' will be relinked during installation" 1>&2 + else + if test "$fast_install" != no; then + link_command="$finalize_var$compile_command$finalize_rpath" + if test "$fast_install" = yes; then + relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + else + # fast_install is set to needless + relink_command= + fi + else + link_command="$compile_var$compile_command$compile_rpath" + relink_command="$finalize_var$finalize_command$finalize_rpath" + fi + fi + + # Replace the output file specification. + link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + + # Delete the old output files. + $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname + + $show "$link_command" + $run eval "$link_command" || exit $? + + # Now create the wrapper script. + $show "creating $output" + + # Quote the relink command for shipping. + if test -n "$relink_command"; then + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + fi + + # Quote $echo for shipping. + if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then + case $progpath in + [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; + *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; + esac + qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` + else + qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` + fi + + # Only actually do things if our run command is non-null. + if test -z "$run"; then + # win32 will think the script is a binary if it has + # a .exe suffix, so we strip it off here. + case $output in + *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; + esac + # test for cygwin because mv fails w/o .exe extensions + case $host in + *cygwin*) + exeext=.exe + outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; + *) exeext= ;; + esac + case $host in + *cygwin* | *mingw* ) + output_name=`basename $output` + output_path=`dirname $output` + cwrappersource="$output_path/$objdir/lt-$output_name.c" + cwrapper="$output_path/$output_name.exe" + $rm $cwrappersource $cwrapper + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 + + cat > $cwrappersource <> $cwrappersource<<"EOF" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(PATH_MAX) +# define LT_PATHMAX PATH_MAX +#elif defined(MAXPATHLEN) +# define LT_PATHMAX MAXPATHLEN +#else +# define LT_PATHMAX 1024 +#endif + +#ifndef DIR_SEPARATOR +# define DIR_SEPARATOR '/' +# define PATH_SEPARATOR ':' +#endif + +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ + defined (__OS2__) +# define HAVE_DOS_BASED_FILE_SYSTEM +# ifndef DIR_SEPARATOR_2 +# define DIR_SEPARATOR_2 '\\' +# endif +# ifndef PATH_SEPARATOR_2 +# define PATH_SEPARATOR_2 ';' +# endif +#endif + +#ifndef DIR_SEPARATOR_2 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) +#else /* DIR_SEPARATOR_2 */ +# define IS_DIR_SEPARATOR(ch) \ + (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) +#endif /* DIR_SEPARATOR_2 */ + +#ifndef PATH_SEPARATOR_2 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) +#else /* PATH_SEPARATOR_2 */ +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) +#endif /* PATH_SEPARATOR_2 */ + +#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) +#define XFREE(stale) do { \ + if (stale) { free ((void *) stale); stale = 0; } \ +} while (0) + +/* -DDEBUG is fairly common in CFLAGS. */ +#undef DEBUG +#if defined DEBUGWRAPPER +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) +#else +# define DEBUG(format, ...) +#endif + +const char *program_name = NULL; + +void * xmalloc (size_t num); +char * xstrdup (const char *string); +const char * base_name (const char *name); +char * find_executable(const char *wrapper); +int check_executable(const char *path); +char * strendzap(char *str, const char *pat); +void lt_fatal (const char *message, ...); + +int +main (int argc, char *argv[]) +{ + char **newargz; + int i; + + program_name = (char *) xstrdup (base_name (argv[0])); + DEBUG("(main) argv[0] : %s\n",argv[0]); + DEBUG("(main) program_name : %s\n",program_name); + newargz = XMALLOC(char *, argc+2); +EOF + + cat >> $cwrappersource <> $cwrappersource <<"EOF" + newargz[1] = find_executable(argv[0]); + if (newargz[1] == NULL) + lt_fatal("Couldn't find %s", argv[0]); + DEBUG("(main) found exe at : %s\n",newargz[1]); + /* we know the script has the same name, without the .exe */ + /* so make sure newargz[1] doesn't end in .exe */ + strendzap(newargz[1],".exe"); + for (i = 1; i < argc; i++) + newargz[i+1] = xstrdup(argv[i]); + newargz[argc+1] = NULL; + + for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" + return 127; +} + +void * +xmalloc (size_t num) +{ + void * p = (void *) malloc (num); + if (!p) + lt_fatal ("Memory exhausted"); + + return p; +} + +char * +xstrdup (const char *string) +{ + return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL +; +} + +const char * +base_name (const char *name) +{ + const char *base; + +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + /* Skip over the disk name in MSDOS pathnames. */ + if (isalpha ((unsigned char)name[0]) && name[1] == ':') + name += 2; +#endif + + for (base = name; *name; name++) + if (IS_DIR_SEPARATOR (*name)) + base = name + 1; + return base; +} + +int +check_executable(const char * path) +{ + struct stat st; + + DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); + if ((!path) || (!*path)) + return 0; + + if ((stat (path, &st) >= 0) && + ( + /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ +#if defined (S_IXOTH) + ((st.st_mode & S_IXOTH) == S_IXOTH) || +#endif +#if defined (S_IXGRP) + ((st.st_mode & S_IXGRP) == S_IXGRP) || +#endif + ((st.st_mode & S_IXUSR) == S_IXUSR)) + ) + return 1; + else + return 0; +} + +/* Searches for the full path of the wrapper. Returns + newly allocated full path name if found, NULL otherwise */ +char * +find_executable (const char* wrapper) +{ + int has_slash = 0; + const char* p; + const char* p_next; + /* static buffer for getcwd */ + char tmp[LT_PATHMAX + 1]; + int tmp_len; + char* concat_name; + + DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); + + if ((wrapper == NULL) || (*wrapper == '\0')) + return NULL; + + /* Absolute path? */ +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + else + { +#endif + if (IS_DIR_SEPARATOR (wrapper[0])) + { + concat_name = xstrdup (wrapper); + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } +#if defined (HAVE_DOS_BASED_FILE_SYSTEM) + } +#endif + + for (p = wrapper; *p; p++) + if (*p == '/') + { + has_slash = 1; + break; + } + if (!has_slash) + { + /* no slashes; search PATH */ + const char* path = getenv ("PATH"); + if (path != NULL) + { + for (p = path; *p; p = p_next) + { + const char* q; + size_t p_len; + for (q = p; *q; q++) + if (IS_PATH_SEPARATOR(*q)) + break; + p_len = q - p; + p_next = (*q == '\0' ? q : q + 1); + if (p_len == 0) + { + /* empty path: current directory */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + } + else + { + concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, p, p_len); + concat_name[p_len] = '/'; + strcpy (concat_name + p_len + 1, wrapper); + } + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + } + } + /* not found in PATH; assume curdir */ + } + /* Relative path | not found in path: prepend cwd */ + if (getcwd (tmp, LT_PATHMAX) == NULL) + lt_fatal ("getcwd failed"); + tmp_len = strlen(tmp); + concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); + memcpy (concat_name, tmp, tmp_len); + concat_name[tmp_len] = '/'; + strcpy (concat_name + tmp_len + 1, wrapper); + + if (check_executable(concat_name)) + return concat_name; + XFREE(concat_name); + return NULL; +} + +char * +strendzap(char *str, const char *pat) +{ + size_t len, patlen; + + assert(str != NULL); + assert(pat != NULL); + + len = strlen(str); + patlen = strlen(pat); + + if (patlen <= len) + { + str += len - patlen; + if (strcmp(str, pat) == 0) + *str = '\0'; + } + return str; +} + +static void +lt_error_core (int exit_status, const char * mode, + const char * message, va_list ap) +{ + fprintf (stderr, "%s: %s: ", program_name, mode); + vfprintf (stderr, message, ap); + fprintf (stderr, ".\n"); + + if (exit_status >= 0) + exit (exit_status); +} + +void +lt_fatal (const char *message, ...) +{ + va_list ap; + va_start (ap, message); + lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + va_end (ap); +} +EOF + # we should really use a build-platform specific compiler + # here, but OTOH, the wrappers (shell script and this C one) + # are only useful if you want to execute the "real" binary. + # Since the "real" binary is built for $host, then this + # wrapper might as well be built for $host, too. + $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource + ;; + esac + $rm $output + trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 + + $echo > $output "\ +#! $SHELL + +# $output - temporary wrapper script for $objdir/$outputname +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# The $output program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='${SED} -e 1s/^X//' +sed_quote_subst='$sed_quote_subst' + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command=\"$relink_command\" + +# This environment variable determines our operation mode. +if test \"\$libtool_install_magic\" = \"$magic\"; then + # install mode needs the following variable: + notinst_deplibs='$notinst_deplibs' +else + # When we are sourced in execute mode, \$file and \$echo are already set. + if test \"\$libtool_execute_magic\" != \"$magic\"; then + echo=\"$qecho\" + file=\"\$0\" + # Make sure echo works. + if test \"X\$1\" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift + elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then + # Yippee, \$echo works! + : + else + # Restart under the correct shell, and then maybe \$echo will work. + exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} + fi + fi\ +" + $echo >> $output "\ + + # Find the directory that this script lives in. + thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + test \"x\$thisdir\" = \"x\$file\" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + while test -n \"\$file\"; do + destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + + # If there was a directory component, then change thisdir. + if test \"x\$destdir\" != \"x\$file\"; then + case \"\$destdir\" in + [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; + *) thisdir=\"\$thisdir/\$destdir\" ;; + esac + fi + + file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + done + + # Try to get the absolute directory name. + absdir=\`cd \"\$thisdir\" && pwd\` + test -n \"\$absdir\" && thisdir=\"\$absdir\" +" + + if test "$fast_install" = yes; then + $echo >> $output "\ + program=lt-'$outputname'$exeext + progdir=\"\$thisdir/$objdir\" + + if test ! -f \"\$progdir/\$program\" || \\ + { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ + test \"X\$file\" != \"X\$progdir/\$program\"; }; then + + file=\"\$\$-\$program\" + + if test ! -d \"\$progdir\"; then + $mkdir \"\$progdir\" + else + $rm \"\$progdir/\$file\" + fi" + + $echo >> $output "\ + + # relink executable if necessary + if test -n \"\$relink_command\"; then + if relink_command_output=\`eval \$relink_command 2>&1\`; then : + else + $echo \"\$relink_command_output\" >&2 + $rm \"\$progdir/\$file\" + exit $EXIT_FAILURE + fi + fi + + $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || + { $rm \"\$progdir/\$program\"; + $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } + $rm \"\$progdir/\$file\" + fi" + else + $echo >> $output "\ + program='$outputname' + progdir=\"\$thisdir/$objdir\" +" + fi + + $echo >> $output "\ + + if test -f \"\$progdir/\$program\"; then" + + # Export our shlibpath_var if we have one. + if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then + $echo >> $output "\ + # Add our own library path to $shlibpath_var + $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" + + # Some systems cannot cope with colon-terminated $shlibpath_var + # The second colon is a workaround for a bug in BeOS R4 sed + $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + + export $shlibpath_var +" + fi + + # fixup the dll searchpath if we need to. + if test -n "$dllsearchpath"; then + $echo >> $output "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + + $echo >> $output "\ + if test \"\$libtool_execute_magic\" != \"$magic\"; then + # Run the actual program with our arguments. +" + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2*) + $echo >> $output "\ + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $echo >> $output "\ + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $echo >> $output "\ + \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" + exit $EXIT_FAILURE + fi + else + # The program doesn't exist. + \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 + \$echo \"This script is just a wrapper for \$program.\" 1>&2 + $echo \"See the $PACKAGE documentation for more information.\" 1>&2 + exit $EXIT_FAILURE + fi +fi\ +" + chmod +x $output + fi + exit $EXIT_SUCCESS + ;; + esac + + # See if we need to build an old-fashioned archive. + for oldlib in $oldlibs; do + + if test "$build_libtool_libs" = convenience; then + oldobjs="$libobjs_save" + addlibs="$convenience" + build_libtool_libs=no + else + if test "$build_libtool_libs" = module; then + oldobjs="$libobjs_save" + build_libtool_libs=no + else + oldobjs="$old_deplibs $non_pic_objects" + fi + addlibs="$old_convenience" + fi + + if test -n "$addlibs"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + func_extract_archives $gentop $addlibs + oldobjs="$oldobjs $func_extract_archives_result" + fi + + # Do each command in the archive commands. + if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then + cmds=$old_archive_from_new_cmds + else + # POSIX demands no paths to be encoded in archives. We have + # to avoid creating archives with duplicate basenames if we + # might have to extract them afterwards, e.g., when creating a + # static archive out of a convenience library, or when linking + # the entirety of a libtool archive into another (currently + # not supported by libtool). + if (for obj in $oldobjs + do + $echo "X$obj" | $Xsed -e 's%^.*/%%' + done | sort | sort -uc >/dev/null 2>&1); then + : + else + $echo "copying selected object files to avoid basename conflicts..." + + if test -z "$gentop"; then + gentop="$output_objdir/${outputname}x" + generated="$generated $gentop" + + $show "${rm}r $gentop" + $run ${rm}r "$gentop" + $show "$mkdir $gentop" + $run $mkdir "$gentop" + exit_status=$? + if test "$exit_status" -ne 0 && test ! -d "$gentop"; then + exit $exit_status + fi + fi + + save_oldobjs=$oldobjs + oldobjs= + counter=1 + for obj in $save_oldobjs + do + objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` + case " $oldobjs " in + " ") oldobjs=$obj ;; + *[\ /]"$objbase "*) + while :; do + # Make sure we don't pick an alternate name that also + # overlaps. + newobj=lt$counter-$objbase + counter=`expr $counter + 1` + case " $oldobjs " in + *[\ /]"$newobj "*) ;; + *) if test ! -f "$gentop/$newobj"; then break; fi ;; + esac + done + $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" + $run ln "$obj" "$gentop/$newobj" || + $run cp "$obj" "$gentop/$newobj" + oldobjs="$oldobjs $gentop/$newobj" + ;; + *) oldobjs="$oldobjs $obj" ;; + esac + done + fi + + eval cmds=\"$old_archive_cmds\" + + if len=`expr "X$cmds" : ".*"` && + test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then + cmds=$old_archive_cmds + else + # the command line is too long to link in one step, link in parts + $echo "using piecewise archive linking..." + save_RANLIB=$RANLIB + RANLIB=: + objlist= + concat_cmds= + save_oldobjs=$oldobjs + + # Is there a better way of finding the last object in the list? + for obj in $save_oldobjs + do + last_oldobj=$obj + done + for obj in $save_oldobjs + do + oldobjs="$objlist $obj" + objlist="$objlist $obj" + eval test_cmds=\"$old_archive_cmds\" + if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && + test "$len" -le "$max_cmd_len"; then + : + else + # the above command should be used before it gets too long + oldobjs=$objlist + if test "$obj" = "$last_oldobj" ; then + RANLIB=$save_RANLIB + fi + test -z "$concat_cmds" || concat_cmds=$concat_cmds~ + eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" + objlist= + fi + done + RANLIB=$save_RANLIB + oldobjs=$objlist + if test "X$oldobjs" = "X" ; then + eval cmds=\"\$concat_cmds\" + else + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" + fi + fi + fi + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + eval cmd=\"$cmd\" + IFS="$save_ifs" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$generated"; then + $show "${rm}r$generated" + $run ${rm}r$generated + fi + + # Now create the libtool archive. + case $output in + *.la) + old_library= + test "$build_old_libs" = yes && old_library="$libname.$libext" + $show "creating $output" + + # Preserve any variables that may affect compiler behavior + for var in $variables_saved_for_relink; do + if eval test -z \"\${$var+set}\"; then + relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" + elif eval var_value=\$$var; test -z "$var_value"; then + relink_command="$var=; export $var; $relink_command" + else + var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` + relink_command="$var=\"$var_value\"; export $var; $relink_command" + fi + done + # Quote the link command for shipping. + relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` + if test "$hardcode_automatic" = yes ; then + relink_command= + fi + + + # Only create the output if not a dry run. + if test -z "$run"; then + for installed in no yes; do + if test "$installed" = yes; then + if test -z "$install_libdir"; then + break + fi + output="$output_objdir/$outputname"i + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + if test -z "$libdir"; then + $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdependency_libs="$newdependency_libs $libdir/$name" + ;; + *) newdependency_libs="$newdependency_libs $deplib" ;; + esac + done + dependency_libs="$newdependency_libs" + newdlfiles= + for lib in $dlfiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlfiles="$newdlfiles $libdir/$name" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` + if test -z "$libdir"; then + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + exit $EXIT_FAILURE + fi + newdlprefiles="$newdlprefiles $libdir/$name" + done + dlprefiles="$newdlprefiles" + else + newdlfiles= + for lib in $dlfiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlfiles="$newdlfiles $abs" + done + dlfiles="$newdlfiles" + newdlprefiles= + for lib in $dlprefiles; do + case $lib in + [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; + *) abs=`pwd`"/$lib" ;; + esac + newdlprefiles="$newdlprefiles $abs" + done + dlprefiles="$newdlprefiles" + fi + $rm $output + # place dlname in correct position for cygwin + tdlname=$dlname + case $host,$output,$installed,$module,$dlname in + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + esac + $echo > $output "\ +# $outputname - a libtool library file +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP +# +# Please DO NOT delete this file! +# It is necessary for linking the library. + +# The name that we can dlopen(3). +dlname='$tdlname' + +# Names of this library. +library_names='$library_names' + +# The name of the static archive. +old_library='$old_library' + +# Libraries that this one depends upon. +dependency_libs='$dependency_libs' + +# Version information for $libname. +current=$current +age=$age +revision=$revision + +# Is this an already installed library? +installed=$installed + +# Should we warn about portability when linking against -modules? +shouldnotlink=$module + +# Files to dlopen/dlpreopen +dlopen='$dlfiles' +dlpreopen='$dlprefiles' + +# Directory that this library needs to be installed in: +libdir='$install_libdir'" + if test "$installed" = no && test "$need_relink" = yes; then + $echo >> $output "\ +relink_command=\"$relink_command\"" + fi + done + fi + + # Do a symbolic link so that the libtool archive can be found in + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? + ;; + esac + exit $EXIT_SUCCESS + ;; + + # libtool install mode + install) + modename="$modename: install" + + # There may be an optional sh(1) argument at the beginning of + # install_prog (especially on Windows NT). + if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || + # Allow the use of GNU shtool's install command. + $echo "X$nonopt" | grep shtool > /dev/null; then + # Aesthetically quote it. + arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$arg " + arg="$1" + shift + else + install_prog= + arg=$nonopt + fi + + # The real first argument should be the name of the installation program. + # Aesthetically quote it. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog$arg" + + # We need to accept at least all the BSD install flags. + dest= + files= + opts= + prev= + install_type= + isdir=no + stripme= + for arg + do + if test -n "$dest"; then + files="$files $dest" + dest=$arg + continue + fi + + case $arg in + -d) isdir=yes ;; + -f) + case " $install_prog " in + *[\\\ /]cp\ *) ;; + *) prev=$arg ;; + esac + ;; + -g | -m | -o) prev=$arg ;; + -s) + stripme=" -s" + continue + ;; + -*) + ;; + *) + # If the previous option needed an argument, then skip it. + if test -n "$prev"; then + prev= + else + dest=$arg + continue + fi + ;; + esac + + # Aesthetically quote the argument. + arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` + case $arg in + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + arg="\"$arg\"" + ;; + esac + install_prog="$install_prog $arg" + done + + if test -z "$install_prog"; then + $echo "$modename: you must specify an install program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$prev"; then + $echo "$modename: the \`$prev' option requires an argument" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + if test -z "$files"; then + if test -z "$dest"; then + $echo "$modename: no file or destination specified" 1>&2 + else + $echo "$modename: you must specify a destination" 1>&2 + fi + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Strip any trailing slash from the destination. + dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` + + # Check to see that the destination is a directory. + test -d "$dest" && isdir=yes + if test "$isdir" = yes; then + destdir="$dest" + destname= + else + destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` + test "X$destdir" = "X$dest" && destdir=. + destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` + + # Not a directory, so check to see that there is only one file specified. + set dummy $files + if test "$#" -gt 2; then + $echo "$modename: \`$dest' is not a directory" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + fi + case $destdir in + [\\/]* | [A-Za-z]:[\\/]*) ;; + *) + for file in $files; do + case $file in + *.lo) ;; + *) + $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + done + ;; + esac + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + staticlibs= + future_libdirs= + current_libdirs= + for file in $files; do + + # Do each installation. + case $file in + *.$libext) + # Do the static libraries later. + staticlibs="$staticlibs $file" + ;; + + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + library_names= + old_library= + relink_command= + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Add the libdir to current_libdirs if it is the destination. + if test "X$destdir" = "X$libdir"; then + case "$current_libdirs " in + *" $libdir "*) ;; + *) current_libdirs="$current_libdirs $libdir" ;; + esac + else + # Note the libdir as a future libdir. + case "$future_libdirs " in + *" $libdir "*) ;; + *) future_libdirs="$future_libdirs $libdir" ;; + esac + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ + test "X$dir" = "X$file/" && dir= + dir="$dir$objdir" + + if test -n "$relink_command"; then + # Determine the prefix the user has applied to our future dir. + inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` + + # Don't allow the user to place us outside of our expected + # location b/c this prevents finding dependent libraries that + # are installed to the same prefix. + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. + if test "$inst_prefix_dir" = "$destdir"; then + $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 + exit $EXIT_FAILURE + fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + else + relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` + fi + + $echo "$modename: warning: relinking \`$file'" 1>&2 + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + exit $EXIT_FAILURE + fi + fi + + # See the names of the shared library. + set dummy $library_names + if test -n "$2"; then + realname="$2" + shift + shift + + srcname="$realname" + test -n "$relink_command" && srcname="$realname"T + + # Install the shared library and build the symlinks. + $show "$install_prog $dir/$srcname $destdir/$realname" + $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? + if test -n "$stripme" && test -n "$striplib"; then + $show "$striplib $destdir/$realname" + $run eval "$striplib $destdir/$realname" || exit $? + fi + + if test "$#" -gt 0; then + # Delete the old symlinks, and create new ones. + # Try `ln -sf' first, because the `ln' binary might depend on + # the symlink we replace! Solaris /bin/ln does not understand -f, + # so we also need to try rm && ln -s. + for linkname + do + if test "$linkname" != "$realname"; then + $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" + fi + done + fi + + # Do each command in the postinstall commands. + lib="$destdir/$realname" + cmds=$postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || { + lt_exit=$? + + # Restore the uninstalled library and exit + if test "$mode" = relink; then + $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' + fi + + exit $lt_exit + } + done + IFS="$save_ifs" + fi + + # Install the pseudo-library for information purposes. + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + instname="$dir/$name"i + $show "$install_prog $instname $destdir/$name" + $run eval "$install_prog $instname $destdir/$name" || exit $? + + # Maybe install the static library, too. + test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + ;; + + *.lo) + # Install (i.e. copy) a libtool object. + + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # Deduce the name of the destination old-style object file. + case $destfile in + *.lo) + staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` + ;; + *.$objext) + staticdest="$destfile" + destfile= + ;; + *) + $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + # Install the libtool object if requested. + if test -n "$destfile"; then + $show "$install_prog $file $destfile" + $run eval "$install_prog $file $destfile" || exit $? + fi + + # Install the old object if enabled. + if test "$build_old_libs" = yes; then + # Deduce the name of the old-style object file. + staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` + + $show "$install_prog $staticobj $staticdest" + $run eval "$install_prog \$staticobj \$staticdest" || exit $? + fi + exit $EXIT_SUCCESS + ;; + + *) + # Figure out destination file name, if it wasn't already specified. + if test -n "$destname"; then + destfile="$destdir/$destname" + else + destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + destfile="$destdir/$destfile" + fi + + # If the file is missing, and there is a .exe on the end, strip it + # because it is most likely a libtool script we actually want to + # install + stripped_ext="" + case $file in + *.exe) + if test ! -f "$file"; then + file=`$echo $file|${SED} 's,.exe$,,'` + stripped_ext=".exe" + fi + ;; + esac + + # Do a test to see if this is really a libtool program. + case $host in + *cygwin*|*mingw*) + wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` + ;; + *) + wrapper=$file + ;; + esac + if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then + notinst_deplibs= + relink_command= + + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + # Check the variables that should have been set. + if test -z "$notinst_deplibs"; then + $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 + exit $EXIT_FAILURE + fi + + finalize=yes + for lib in $notinst_deplibs; do + # Check to see that each library is installed. + libdir= + if test -f "$lib"; then + # If there is no directory component, then add one. + case $lib in + */* | *\\*) . $lib ;; + *) . ./$lib ;; + esac + fi + libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + if test -n "$libdir" && test ! -f "$libfile"; then + $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 + finalize=no + fi + done + + relink_command= + # Note that it is not necessary on cygwin/mingw to append a dot to + # foo even if both foo and FILE.exe exist: automatic-append-.exe + # behavior happens only for exec(3), not for open(2)! Also, sourcing + # `FILE.' does not work on cygwin managed mounts. + # + # If there is no directory component, then add one. + case $wrapper in + */* | *\\*) . ${wrapper} ;; + *) . ./${wrapper} ;; + esac + + outputname= + if test "$fast_install" = no && test -n "$relink_command"; then + if test "$finalize" = yes && test -z "$run"; then + tmpdir=`func_mktempdir` + file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` + outputname="$tmpdir/$file" + # Replace the output file specification. + relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + + $show "$relink_command" + if $run eval "$relink_command"; then : + else + $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 + ${rm}r "$tmpdir" + continue + fi + file="$outputname" + else + $echo "$modename: warning: cannot relink \`$file'" 1>&2 + fi + else + # Install the binary that we compiled earlier. + file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + fi + fi + + # remove .exe since cygwin /usr/bin/install will append another + # one anyway + case $install_prog,$host in + */usr/bin/install*,*cygwin*) + case $file:$destfile in + *.exe:*.exe) + # this is ok + ;; + *.exe:*) + destfile=$destfile.exe + ;; + *:*.exe) + destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` + ;; + esac + ;; + esac + $show "$install_prog$stripme $file $destfile" + $run eval "$install_prog\$stripme \$file \$destfile" || exit $? + test -n "$outputname" && ${rm}r "$tmpdir" + ;; + esac + done + + for file in $staticlibs; do + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + + # Set up the ranlib parameters. + oldlib="$destdir/$name" + + $show "$install_prog $file $oldlib" + $run eval "$install_prog \$file \$oldlib" || exit $? + + if test -n "$stripme" && test -n "$old_striplib"; then + $show "$old_striplib $oldlib" + $run eval "$old_striplib $oldlib" || exit $? + fi + + # Do each command in the postinstall commands. + cmds=$old_postinstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || exit $? + done + IFS="$save_ifs" + done + + if test -n "$future_libdirs"; then + $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 + fi + + if test -n "$current_libdirs"; then + # Maybe just do a dry run. + test -n "$run" && current_libdirs=" -n$current_libdirs" + exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' + else + exit $EXIT_SUCCESS + fi + ;; + + # libtool finish mode + finish) + modename="$modename: finish" + libdirs="$nonopt" + admincmds= + + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + for dir + do + libdirs="$libdirs $dir" + done + + for libdir in $libdirs; do + if test -n "$finish_cmds"; then + # Do each command in the finish commands. + cmds=$finish_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" || admincmds="$admincmds + $cmd" + done + IFS="$save_ifs" + fi + if test -n "$finish_eval"; then + # Do the single finish_eval. + eval cmds=\"$finish_eval\" + $run eval "$cmds" || admincmds="$admincmds + $cmds" + fi + done + fi + + # Exit here if they wanted silent mode. + test "$show" = : && exit $EXIT_SUCCESS + + $echo "X----------------------------------------------------------------------" | $Xsed + $echo "Libraries have been installed in:" + for libdir in $libdirs; do + $echo " $libdir" + done + $echo + $echo "If you ever happen to want to link against installed libraries" + $echo "in a given directory, LIBDIR, you must either use libtool, and" + $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + $echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + $echo " during execution" + fi + if test -n "$runpath_var"; then + $echo " - add LIBDIR to the \`$runpath_var' environment variable" + $echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" + + $echo " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $echo " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + $echo + $echo "See any operating system documentation about shared libraries for" + $echo "more information, such as the ld(1) and ld.so(8) manual pages." + $echo "X----------------------------------------------------------------------" | $Xsed + exit $EXIT_SUCCESS + ;; + + # libtool execute mode + execute) + modename="$modename: execute" + + # The first argument is the command name. + cmd="$nonopt" + if test -z "$cmd"; then + $echo "$modename: you must specify a COMMAND" 1>&2 + $echo "$help" + exit $EXIT_FAILURE + fi + + # Handle -dlopen flags immediately. + for file in $execute_dlfiles; do + if test ! -f "$file"; then + $echo "$modename: \`$file' is not a file" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + dir= + case $file in + *.la) + # Check to see that this really is a libtool archive. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : + else + $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + # Read the libtool library. + dlname= + library_names= + + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Skip this library if it cannot be dlopened. + if test -z "$dlname"; then + # Warn if it was a shared library. + test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" + continue + fi + + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + + if test -f "$dir/$objdir/$dlname"; then + dir="$dir/$objdir" + else + $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 + exit $EXIT_FAILURE + fi + ;; + + *.lo) + # Just add the directory containing the .lo file. + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + test "X$dir" = "X$file" && dir=. + ;; + + *) + $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 + continue + ;; + esac + + # Get the absolute pathname. + absdir=`cd "$dir" && pwd` + test -n "$absdir" && dir="$absdir" + + # Now add the directory to shlibpath_var. + if eval "test -z \"\$$shlibpath_var\""; then + eval "$shlibpath_var=\"\$dir\"" + else + eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" + fi + done + + # This variable tells wrapper scripts just to set shlibpath_var + # rather than running their programs. + libtool_execute_magic="$magic" + + # Check if any of the arguments is a wrapper script. + args= + for file + do + case $file in + -*) ;; + *) + # Do a test to see if this is really a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + # If there is no directory component, then add one. + case $file in + */* | *\\*) . $file ;; + *) . ./$file ;; + esac + + # Transform arg to wrapped name. + file="$progdir/$program" + fi + ;; + esac + # Quote arguments (to preserve shell metacharacters). + file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` + args="$args \"$file\"" + done + + if test -z "$run"; then + if test -n "$shlibpath_var"; then + # Export the shlibpath_var. + eval "export $shlibpath_var" + fi + + # Restore saved environment variables + if test "${save_LC_ALL+set}" = set; then + LC_ALL="$save_LC_ALL"; export LC_ALL + fi + if test "${save_LANG+set}" = set; then + LANG="$save_LANG"; export LANG + fi + + # Now prepare to actually exec the command. + exec_cmd="\$cmd$args" + else + # Display what would be done. + if test -n "$shlibpath_var"; then + eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" + $echo "export $shlibpath_var" + fi + $echo "$cmd$args" + exit $EXIT_SUCCESS + fi + ;; + + # libtool clean and uninstall mode + clean | uninstall) + modename="$modename: $mode" + rm="$nonopt" + files= + rmforce= + exit_status=0 + + # This variable tells wrapper scripts just to set variables rather + # than running their programs. + libtool_install_magic="$magic" + + for arg + do + case $arg in + -f) rm="$rm $arg"; rmforce=yes ;; + -*) rm="$rm $arg" ;; + *) files="$files $arg" ;; + esac + done + + if test -z "$rm"; then + $echo "$modename: you must specify an RM program" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + fi + + rmdirs= + + origobjdir="$objdir" + for file in $files; do + dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` + if test "X$dir" = "X$file"; then + dir=. + objdir="$origobjdir" + else + objdir="$dir/$origobjdir" + fi + name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` + test "$mode" = uninstall && objdir="$dir" + + # Remember objdir for removal later, being careful to avoid duplicates + if test "$mode" = clean; then + case " $rmdirs " in + *" $objdir "*) ;; + *) rmdirs="$rmdirs $objdir" ;; + esac + fi + + # Don't error if the file doesn't exist and rm -f was used. + if (test -L "$file") >/dev/null 2>&1 \ + || (test -h "$file") >/dev/null 2>&1 \ + || test -f "$file"; then + : + elif test -d "$file"; then + exit_status=1 + continue + elif test "$rmforce" = yes; then + continue + fi + + rmfiles="$file" + + case $name in + *.la) + # Possibly a libtool archive, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + . $dir/$name + + # Delete the libtool libraries and symlinks. + for n in $library_names; do + rmfiles="$rmfiles $objdir/$n" + done + test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + + case "$mode" in + clean) + case " $library_names " in + # " " in the beginning catches empty $dlname + *" $dlname "*) ;; + *) rmfiles="$rmfiles $objdir/$dlname" ;; + esac + test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + ;; + uninstall) + if test -n "$library_names"; then + # Do each command in the postuninstall commands. + cmds=$postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + + if test -n "$old_library"; then + # Do each command in the old_postuninstall commands. + cmds=$old_postuninstall_cmds + save_ifs="$IFS"; IFS='~' + for cmd in $cmds; do + IFS="$save_ifs" + eval cmd=\"$cmd\" + $show "$cmd" + $run eval "$cmd" + if test "$?" -ne 0 && test "$rmforce" != yes; then + exit_status=1 + fi + done + IFS="$save_ifs" + fi + # FIXME: should reinstall the best remaining shared library. + ;; + esac + fi + ;; + + *.lo) + # Possibly a libtool object, so verify it. + if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + + # Read the .lo file + . $dir/$name + + # Add PIC object to the list of files to remove. + if test -n "$pic_object" \ + && test "$pic_object" != none; then + rmfiles="$rmfiles $dir/$pic_object" + fi + + # Add non-PIC object to the list of files to remove. + if test -n "$non_pic_object" \ + && test "$non_pic_object" != none; then + rmfiles="$rmfiles $dir/$non_pic_object" + fi + fi + ;; + + *) + if test "$mode" = clean ; then + noexename=$name + case $file in + *.exe) + file=`$echo $file|${SED} 's,.exe$,,'` + noexename=`$echo $name|${SED} 's,.exe$,,'` + # $file with .exe has already been added to rmfiles, + # add $file without .exe + rmfiles="$rmfiles $file" + ;; + esac + # Do a test to see if this is a libtool program. + if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then + relink_command= + . $dir/$noexename + + # note $name still contains .exe if it was in $file originally + # as does the version of $file that was added into $rmfiles + rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + if test "$fast_install" = yes && test -n "$relink_command"; then + rmfiles="$rmfiles $objdir/lt-$name" + fi + if test "X$noexename" != "X$name" ; then + rmfiles="$rmfiles $objdir/lt-${noexename}.c" + fi + fi + fi + ;; + esac + $show "$rm $rmfiles" + $run $rm $rmfiles || exit_status=1 + done + objdir="$origobjdir" + + # Try to remove the ${objdir}s in the directories where we deleted files + for dir in $rmdirs; do + if test -d "$dir"; then + $show "rmdir $dir" + $run rmdir $dir >/dev/null 2>&1 + fi + done + + exit $exit_status + ;; + + "") + $echo "$modename: you must specify a MODE" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + ;; + esac + + if test -z "$exec_cmd"; then + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$generic_help" 1>&2 + exit $EXIT_FAILURE + fi +fi # test -z "$show_help" + +if test -n "$exec_cmd"; then + eval exec $exec_cmd + exit $EXIT_FAILURE +fi + +# We need to display help for each of the modes. +case $mode in +"") $echo \ +"Usage: $modename [OPTION]... [MODE-ARG]... + +Provide generalized library-building support services. + + --config show all configuration variables + --debug enable verbose shell tracing +-n, --dry-run display commands without modifying any files + --features display basic configuration information and exit + --finish same as \`--mode=finish' + --help display this help message and exit + --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] + --quiet same as \`--silent' + --silent don't print informational messages + --tag=TAG use configuration variables from tag TAG + --version print version information + +MODE must be one of the following: + + clean remove files from the build directory + compile compile a source file into a libtool object + execute automatically set library path, then run a program + finish complete the installation of libtool libraries + install install libraries or executables + link create a library or an executable + uninstall remove libraries from an installed directory + +MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for +a more detailed description of MODE. + +Report bugs to ." + exit $EXIT_SUCCESS + ;; + +clean) + $echo \ +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... + +Remove files from the build directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, object or program, all the files associated +with it are deleted. Otherwise, only FILE itself is deleted using RM." + ;; + +compile) + $echo \ +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE + +Compile a source file into a libtool library object. + +This mode accepts the following additional options: + + -o OUTPUT-FILE set the output file name to OUTPUT-FILE + -prefer-pic try to building PIC objects only + -prefer-non-pic try to building non-PIC objects only + -static always build a \`.o' file suitable for static linking + +COMPILE-COMMAND is a command to be used in creating a \`standard' object file +from the given SOURCEFILE. + +The output file name is determined by removing the directory component from +SOURCEFILE, then substituting the C source code suffix \`.c' with the +library object suffix, \`.lo'." + ;; + +execute) + $echo \ +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... + +Automatically set library path, then run a program. + +This mode accepts the following additional options: + + -dlopen FILE add the directory containing FILE to the library path + +This mode sets the library path environment variable according to \`-dlopen' +flags. + +If any of the ARGS are libtool executable wrappers, then they are translated +into their corresponding uninstalled binary, and any of their required library +directories are added to the library path. + +Then, COMMAND is executed, with ARGS as arguments." + ;; + +finish) + $echo \ +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... + +Complete the installation of libtool libraries. + +Each LIBDIR is a directory that contains libtool libraries. + +The commands that this mode executes may require superuser privileges. Use +the \`--dry-run' option if you just want to see what would be executed." + ;; + +install) + $echo \ +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... + +Install executables or libraries. + +INSTALL-COMMAND is the installation command. The first component should be +either the \`install' or \`cp' program. + +The rest of the components are interpreted as arguments to that command (only +BSD-compatible install options are recognized)." + ;; + +link) + $echo \ +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... + +Link object files or libraries together to form another library, or to +create an executable program. + +LINK-COMMAND is a command using the C compiler that you would use to create +a program from several object files. + +The following components of LINK-COMMAND are treated specially: + + -all-static do not do any dynamic linking at all + -avoid-version do not add a version suffix if possible + -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime + -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols + -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) + -export-symbols SYMFILE + try to export only the symbols listed in SYMFILE + -export-symbols-regex REGEX + try to export only the symbols matching REGEX + -LLIBDIR search LIBDIR for required installed libraries + -lNAME OUTPUT-FILE requires the installed library libNAME + -module build a library that can dlopened + -no-fast-install disable the fast-install mode + -no-install link a not-installable executable + -no-undefined declare that a library does not refer to external symbols + -o OUTPUT-FILE create OUTPUT-FILE from the specified objects + -objectlist FILE Use a list of object files found in FILE to specify objects + -precious-files-regex REGEX + don't remove output files matching REGEX + -release RELEASE specify package release information + -rpath LIBDIR the created library will eventually be installed in LIBDIR + -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries + -static do not do any dynamic linking of libtool libraries + -version-info CURRENT[:REVISION[:AGE]] + specify library version info [each variable defaults to 0] + +All other options (arguments beginning with \`-') are ignored. + +Every other argument is treated as a filename. Files ending in \`.la' are +treated as uninstalled libtool libraries, other files are standard or library +object files. + +If the OUTPUT-FILE ends in \`.la', then a libtool library is created, +only library objects (\`.lo' files) may be specified, and \`-rpath' is +required, except when creating a convenience library. + +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created +using \`ar' and \`ranlib', or on Windows using \`lib'. + +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file +is created, otherwise an executable program is created." + ;; + +uninstall) + $echo \ +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... + +Remove libraries from an installation directory. + +RM is the name of the program to use to delete files associated with each FILE +(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed +to RM. + +If FILE is a libtool library, all the files associated with it are deleted. +Otherwise, only FILE itself is deleted using RM." + ;; + +*) + $echo "$modename: invalid operation mode \`$mode'" 1>&2 + $echo "$help" 1>&2 + exit $EXIT_FAILURE + ;; +esac + +$echo +$echo "Try \`$modename --help' for more information about other modes." + +exit $? + +# The TAGs below are defined such that we never get into a situation +# in which we disable both kinds of libraries. Given conflicting +# choices, we go for a static library, that is the most portable, +# since we can't tell whether shared libraries were disabled because +# the user asked for that or because the platform doesn't support +# them. This is particularly important on AIX, because we don't +# support having both static and shared libraries enabled at the same +# time on that platform, so we default to a shared-only configuration. +# If a disable-shared tag is given, we'll fallback to a static-only +# configuration. But we'll never go from static-only to shared-only. + +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared +disable_libs=shared +# ### END LIBTOOL TAG CONFIG: disable-shared + +# ### BEGIN LIBTOOL TAG CONFIG: disable-static +disable_libs=static +# ### END LIBTOOL TAG CONFIG: disable-static + +# Local Variables: +# mode:shell-script +# sh-indentation:2 +# End: +# ### BEGIN LIBTOOL TAG CONFIG: CXX + +# Libtool was configured on host faro: + +# Shell to use when invoking shell scripts. +SHELL="/bin/sh" + +# Whether or not to build shared libraries. +build_libtool_libs=yes + +# Whether or not to build static libraries. +build_old_libs=yes + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=no + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=no + +# Whether or not to optimize for fast installation. +fast_install=yes + +# The host system. +host_alias=i486-linux-gnu +host=i486-pc-linux-gnu +host_os=linux-gnu + +# The build system. +build_alias=i486-linux-gnu +build=i486-pc-linux-gnu +build_os=linux-gnu + +# An echo program that does not interpret backslashes. +echo="echo" + +# The archiver. +AR="ar" +AR_FLAGS="cru" + +# A C compiler. +LTCC="i486-linux-gnu-gcc" + +# LTCC compiler flags. +LTCFLAGS=" -I/home/ruoso/dbxml/xqilla-2.0.0/debian/xercesc-private/" + +# A language-specific compiler. +CC="i486-linux-gnu-g++" + +# Is the compiler the GNU C compiler? +with_gcc=yes + +# An ERE matcher. +EGREP="/bin/grep -E" + +# The linker used to build libraries. +LD="/usr/bin/ld" + +# Whether we need hard or soft links. +LN_S="ln -s" + +# A BSD-compatible nm program. +NM="/usr/bin/nm -B" + +# A symbol stripping program +STRIP="strip" + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=file + +# Used on cygwin: DLL creation program. +DLLTOOL="dlltool" + +# Used on cygwin: object dumper. +OBJDUMP="objdump" + +# Used on cygwin: assembler. +AS="as" + +# The name of the directory that contains temporary libtool files. +objdir=.libs + +# How to create reloadable object files. +reload_flag=" -r" +reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs" + +# How to pass a linker flag through the compiler. +wl="-Wl," + +# Object file suffix (normally "o"). +objext="o" + +# Old archive suffix (normally "a"). +libext="a" + +# Shared library suffix (normally ".so"). +shrext_cmds='.so' + +# Executable file suffix (normally ""). +exeext="" + +# Additional compiler flags for building library objects. +pic_flag=" -fPIC -DPIC" +pic_mode=default + +# What is the maximum length of a command? +max_cmd_len=32768 + +# Does compiler simultaneously support -c and -o options? +compiler_c_o="yes" + +# Must we lock files when doing compilation? +need_locks="no" + +# Do we need the lib prefix for modules? +need_lib_prefix=no + +# Do we need a version for libraries? +need_version=no + +# Whether dlopen is supported. +dlopen_support=unknown + +# Whether dlopen of programs is supported. +dlopen_self=unknown + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=unknown + +# Compiler flag to prevent dynamic linking. +link_static_flag="-static" + +# Compiler flag to turn off builtin functions. +no_builtin_flag=" -fno-builtin" + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec="\${wl}--export-dynamic" + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive" + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec="" + +# Library versioning type. +version_type=linux + +# Format of library name prefix. +libname_spec="lib\$name" + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}" + +# The coded name of the library, if different from the real name. +soname_spec="\${libname}\${release}\${shared_ext}\$major" + +# Commands used to build and install an old-style archive. +RANLIB="ranlib" +old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib" +old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib" +old_postuninstall_cmds="" + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds="" + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds="" + +# Commands used to build and install a shared archive. +archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib" +archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib" +postinstall_cmds="" +postuninstall_cmds="" + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds="" +module_expsym_cmds="" + +# Commands to strip libraries. +old_striplib="strip --strip-debug" +striplib="strip --strip-unneeded" + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects="/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crti.o /usr/lib/gcc/i486-linux-gnu/4.2.3/crtbeginS.o" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects="/usr/lib/gcc/i486-linux-gnu/4.2.3/crtendS.o /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crtn.o" + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps="" + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s" + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path="-L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3 -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/i486-linux-gnu/4.2.3/../../.." + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method="pass_all" + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd="\$MAGIC_CMD" + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag="" + +# Flag that forces no undefined symbols. +no_undefined_flag="" + +# Commands used to finish a libtool library installation in a directory. +finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir" + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval="" + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'" + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'" + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'" + +# This is the shared library runtime path variable. +runpath_var=LD_RUN_PATH + +# This is the shared library path variable. +shlibpath_var=LD_LIBRARY_PATH + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=no + +# How to hardcode a shared library path into an executable. +hardcode_action=immediate + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=yes + +# Flag to hardcode $libdir into a binary during linking. +# This must work even if $libdir does not exist. +hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir" + +# If ld is used when linking, flag to hardcode $libdir into +# a binary during linking. This must work even if $libdir does +# not exist. +hardcode_libdir_flag_spec_ld="" + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator="" + +# Set to yes if using DIR/libNAME during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=no + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=no + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=unsupported + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=no + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=no + +# Compile-time system search path for libraries +sys_lib_search_path_spec=" /usr/lib/gcc/i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../i486-linux-gnu/4.2.3/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/ /lib/i486-linux-gnu/4.2.3/ /lib/../lib/ /usr/lib/i486-linux-gnu/4.2.3/ /usr/lib/../lib/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/lib/ /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../ /lib/ /usr/lib/" + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec="/lib /usr/lib /lib/i486-linux-gnu /usr/lib/i486-linux-gnu /usr/local/lib hwcap 0 nosegneg " + +# Fix the shell variable $srcfile for the compiler. +fix_srcfile_path="" + +# Set to yes if exported symbols are required. +always_export_symbols=no + +# The commands to list exported symbols. +export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols" + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds="" + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms="" + +# Symbols that must always be exported. +include_expsyms="" + +# ### END LIBTOOL TAG CONFIG: CXX + --- xqilla-2.0.0.orig/debian/changelog +++ xqilla-2.0.0/debian/changelog @@ -0,0 +1,30 @@ +xqilla (2.0.0-2.2) unstable; urgency=low + + * Non-maintainer upload. + * Replaced Build-Depend on libxerces28-dev with libxerces-c2-dev + (Closes: #483284). + + -- Miguel Landaeta Tue, 12 Aug 2008 23:33:12 -0430 + +xqilla (2.0.0-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * Fix FTBFS with GCC 4.3 (Closes: #474865) + * Use CXXFLAGS instead of CFLAGS to pass location of private library, was + causing FTBFS from within chroot. + + -- Chris Lamb Sat, 12 Apr 2008 15:57:14 +0100 + +xqilla (2.0.0-2) unstable; urgency=low + + * Fix control in order to generate correct libc dependency on xqilla + * Added chrpath call in order to remove rpath definition. + + -- Daniel Ruoso Mon, 03 Mar 2008 11:18:04 +0000 + +xqilla (2.0.0-1) unstable; urgency=low + + * Initial release + + -- Daniel Ruoso Thu, 28 Feb 2008 18:08:14 +0000 + --- xqilla-2.0.0.orig/debian/dirs +++ xqilla-2.0.0/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin --- xqilla-2.0.0.orig/debian/xqilla.install +++ xqilla-2.0.0/debian/xqilla.install @@ -0,0 +1 @@ +usr/bin/xqilla --- xqilla-2.0.0.orig/debian/docs +++ xqilla-2.0.0/debian/docs @@ -0,0 +1 @@ +TODO --- xqilla-2.0.0.orig/debian/libxqilla3.install +++ xqilla-2.0.0/debian/libxqilla3.install @@ -0,0 +1 @@ +usr/lib/libxqilla.so.* --- xqilla-2.0.0.orig/debian/libxqilla3.dirs +++ xqilla-2.0.0/debian/libxqilla3.dirs @@ -0,0 +1 @@ +usr/lib --- xqilla-2.0.0.orig/debian/copyright +++ xqilla-2.0.0/debian/copyright @@ -0,0 +1,21 @@ +This package was debianized by Daniel Ruoso on +Thu, 28 Feb 2008 18:08:14 +0000. + +It was downloaded from + +Copyright (c) 2001-2007 + DecisionSoft Limited. All rights reserved. +Copyright (c) 2004-2007 + Oracle. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. --- xqilla-2.0.0.orig/debian/xqilla.dirs +++ xqilla-2.0.0/debian/xqilla.dirs @@ -0,0 +1 @@ +usr/bin --- xqilla-2.0.0.orig/debian/libxqilla-dev.dirs +++ xqilla-2.0.0/debian/libxqilla-dev.dirs @@ -0,0 +1,2 @@ +usr/lib +usr/include --- xqilla-2.0.0.orig/debian/rules +++ xqilla-2.0.0/debian/rules @@ -0,0 +1,91 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +# shared library versions, option 1 +version=2.0.5 +major=2 +# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so +#version=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'` +#major=`ls src/.libs/lib*.so.* | \ +# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'` + +config.status: configure + dh_testdir + +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --with-xerces=/usr/ --infodir=\$${prefix}/share/info CXXFLAGS="$(CFLAGS) -I$(CURDIR)/debian/xercesc-private/" LDFLAGS="-Wl,-z,defs" + + +build: build-stamp +build-stamp: config.status + dh_testdir + + $(MAKE) + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + chrpath -d $(CURDIR)/debian/tmp/usr/lib/libxqilla.so.3.0.0 + chrpath -d $(CURDIR)/debian/tmp/usr/bin/xqilla + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_install --sourcedir=debian/tmp + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- xqilla-2.0.0.orig/debian/compat +++ xqilla-2.0.0/debian/compat @@ -0,0 +1 @@ +5 --- xqilla-2.0.0.orig/debian/control +++ xqilla-2.0.0/debian/control @@ -0,0 +1,40 @@ +Source: xqilla +Priority: extra +Maintainer: Daniel Ruoso +Build-Depends: debhelper (>= 5), autotools-dev, libxerces-c2-dev, chrpath +Standards-Version: 3.7.3 +Section: libs + +Package: xqilla +Section: text +Architecture: any +Depends: ${shlibs:Depends}, libxqilla3 (= ${binary:Version}) +Description: XQuery and XPath 2.0 command line interpreter + XQilla is a XQuery and XPath 2 library and command line utility + written in C++, implemented on top of the Xerces-C library. It is + made available under the terms of the Apache Lincese v2. + . + This package contains the command line xqilla utility + +Package: libxqilla-dev +Section: libdevel +Architecture: any +Depends: libxqilla3 (= ${binary:Version}) +Description: XQuery and XPath 2.0 library - Development files + XQilla is a XQuery and XPath 2 library and command line utility + written in C++, implemented on top of the Xerces-C library. It is + made available under the terms of the Apache Lincese v2. + . + This package contains the xqilla headers + +Package: libxqilla3 +Section: libs +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: XQuery and XPath 2.0 library + XQilla is a XQuery and XPath 2 library and command line utility + written in C++, implemented on top of the Xerces-C library. It is + made available under the terms of the Apache Lincese v2. + . + This package contains the xqilla libraries + --- xqilla-2.0.0.orig/debian/xercesc-private.list +++ xqilla-2.0.0/debian/xercesc-private.list @@ -0,0 +1,131 @@ +dom/deprecated/AttrImpl.hpp +dom/deprecated/AttrMapImpl.hpp +dom/deprecated/AttrNSImpl.hpp +dom/deprecated/CDATASectionImpl.hpp +dom/deprecated/CharacterDataImpl.hpp +dom/deprecated/ChildNode.hpp +dom/deprecated/CommentImpl.hpp +dom/deprecated/DeepNodeListImpl.hpp +dom/deprecated/DocumentFragmentImpl.hpp +dom/deprecated/DocumentImpl.hpp +dom/deprecated/DocumentTypeImpl.hpp +dom/deprecated/DOMStringImpl.hpp +dom/deprecated/DStringPool.hpp +dom/deprecated/ElementDefinitionImpl.hpp +dom/deprecated/ElementImpl.hpp +dom/deprecated/ElementNSImpl.hpp +dom/deprecated/EntityImpl.hpp +dom/deprecated/EntityReferenceImpl.hpp +dom/deprecated/MemDebug.hpp +dom/deprecated/NamedNodeMapImpl.hpp +dom/deprecated/NameNodeFilter.hpp +dom/deprecated/NodeIDMap.hpp +dom/deprecated/NodeImpl.hpp +dom/deprecated/NodeIteratorImpl.hpp +dom/deprecated/NodeListImpl.hpp +dom/deprecated/NodeVector.hpp +dom/deprecated/NotationImpl.hpp +dom/deprecated/ParentNode.hpp +dom/deprecated/ProcessingInstructionImpl.hpp +dom/deprecated/RangeImpl.hpp +dom/deprecated/RefCountedImpl.hpp +dom/deprecated/TextImpl.hpp +dom/deprecated/TreeWalkerImpl.hpp +dom/deprecated/XMLDeclImpl.hpp +dom/impl/DOMAttrImpl.hpp +dom/impl/DOMAttrMapImpl.hpp +dom/impl/DOMAttrNSImpl.hpp +dom/impl/DOMCasts.hpp +dom/impl/DOMCDATASectionImpl.hpp +dom/impl/DOMCharacterDataImpl.hpp +dom/impl/DOMChildNode.hpp +dom/impl/DOMCommentImpl.hpp +dom/impl/DOMConfigurationImpl.hpp +dom/impl/DOMDeepNodeListImpl.hpp +dom/impl/DOMDeepNodeListPool.hpp +dom/impl/DOMDocumentFragmentImpl.hpp +dom/impl/DOMDocumentImpl.hpp +dom/impl/DOMDocumentTypeImpl.hpp +dom/impl/DOMElementImpl.hpp +dom/impl/DOMElementNSImpl.hpp +dom/impl/DOMEntityImpl.hpp +dom/impl/DOMEntityReferenceImpl.hpp +dom/impl/DOMErrorImpl.hpp +dom/impl/DOMImplementationImpl.hpp +dom/impl/DOMLocatorImpl.hpp +dom/impl/DOMNamedNodeMapImpl.hpp +dom/impl/DOMNodeIDMap.hpp +dom/impl/DOMNodeImpl.hpp +dom/impl/DOMNodeIteratorImpl.hpp +dom/impl/DOMNodeListImpl.hpp +dom/impl/DOMNodeVector.hpp +dom/impl/DOMNormalizer.hpp +dom/impl/DOMNotationImpl.hpp +dom/impl/DOMParentNode.hpp +dom/impl/DOMProcessingInstructionImpl.hpp +dom/impl/DOMRangeImpl.hpp +dom/impl/DOMStringPool.hpp +dom/impl/DOMTextImpl.hpp +dom/impl/DOMTreeWalkerImpl.hpp +dom/impl/DOMTypeInfoImpl.hpp +dom/impl/DOMWriterImpl.hpp +dom/impl/XSDElementNSImpl.hpp +util/MsgLoaders/ICU/ICUMsgLoader.hpp +util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp +util/MsgLoaders/MsgCatalog/XMLMsgCat_Ids.hpp +util/MsgLoaders/MsgFile/MsgLoader.hpp +util/MsgLoaders/Win32/Win32MsgLoader.hpp +util/NetAccessors/libWWW/BinURLInputStream.hpp +util/NetAccessors/libWWW/LibWWWNetAccessor.hpp +util/NetAccessors/MacOSURLAccessCF/MacOSURLAccessCF.hpp +util/NetAccessors/MacOSURLAccessCF/URLAccessCFBinInputStream.hpp +util/NetAccessors/MacOSURLAccess/MacOSURLAccess.hpp +util/NetAccessors/MacOSURLAccess/URLAccessBinInputStream.hpp +util/NetAccessors/WinSock/BinHTTPURLInputStream.hpp +util/NetAccessors/WinSock/WinSockNetAccessor.hpp +util/Platforms/AIX/AIXDefs.hpp +util/Platforms/BeOS/BeOSDefs.hpp +util/Platforms/Cygwin/CygwinDefs.hpp +util/Platforms/FreeBSD/FreeBSDDefs.hpp +util/Platforms/HPUX/HPUXDefs.hpp +util/Platforms/Interix/InterixDefs.hpp +util/Platforms/IRIX/IRIXDefs.hpp +util/Platforms/MacOS/MacAbstractFile.hpp +util/Platforms/MacOS/MacCarbonFile.hpp +util/Platforms/MacOS/MacOSDefs.hpp +util/Platforms/MacOS/MacOSPlatformUtils.hpp +util/Platforms/MacOS/MacPosixFile.hpp +util/Platforms/NetBSD/NetBSDDefs.hpp +util/Platforms/OpenServer/OpenServerDefs.hpp +util/Platforms/OS2/OS2Defs.hpp +util/Platforms/OS390/FileHandleImpl.hpp +util/Platforms/OS390/OS390Defs.hpp +util/Platforms/OS390/Path390.hpp +util/Platforms/OS400/OS400Defs.hpp +util/Platforms/OS400/OS400PlatformUtils.hpp +util/Platforms/PTX/PTXDefs.hpp +util/Platforms/QNX/QNXDefs.hpp +util/Platforms/Solaris/SolarisDefs.hpp +util/Platforms/Tandem/TandemDefs.hpp +util/Platforms/Tru64/Tru64Defs.hpp +util/Platforms/UnixWare/UnixWareDefs.hpp +util/Platforms/Win32/Win32Defs.hpp +util/Transcoders/Cygwin/CygwinTransService.hpp +util/Transcoders/Iconv390/Iconv390TransService.hpp +util/Transcoders/Iconv400/Iconv400TransService.hpp +util/Transcoders/Iconv400/iconv_cnv.hpp +util/Transcoders/Iconv400/iconv_util.hpp +util/Transcoders/IconvFBSD/IconvFBSDTransService.hpp +util/Transcoders/IconvGNU/IconvGNUTransService.hpp +util/Transcoders/Iconv/IconvTransService.hpp +util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.hpp +util/Transcoders/Uniconv390/Uniconv390TransService.hpp +util/Transcoders/Uniconv390/XML256TableTranscoder390.hpp +util/Transcoders/Uniconv390/XML88591Transcoder390.hpp +util/Transcoders/Uniconv390/XMLASCIITranscoder390.hpp +util/Transcoders/Uniconv390/XMLEBCDICTranscoder390.hpp +util/Transcoders/Uniconv390/XMLIBM1047Transcoder390.hpp +util/Transcoders/Uniconv390/XMLIBM1140Transcoder390.hpp +util/Transcoders/Uniconv390/XMLUTF8Transcoder390.hpp +util/Transcoders/Uniconv390/XMLWin1252Transcoder390.hpp +util/Transcoders/Win32/Win32TransService.hpp --- xqilla-2.0.0.orig/debian/libxqilla-dev.install +++ xqilla-2.0.0/debian/libxqilla-dev.install @@ -0,0 +1,2 @@ +usr/lib/libxqilla.so +usr/include/* --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacOSDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacOSDefs.hpp @@ -0,0 +1,38 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacOSDefs.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + + +#ifndef MACOS_DEFS_HPP +#define MACOS_DEFS_HPP + +// --------------------------------------------------------------------------- +// MacOS runs in big endian mode. +// --------------------------------------------------------------------------- +#define ENDIANMODE_BIG + +// --------------------------------------------------------------------------- +// Define all the required platform types +// +// FileHandle is a pointer to XMLMacAbstractFile. Due to namespace +// declaration issues, it is declared here as a void*. +// --------------------------------------------------------------------------- +typedef void* FileHandle; + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacAbstractFile.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacAbstractFile.hpp @@ -0,0 +1,44 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacAbstractFile.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#pragma once + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// Abstract class for files. This could be used to allow multiple file paradigms. +class XMLMacAbstractFile : public XMemory +{ + public: + XMLMacAbstractFile() {} + virtual ~XMLMacAbstractFile() {} + + virtual unsigned int currPos() = 0; + virtual void close() = 0; + virtual unsigned int size() = 0; + virtual bool open(const XMLCh* path, bool toWrite = false) = 0; + virtual bool open(const char* path, bool toWrite = false) = 0; + virtual unsigned int read(unsigned int byteCount, XMLByte* buffer) = 0; + virtual void write(long byteCount, const XMLByte* buffer) = 0; + virtual void reset() = 0; +}; + +XERCES_CPP_NAMESPACE_END --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacCarbonFile.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacCarbonFile.hpp @@ -0,0 +1,52 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacCarbonFile.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#pragma once + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// Concrete file class implemented using raw Carbon file system calls. +class XMLMacCarbonFile : public XMLMacAbstractFile +{ + public: + XMLMacCarbonFile() : mFileRefNum(0), mFileValid(false) {} + virtual ~XMLMacCarbonFile(); + + unsigned int currPos(); + void close(); + unsigned int size(); + bool open(const XMLCh* path, bool toWrite); + bool open(const char* path, bool toWrite); + unsigned int read(unsigned int byteCount, XMLByte* buffer); + void write(long byteCount, const XMLByte* buffer); + void reset(); + + protected: + void create(const XMLCh* const); + bool openWithPermission(const XMLCh* const, int macPermission); + + short mFileRefNum; + bool mFileValid; +}; + +XERCES_CPP_NAMESPACE_END --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacPosixFile.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacPosixFile.hpp @@ -0,0 +1,50 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacPosixFile.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#pragma once + +#include +#include + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// Concrete file class implemented using raw Carbon file system calls. +class XMLMacPosixFile : public XMLMacAbstractFile +{ + public: + XMLMacPosixFile(); + virtual ~XMLMacPosixFile(); + + unsigned int currPos(); + void close(); + unsigned int size(); + bool open(const XMLCh* path, bool toWrite = false); + bool open(const char* path, bool toWrite = false); + unsigned int read(unsigned int byteCount, XMLByte* buffer); + void write(long byteCount, const XMLByte* buffer); + void reset(); + + protected: + FILE* mFile; +}; + +XERCES_CPP_NAMESPACE_END --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.hpp @@ -0,0 +1,105 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacOSPlatformUtils.hpp 180016 2005-06-04 19:49:30Z jberry $ + */ + +#pragma once + +#include +#include +#include +#include + + +#if defined(__APPLE__) + // Framework includes from ProjectBuilder + #include +#else + // Classic includes otherwise + #include +#endif + +XERCES_CPP_NAMESPACE_BEGIN + +// Notes on our Xerces/Mac paths: +// +// Wherever paths are used in Xerces, this Macintosh port assumes that they'll +// be in "unix" format, or at least as close as you can get to that on the particular +// OS. On classic, this means that a path will be a unix style path, separated by '/' and +// starting with the Mac OS volume name. Since slash is used as the segment separator, +// any slashes that actually exist in the segment name will be converted to colons +// (since colon is the Mac OS path separator and would be illegal in a segment name). +// For Mac OS X, paths are created and parsed using the FSRefMakePath, etc, routines: +// the major difference will be location of the volume name within the path. +// +// The routines below help to create and interpret these pathnames for these cases. +// While the port itself never creates such paths, it does use these same routines to +// parse them. + +// Factory method to create an appropriate concrete object +// descended from XMLMacAbstractFile. +XMLUTIL_EXPORT XMLMacAbstractFile* XMLMakeMacFile(MemoryManager* manager); + +// Convert fom FSRef/FSSpec to a Unicode character string path. +// Note that you'll need to delete [] that string after you're done with it! +XMLUTIL_EXPORT XMLCh* XMLCreateFullPathFromFSRef(const FSRef& startingRef, + MemoryManager* const manager = XMLPlatformUtils::fgArrayMemoryManager); +XMLUTIL_EXPORT XMLCh* XMLCreateFullPathFromFSSpec(const FSSpec& startingSpec, + MemoryManager* const manager = XMLPlatformUtils::fgArrayMemoryManager); + +// Convert from path to FSRef/FSSpec +// You retain ownership of the pathName. +// Note: in the general case, these routines will fail if the specified file +// does not exist when the routine is called. +XMLUTIL_EXPORT bool XMLParsePathToFSRef(const XMLCh* const pathName, FSRef& ref, + MemoryManager* const manager = XMLPlatformUtils::fgArrayMemoryManager); +XMLUTIL_EXPORT bool XMLParsePathToFSSpec(const XMLCh* const pathName, FSSpec& spec, + MemoryManager* const manager = XMLPlatformUtils::fgArrayMemoryManager); + +// These routines copy characters between their representation in the Unicode Converter +// and the representation used by XMLCh. Until a recent change in Xerces, these were +// sometimes different on the Macintosh (with GCC), but XMLCh is now fixed at 16 bits. +// Code utilitizing these routines may be phased out in time, as a conversion is no +// longer necessary. +XMLUTIL_EXPORT XMLCh* +CopyUniCharsToXMLChs(const UniChar* src, XMLCh* dst, std::size_t charCount, std::size_t maxChars); +XMLUTIL_EXPORT UniChar* +CopyXMLChsToUniChars(const XMLCh* src, UniChar* dst, std::size_t charCount, std::size_t maxChars); + +// UTF8/UniChar transcoding utilities +XMLUTIL_EXPORT std::size_t +TranscodeUniCharsToUTF8(const UniChar* src, char* dst, std::size_t srcCnt, std::size_t maxChars); +XMLUTIL_EXPORT std::size_t +TranscodeUTF8ToUniChars(const char* src, UniChar* dst, std::size_t maxChars); + +// Size of our statically allocated path buffers +const std::size_t kMaxMacStaticPathChars = 512; + +// Global variables set in platformInit() +extern bool gFileSystemCompatible; +extern bool gMacOSXOrBetter; +extern bool gHasFSSpecAPIs; +extern bool gHasFS2TBAPIs; +extern bool gHasHFSPlusAPIs; +extern bool gHasFSPathAPIs; +extern bool gPathAPIsUsePosixPaths; +extern bool gHasMPAPIs; +extern bool gUsePosixFiles; + +XERCES_CPP_NAMESPACE_END + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/Solaris/SolarisDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/Solaris/SolarisDefs.hpp @@ -0,0 +1,42 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: SolarisDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + // --------------------------------------------------------------------------- + // Detect endian mode + // --------------------------------------------------------------------------- +#include + +#ifdef _LITTLE_ENDIAN + #define ENDIANMODE_LITTLE +#elif defined(_BIG_ENDIAN) + #define ENDIANMODE_BIG +#else + #error : unknown byte order! +#endif + +typedef int FileHandle; + +#undef XERCES_Invalid_File_Handle +#define XERCES_Invalid_File_Handle -1 + +#ifndef SOLARIS +#define SOLARIS +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/Cygwin/CygwinDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/Cygwin/CygwinDefs.hpp @@ -0,0 +1,27 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: CygwinDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// NT and Win98 always run the CPU in little endian mode. +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE + +typedef void* FileHandle; --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/OS390/OS390Defs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/OS390/OS390Defs.hpp @@ -0,0 +1,30 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: OS390Defs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// OS390OE runs in big endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_BIG +typedef void* FileHandle; + +#ifdef EXM_OS390 +#define APP_NO_THREADS +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/OS390/FileHandleImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/OS390/FileHandleImpl.hpp @@ -0,0 +1,63 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: FileHandleImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#ifndef FILEHANDLEIMPL_HPP +#define FILEHANDLEIMPL_HPP +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class FileHandleImpl : public XMemory +{ + private: + FILE* Handle; // handle from fopen + XMLByte* stgBufferPtr; // address of staging buffer + int nextByte; // NAB in staging buffer + int openType; // 0=write, 1=read + int lrecl; // LRECL if openType is write + bool recordType; // true if "type=record" + MemoryManager* const fMemoryManager; + + public: + FileHandleImpl(FILE* open_handle, int o_type, bool r_type, int fileLrecl=0, MemoryManager* const manager=XMLPlatformUtils::fgMemoryManager); + ~FileHandleImpl(); + void setHandle(FILE* newHandlePtr) { Handle = newHandlePtr; } + void* getHandle() { return Handle; } + XMLByte* getStgBufferPtr() { return stgBufferPtr; } + int getNextByte() { return nextByte; } + void setNextByte(int newNextByte) { nextByte = newNextByte; } + int getOpenType() { return openType; } + bool isRecordType() { return recordType; } + void setRecordType(bool newType) { recordType = newType; } + int getLrecl() { return lrecl; } + void setLrecl(int newLrecl) { lrecl = newLrecl; } +}; + +// Constants for the openType member +#define _FHI_WRITE 0 +#define _FHI_READ 1 +// Constant for the typeRecord member +#define _FHI_NOT_TYPE_RECORD 0 +#define _FHI_TYPE_RECORD 1 + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/OS390/Path390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/OS390/Path390.hpp @@ -0,0 +1,125 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: Path390.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#ifndef PATH390_HPP +#define PATH390_HPP + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class Path390 +{ + public: + // Constructors and Destructor + Path390(); + ~Path390(); + Path390(char *s); + + // Set a new path in the object. This will overlay any existing path and + // re-initialize the object. + void setPath(char *s); + + // This performs a complete parse of the path. It returns the error code or 0 + // if there was no error. + int fullParse(); + + // This returns the path in a format as required by fopen + char * getfopenPath(); + + // This returns the parameters in a format as required by fopen + char * getfopenParms(); + + // This returns the type of the path. See the constants defined below. + int getPathType(); + + // This returns the error code that was found during the parse + int getError(); + + // Returns whether the path is relative or absolute + bool isRelative(); + + // Returns whether or not type=record shows up in the path. + bool isRecordType(); + + private: + int _pathtype; + char * _orgpath; + int _orglen; + char * _resultpath; + bool _absolute; + bool _uriabsolute; + bool _dsnabsolute; + char * _curpos; + int _parsestate; + int _numperiods; + int _numsemicolons; + + int _error; + char * _orgparms; + int _orgparmlen; + + char * _lastsemi; + char * _lastslash; + char * _lastparen; + char * _parmStart; + char * _pathEnd; + char * _extStart; + + int _typerecord; + // internal only methods: + void _determine_uri_abs(); + void _determine_type(); + void _determine_punct(); + void _determine_parms(); + void _parse_rest(); + +}; + +// Internal constants for the _parsestate variable: +#define PARSE_NONE 0 +#define PARSE_ABSOLUTE_URI 1 +#define PARSE_PATHTYPE 2 +#define PARSE_PUNCT 3 +#define PARSE_PARMS 4 +#define PARSE_PARSED 5 + +// These are the possible error return codes: +#define NO_ERROR 0 +#define ERROR_SEMICOLON_NOT_ALLOWED 101 +#define ERROR_PERIOD_NOT_ALLOWED 102 +#define ERROR_NO_PAREN_ALLOWED 103 +#define ERROR_ABS_PATH_REQUIRED 104 +#define ERROR_NO_EXTRA_PERIODS_ALLOWED 105 +#define ERROR_MUST_BE_ABSOLUTE 106 +#define ERROR_BAD_DD 107 +#define ERROR_BAD_DSN2 108 +#define ERROR_NO_EXTRA_SEMIS_ALLOWED 109 + +// Constants for the _pathtype variable and the return value from getPathType() method: +#define PATH390_HFS 1 +#define PATH390_DSN1 2 // format is dsn:/chrisl/data/xml/member1. +#define PATH390_DSN2 3 // format is dsn://'chrisl.data.xml(member1)' +#define PATH390_DD 4 +#define PATH390_OTHER 5 + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/OS2/OS2Defs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/OS2/OS2Defs.hpp @@ -0,0 +1,31 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: OS2Defs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// OS2 always run the CPU in little endian mode. +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE + + +// --------------------------------------------------------------------------- +// Define all the required platform types +// --------------------------------------------------------------------------- +typedef void* FileHandle; --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/Interix/InterixDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/Interix/InterixDefs.hpp @@ -0,0 +1,28 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: InterixDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// Interix runs in little endian mode +// --------------------------------------------------------------------------- + +#define ENDIANMODE_LITTLE +typedef void* FileHandle; + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/OpenServer/OpenServerDefs.hpp @@ -0,0 +1,27 @@ +/* + * Copyright 1999-2001,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: OpenServerDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// OpenServer runs in little endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE +typedef void* FileHandle; + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/OS400/OS400Defs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/OS400/OS400Defs.hpp @@ -0,0 +1,39 @@ +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(P128) /* @01a */ +#endif /* @01a */ + +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: OS400Defs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// AIX runs in big endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_BIG + + +// --------------------------------------------------------------------------- +// And define our file handle abstraction +// --------------------------------------------------------------------------- +typedef void* FileHandle; +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(pop) /* @01a */ +#endif /* @01a */ + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/OS400/OS400PlatformUtils.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/OS400/OS400PlatformUtils.hpp @@ -0,0 +1,45 @@ +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(P128) /* @01a */ +#endif /* @01a */ + +/* + * Copyright 1999-2001,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: OS400PlatformUtils.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef _OS400PLATFORMUTILS_H +#define _OS400PLATFORMUTILS_H + +XERCES_CPP_NAMESPACE_BEGIN + +void send_message (char * text, char * messageid, char type); +void convert_errno(char *,int); + +#define FILE_OPEN_PROBLEMS "XMLBED3" /* file open failure */ +#define ICONV_CONVERT_PROBLEM "XMLBED4" /* failed to convert ICONV */ +#define ICONV_CCSID_PROBLEM "XMLBED5" +#define GENERAL_PANIC_MESSAGE "XMLBEED" /* iconv initialization problem */ + +XERCES_CPP_NAMESPACE_END + +#endif /* _OS400PLATFORMUTILS_H */ + +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(pop) /* @01a */ +#endif /* @01a */ + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/Tandem/TandemDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/Tandem/TandemDefs.hpp @@ -0,0 +1,27 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: TandemDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// Tandem machines runs in big endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_BIG +typedef void* FileHandle; + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/UnixWare/UnixWareDefs.hpp @@ -0,0 +1,29 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: UnixWareDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// UnixWare runs in little endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE +typedef void* FileHandle; + + + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/Tru64/Tru64Defs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/Tru64/Tru64Defs.hpp @@ -0,0 +1,34 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: Tru64Defs.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// --------------------------------------------------------------------------- +// The Alpha runs the CPU in little endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE + + +// --------------------------------------------------------------------------- +// Define all the required platform types. +// --------------------------------------------------------------------------- +typedef void* FileHandle; + +#ifndef TRU64 +#define TRU64 +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/AIX/AIXDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/AIX/AIXDefs.hpp @@ -0,0 +1,31 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: AIXDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// AIX runs in big endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_BIG + + +// --------------------------------------------------------------------------- +// And define our file handle abstraction +// --------------------------------------------------------------------------- +typedef void* FileHandle; --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/BeOS/BeOSDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/BeOS/BeOSDefs.hpp @@ -0,0 +1,30 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: BeOSDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// BeOS runs in little endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE +typedef void* FileHandle; + +#ifndef BEOS +#define BEOS +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/HPUX/HPUXDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/HPUX/HPUXDefs.hpp @@ -0,0 +1,32 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: HPUXDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// HPUX runs in big endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_BIG +typedef void* FileHandle; + +#ifndef HPUX +#define HPUX +#endif + +//#define _PTHREADS_DRAFT4 --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/QNX/QNXDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/QNX/QNXDefs.hpp @@ -0,0 +1,37 @@ +/* + * Copyright 2003,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: QNXDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// Detect endian mode +// --------------------------------------------------------------------------- +#include + +#if defined(__LITTLEENDIAN__) + #define ENDIANMODE_LITTLE +#elif defined(__BIGENDIAN__) + #define ENDIANMODE_BIG +#else + #error: unknown byte order! +#endif + +#include +typedef FILE* FileHandle; + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/Win32/Win32Defs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/Win32/Win32Defs.hpp @@ -0,0 +1,32 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: Win32Defs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// NT and Win98 always run the CPU in little endian mode. +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE + + +// --------------------------------------------------------------------------- +// Define all the required platform types. For Win32, void* is interoperable +// with the HANDLE type. +// --------------------------------------------------------------------------- +typedef void* FileHandle; --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/FreeBSD/FreeBSDDefs.hpp @@ -0,0 +1,30 @@ +/* + * Copyright 2001,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: FreeBSDDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// FreeBSD runs in little endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE +typedef void* FileHandle; + +#ifndef FREEBSD +#define FREEBSD +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/NetBSD/NetBSDDefs.hpp @@ -0,0 +1,36 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * + * + */ + + +// --------------------------------------------------------------------------- +// NetBSD runs on 29 hardware plateforms... +// --------------------------------------------------------------------------- +#ifdef __i386__ +#define ENDIANMODE_LITTLE +#else +#define ENDIANMODE_BIG +#endif + +typedef void* FileHandle; + +#ifndef NETBSD +#define NETBSD +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/PTX/PTXDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/PTX/PTXDefs.hpp @@ -0,0 +1,30 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: PTXDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +// --------------------------------------------------------------------------- +// Dynix/PTX runs in little endian mode +// --------------------------------------------------------------------------- +#define ENDIANMODE_LITTLE +typedef void* FileHandle; + +#ifndef PTX +#define PTX +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Platforms/IRIX/IRIXDefs.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Platforms/IRIX/IRIXDefs.hpp @@ -0,0 +1,28 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: IRIXDefs.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +// --------------------------------------------------------------------------- +// IRIX runs in big endian mode +// --------------------------------------------------------------------------- + +#define ENDIANMODE_BIG +typedef void* FileHandle; + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Iconv400/iconv_util.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Iconv400/iconv_util.hpp @@ -0,0 +1,123 @@ +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(P128) /* @01a */ +#endif /* @01a */ + +/* + * Copyright 1999-2001,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: iconv_util.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +#include "utypes.h" +#include + +XERCES_CPP_NAMESPACE_BEGIN + +const char* iconv_getDefaultCodepage(void); + +// extern "C" int QlgCvtTextDescToDesc (int, int, char *, int, char*, int, int); + +#define MAX_CONVERTER_NAME_LENGTH 60 +#define MAX_SUBCHAR_LEN 4 +#define ERROR_BUFFER_LENGTH 20 +typedef enum {UNKNOWN = -1, IBM = 0} +UCNV_PLATFORM; +typedef enum +{ + UNSUPPORTED_CONVERTER = -1, + SBCS = 0, + DBCS = 1, + MBCS = 2, + LATIN_1 = 3, + UTF8 = 4, + UTF16_BigEndian = 5, + UTF16_LittleEndian = 6, + EBCDIC_STATEFUL = 7, + ISO_2022 = 8, + JIS = 9, + EUC = 10, + GB = 11 +} +UCNV_TYPE; +int32_t +u_strlen(const UChar *s); + +/* note sure if needed - think that this is needed in cnv.c */ +char* u_austrcpy(char *s1, + const UChar *ucs2 ); + +/*Defines the struct of a UConverterSharedData the immutable, shared part of + *UConverter + */ +typedef struct + { + uint32_t referenceCounter; /*used to count number of clients */ + char name[MAX_CONVERTER_NAME_LENGTH]; /*internal name of the converter */ + UCNV_PLATFORM platform; /*platform of the converter (only IBM now */ + int32_t codepage; /*codepage # (now IBM-$codepage) */ + UCNV_TYPE conversionType; /*conversion type */ + int8_t minBytesPerChar; /*Minimum # bytes per char in this codepage */ + int8_t maxBytesPerChar; /*Maximum # bytes per char in this codepage */ + + struct + { /*initial values of some members of the mutable part of object */ + + int8_t subCharLen; + unsigned char subChar[MAX_SUBCHAR_LEN]; + } defaultConverterValues ; + + iconv_t toiconv_handle ; /* handle to convert to unicode*/ + iconv_t fromiconv_handle; /* handle to convert from unicode*/ + } +UConverterSharedData; + + +/*Defines a UConverter, the lightweight mutable part the user sees */ +struct UConverter + { + + + + int8_t pad; + int32_t mode; + int8_t subCharLen; /*length of the codepage specific character sequence */ + unsigned char subChar[MAX_SUBCHAR_LEN]; /*codepage specific character sequence */ + + + UConverterSharedData *sharedData; /*Pointer to the shared immutable part of the + *converter object + */ + + + }; + +typedef struct UConverter UConverter; + +UConverter* createNewConverter(const char *name, UErrorCode *err); + +/*Initializes the mutable lightweight portion of the object + *By copying data from UConverter->sharedData->defaultConverter + */ +static void initializeDataConverter (UConverter * myUConverter); +UConverter *createConverter (const char *converterName, UErrorCode * err); + +XERCES_CPP_NAMESPACE_END +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(pop) /* @01a */ +#endif /* @01a */ + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Iconv400/iconv_cnv.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Iconv400/iconv_cnv.hpp @@ -0,0 +1,310 @@ +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(P128) /* @01a */ +#endif /* @01a */ + +/* + * Copyright 1999-2001,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: iconv_cnv.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef UCNV_H +#define UCNV_H + +#include "utypes.h" + +XERCES_CPP_NAMESPACE_BEGIN + +/** + * Creates a UConverter object with the names specified as a C string. + * The actual name will be resolved with the alias file. + * if NULL is passed for the converter name, it will create one with the + * getDefaultName return value. + * @param converterName : name of the uconv table + * @param err outgoing error status MEMORY_ALLOCATION_ERROR, TABLE_NOT_FOUND + * @return the created Unicode converter object, or NULL if an error occured + * @see ucnv_openU + * @see ucnv_openCCSID + * @see ucnv_close + */ + +U_CAPI +UConverter* U_EXPORT2 ucnv_open (const char *converterName, + UErrorCode * err); + + +/** + * Creates a Unicode converter with the names specified as unicode string. The name should be limited to + * the ASCII-7 alphanumerics range. The actual name will be resolved with the alias file. + * if NULL is passed for the converter name, it will create one with the + * getDefaultName return value. + * @param converterName : name of the uconv table in a zero terminated Unicode string + * @param err outgoing error status MEMORY_ALLOCATION_ERROR, TABLE_NOT_FOUND + * @return the created Unicode converter object, or NULL if an error occured + * @see ucnv_open + * @see ucnv_openCCSID + * @see ucnv_close + */ +U_CAPI UConverter* U_EXPORT2 ucnv_openU (const UChar * name, + UErrorCode * err); + + + +/** + * Creates a UConverter object using a CCSID number. + * @param codepage : codepage # of the uconv table + * @param platform : codepage's platform (now only IBM supported) + * @param err error status MEMORY_ALLOCATION_ERROR, TABLE_NOT_FOUND + * @return the created Unicode converter object, or NULL if and error occured + * @see ucnv_open + * @see ucnv_openU + * @see ucnv_close + */ + + +U_CAPI void U_EXPORT2 ucnv_close (UConverter * converter); + + + + +/** + * Returns the maximum length of bytes used by a character. This varies between 1 and 4 + * @param converter the Unicode converter + * @return the maximum number of bytes allowed by this particular converter + * @see ucnv_getMinCharSize + */ +U_CAPI int8_t U_EXPORT2 + ucnv_getMaxCharSize (const UConverter * converter); + + +/** + * Returns the minimum byte length for characters in this codepage. This is either + * 1 or 2 for all supported codepages. + * @param converter the Unicode converter + * @return the minimum number of bytes allowed by this particular converter + * @see ucnv_getMaxCharSize + */ +U_CAPI int8_t U_EXPORT2 + ucnv_getMinCharSize (const UConverter * converter); + + +/** + * Transcodes an array of unicode characters to an array of codepage characters. + * The source pointer is an I/O parameter, it starts out pointing where the function is + * to begin transcoding, and ends up pointing after the first sequence of the bytes + * that it encounters that are semantically invalid. + * if ucnv_setToUCallBack is called with an action other than STOP + * before a call is made to this API, consumed and source should point to the same place + * (unless target ends with an imcomplete sequence of bytes and flush is FALSE). + * the target buffer buffer needs to be a least the size of the maximum # of bytes per characters + * allowed by the target codepage. + * @param converter the Unicode converter + * @param converter the Unicode converter + * @param target : I/O parameter. Input : Points to the beginning of the buffer to copy + * codepage characters to. Output : points to after the last codepage character copied + * to target. + * @param targetLimit the pointer to the end of the target array + * @param source the source Unicode character array + * @param sourceLimit the pointer to the end of the source array + * @param offsets if NULL is passed, nothing will happen to it, otherwise it needs to have the same number + * of allocated cells as target. Will fill in offsets from target to source pointer + * e.g: offsets[3] is equal to 6, it means that the target[3] was a result of transcoding source[6] + * For output data carried across calls -1 will be placed for offsets. + * @param flush TRUE if the buffer is the last buffer of the conversion interation + * and the conversion will finish with this call, FALSE otherwise. + * @param err the error status. ILLEGAL_ARGUMENT_ERROR will be returned if the + * converter is NULL. + * @see ucnv_fromUChars + * @see ucnv_convert + * @see ucnv_getMinCharSize + * @see ucnv_setToUCallBack + */ + +U_CAPI + void U_EXPORT2 ucnv_fromUnicode (UConverter * converter, + char **target, + const char *targetLimit, + const UChar ** source, + const UChar * sourceLimit, + int32_t* offsets, + int flush, + UErrorCode * err); + + +/** + * Converts an array of codepage characters into an array of unicode characters. + * The source pointer is an I/O parameter, it starts out pointing at the place + * to begin translating, and ends up pointing after the first sequence of the bytes + * that it encounters that are semantically invalid. + * if ucnv_setFromUCallBack is called with an action other than STOP + * before a call is made to this API, consumed and source should point to the same place + * (unless target ends with an imcomplete sequence of bytes and flush is FALSE). + * @param converter the Unicode converter + * @param target : I/O parameter. Input : Points to the beginning of the buffer to copy + * Unicode characters to. Output : points to after the last UChar copied to target. + * @param targetLimit the pointer to the end of the target array + * @param source the source codepage character array + * @param sourceLimit the pointer to the end of the source array + * @param offsets if NULL is passed, nothing will happen to it, otherwise it needs to have the same number + * of allocated cells as target. Will fill in offsets from target to source pointer + * e.g: offsets[3] is equal to 6, it means that the target[3] was a result of transcoding source[6] + * For output data carried across calls -1 will be placed for offsets. + * @param flush TRUE if the buffer is the last buffer and the conversion will finish + * in this call, FALSE otherwise. + * @param err the error code status ILLEGAL_ARGUMENT_ERROR will be returned if the + * converter is NULL, or if targetLimit and sourceLimit are misaligned. + * @see ucnv_toUChars + * @see ucnv_getNextUChar + * @see ucnv_convert + * @see ucnv_setFromUCallBack + */ + +U_CAPI + void U_EXPORT2 ucnv_toUnicode (UConverter * converter, + UChar ** target, + const UChar * targetLimit, + const char **source, + const char *sourceLimit, + int32_t* offsets, + int flush, + UErrorCode * err); + + +/** + * Transcodes the source Unicode string to the target string in a codepage encoding + * with the specified Unicode converter. For example, if a Unicode to/from JIS + * converter is specified, the source string in Unicode will be transcoded to JIS + * encoding. The result will be stored in JIS encoding. + * if any problems during conversion are encountered it will SUBSTITUTE with the default (initial) + * substitute characters. + * This function is a more convenient but less efficient version of \Ref{ucnv_fromUnicode}. + * @param converter the Unicode converter + * @param source the source Unicode string (zero Terminated) + * @param target the target string in codepage encoding (not zero-terminated because some + * codepage do not use '\0' as a string terminator + * @param targetCapacity Input the number of bytes available in the target buffer + * @param err the error status code. + * INDEX_OUTOFBOUNDS_ERROR will be returned if the + * the # of bytes provided are not enough for transcoding. + * ILLEGAL_ARGUMENT_ERROR is returned if the converter is NULL or the source or target string is empty. + * BUFFER_OVERFLOW_ERROR when targetSize turns out to be bigger than targetCapacity + * @return number of bytes needed in target, regardless of targetCapacity + * @see ucnv_fromUnicode + * @see ucnv_convert + */ +U_CAPI + int32_t U_EXPORT2 ucnv_fromUChars (const UConverter * converter, + char *target, + int32_t targetCapacity, + const UChar * source, + UErrorCode * err); + + + + + +/** + * Transcode the source string in codepage encoding to the target string in + * Unicode encoding. For example, if a Unicode to/from JIS + * converter is specified, the source string in JIS encoding will be transcoded + * to Unicode and placed into a provided target buffer. + * if any problems during conversion are encountered it will SUBSTITUTE with the Unicode REPLACEMENT char + * We recomment, the size of the target buffer needs to be at least as long as the maximum # of bytes per char + * in this character set. + * A zero-terminator will be placed at the end of the target buffer + * This function is a more convenient but less efficient version of \Ref{ucnv_toUnicode}. + * @param converter the Unicode converter + * @param source the source string in codepage encoding + * @param target the target string in Unicode encoding + * @param targetCapacity capacity of the target buffer + * @param sourceSize : Number of bytes in source to be transcoded + * @param err the error status code + * MEMORY_ALLOCATION_ERROR will be returned if the + * the internal process buffer cannot be allocated for transcoding. + * ILLEGAL_ARGUMENT_ERROR is returned if the converter is NULL or + * if the source or target string is empty. + * BUFFER_OVERFLOW_ERROR when the input buffer is prematurely exhausted and targetSize non-NULL. + * @return the number of UChar needed in target (including the zero terminator) + * @see ucnv_getNextUChar + * @see ucnv_toUnicode + * @see ucnv_convert + */ +U_CAPI + int32_t U_EXPORT2 ucnv_toUChars (const UConverter * converter, + UChar * target, + int32_t targetCapacity, + const char *source, + int32_t sourceSize, + UErrorCode * err); + +/******************************** + * Will convert a codepage buffer one character at a time. + * This function was written to be efficient when transcoding small amounts of data at a time. + * In that case it will be more efficient than \Ref{ucnv_toUnicode}. + * When converting large buffers use \Ref{ucnv_toUnicode}. + *@param converter an open UConverter + *@param source the address of a pointer to the codepage buffer, will be updated to point after + *the bytes consumed in the conversion call. + *@param points to the end of the input buffer + *@param err fills in error status (see ucnv_toUnicode) + *@return a UChar resulting from the partial conversion of source + *@see ucnv_toUnicode + *@see ucnv_toUChars + *@see ucnv_convert + */ +U_CAPI + UChar U_EXPORT2 ucnv_getNextUChar (UConverter * converter, + const char **source, + const char *sourceLimit, + UErrorCode * err); + + +/************************** +* Will convert a sequence of bytes from one codepage to another. +* This is NOT AN EFFICIENT way to transcode. +* use \Ref{ucnv_toUnicode} and \Ref{ucnv_fromUnicode} for efficiency +* @param toConverterName: The name of the converter that will be used to encode the output buffer +* @param fromConverterName: The name of the converter that will be used to decode the input buffer +* @param target: Pointer to the output buffer to write to +* @param targetCapacity: on input contains the capacity of target +* @param source: Pointer to the input buffer +* @param sourceLength: on input contains the capacity of source +* @param err: fills in an error status +* @return will be filled in with the number of bytes needed in target +* @see ucnv_fromUnicode +* @see ucnv_toUnicode +* @see ucnv_fromUChars +* @see ucnv_toUChars +* @see ucnv_getNextUChar +*/ +U_CAPI + int32_t U_EXPORT2 ucnv_convert (const char *toConverterName, + const char *fromConverterName, + char *target, + int32_t targetCapacity, + const char *source, + int32_t sourceLength, + UErrorCode * err); + +XERCES_CPP_NAMESPACE_END + +#endif + +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(pop) /* @01a */ +#endif /* @01a */ + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Iconv400/Iconv400TransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Iconv400/Iconv400TransService.hpp @@ -0,0 +1,262 @@ +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(P128) /* @01a */ +#endif /* @01a */ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @02A V5R2M0 200419 jrhansen : support lowercase function + * $Id: Iconv400TransService.hpp 176407 2005-05-18 13:44:44Z cargilld $ + */ + +#ifndef ICONV400TRANSSERVICE_HPP +#define ICONV400TRANSSERVICE_HPP + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +struct UConverter; + +class XMLUTIL_EXPORT Iconv400TransService : public XMLTransService +{ +public : + // ----------------------------------------------------------------------- + // Public, static methods + // ----------------------------------------------------------------------- + + + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Iconv400TransService(); + ~Iconv400TransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toLowerCase) const; + + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Iconv400TransService(const Iconv400TransService&); + Iconv400TransService& operator=(const Iconv400TransService&); + + XMLCh toUnicodeUpper(XMLCh toupper) const; + XMLCh toUnicodeLower(XMLCh tolower) const; + + Qlg_CCSID_ReqCtlBlk_T convertCtlblkUpper; + Qlg_CCSID_ReqCtlBlk_T convertCtlblkLower; + +}; + + + +class XMLUTIL_EXPORT Iconv400Transcoder : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Iconv400Transcoder + ( + const XMLCh* const encodingName + , UConverter* const toAdopt + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + ~Iconv400Transcoder(); + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Iconv400Transcoder(); + Iconv400Transcoder(const Iconv400Transcoder&); + Iconv400Transcoder& operator=(const Iconv400Transcoder&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fConverter + // This is a pointer to the Iconv400 converter that this transcoder + // uses. + // + // fFixed + // This is set to true if the encoding is a fixed size one. This + // can be used to optimize some operations. + // + // fSrcOffsets + // This is an array of longs, which are allocated to the size of + // the trancoding block (if any) indicated in the ctor. It is used + // to get the character offsets from Iconv400, which are then translated + // into an array of char sizes for return. + // ----------------------------------------------------------------------- + UConverter* fConverter; + bool fFixed; + long* fSrcOffsets; + +}; + + +class XMLUTIL_EXPORT Iconv400LCPTranscoder : public XMLLCPTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Iconv400LCPTranscoder(UConverter* const toAdopt); + ~Iconv400LCPTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Iconv400LCPTranscoder(); + Iconv400LCPTranscoder(const Iconv400LCPTranscoder&); + Iconv400LCPTranscoder& operator=(const Iconv400LCPTranscoder&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fConverter + // This is a pointer to the Iconv converter that this transcoder + // uses. + // + // fMutex + // We have to synchronize threaded calls to the converter. + // ----------------------------------------------------------------------- + UConverter* fConverter; + XMLMutex fMutex; +}; + +XERCES_CPP_NAMESPACE_END + +#endif +#if (__OS400_TGTVRM__>=510) /* @01a */ + #pragma datamodel(pop) /* @01a */ +#endif /* @01a */ + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Cygwin/CygwinTransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Cygwin/CygwinTransService.hpp @@ -0,0 +1,258 @@ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef CYGWINTRANSSERVICE_HPP +#define CYGWINTRANSSERVICE_HPP + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class CPMapEntry; + + + +//--------------------------------------------------------------------------- +// +// class CygwinTransService +// +//--------------------------------------------------------------------------- +class XMLUTIL_EXPORT CygwinTransService : public XMLTransService +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + CygwinTransService(); + virtual ~CygwinTransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toLowerCase) const; + + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods, implemented in CygwinTransService.cpp + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + CygwinTransService(const CygwinTransService&); + CygwinTransService& operator=(const CygwinTransService&); + + int auxCompareString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , signed long maxChars + , const bool ignoreCase + ); + + static bool isAlias(const HKEY encodingKey + , char* const aliasBuf = 0 + , const unsigned int nameBufSz = 0); + + + // This is a hash table of entries which map encoding names to their + // Windows specific code pages. The code page allows us to create + // transcoders for those encodings. The encoding names come from XML + // files. + // + // This map is shared unsynchronized among all threads of the process, + // which is cool since it will be read only once its initialized. + + RefHashTableOf *fCPMap; +}; + + + + + + + +//--------------------------------------------------------------------------- +// +// class CygwinTranscoder +// +//--------------------------------------------------------------------------- + +class XMLUTIL_EXPORT CygwinTranscoder : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + CygwinTranscoder + ( + const XMLCh* const encodingName + , const unsigned int winCP + , const unsigned int ieCP + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + ~CygwinTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + CygwinTranscoder(const CygwinTranscoder&); + CygwinTranscoder& operator=(const CygwinTranscoder&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fIECP + // This is the internet explorer code page for this encoding. + // + // fWinCP + // This is the windows code page for this encoding. + // ----------------------------------------------------------------------- + unsigned int fIECP; + unsigned int fWinCP; +}; + + + + + +//--------------------------------------------------------------------------- +// +// class CygwinLCPTranscoder +// +//--------------------------------------------------------------------------- +class XMLUTIL_EXPORT CygwinLCPTranscoder : public XMLLCPTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + CygwinLCPTranscoder(); + ~CygwinLCPTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + CygwinLCPTranscoder(const CygwinLCPTranscoder&); + CygwinLCPTranscoder& operator=(const CygwinLCPTranscoder&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/IconvFBSD/IconvFBSDTransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/IconvFBSD/IconvFBSDTransService.hpp @@ -0,0 +1,374 @@ +/* + * Copyright 2001,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: IconvFBSDTransService.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef ICONVFBSDTRANSSERVICE_HPP +#define ICONVFBSDTRANSSERVICE_HPP + +#include + +#ifdef XML_USE_LIBICONV +# include +#endif + +XERCES_CPP_NAMESPACE_BEGIN + +#ifdef XML_USE_LIBICONV + +// --------------------------------------------------------------------------- +// Libiconv wrapper (low-level conversion utilities collection) +// --------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvFBSDCD +{ +public: + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvFBSDCD + ( + iconv_t cd_from, + iconv_t cd_to, + size_t uchsize, + unsigned int ubo + ); + virtual ~IconvFBSDCD(); + + // Convert "native unicode" character into XMLCh + void mbcToXMLCh (const char *mbc, XMLCh *toRet) const; + + // Convert XMLCh into "native unicode" character + void xmlChToMbc (XMLCh xch, char *mbc) const; + + // Return uppercase equivalent for XMLCh + XMLCh toUpper (const XMLCh ch) const; + + // Return uppercase equivalent for XMLCh + XMLCh toLower (const XMLCh ch) const; + + // Check if passed characters belongs to the :space: class + virtual bool isSpace(const XMLCh toCheck) const; + + // Fill array of XMLCh characters with data, supplyed in the array + // of "native unicode" characters. + XMLCh* mbsToXML ( + const char* mbs_str, + size_t mbs_cnt, + XMLCh* xml_str, + size_t xml_cnt + ) const; + + + // Fill array of "native unicode" characters with data, supplyed + // in the array of XMLCh characters. + char* xmlToMbs + ( + const XMLCh* xml_str, + size_t xml_cnt, + char* mbs_str, + size_t mbs_cnt + ) const; + + // Wrapper aroung the iconv() for transcoding from the local charset + size_t iconvFrom + ( + const char *fromPtr, + size_t *fromLen, + char **toPtr, + size_t toLen + ) const; + + // Wrapper aroung the iconv() for transcoding to the local charset + size_t iconvTo + ( + const char *fromPtr, + size_t *fromLen, + char **toPtr, + size_t toLen + ) const; + + // Private data accessors + inline iconv_t cdTo () const { return fCDTo; } + inline iconv_t cdFrom () const { return fCDFrom; } + inline size_t uChSize () const { return fUChSize; } + inline unsigned int UBO () const { return fUBO; } + +protected: + + // Hiden defaull constructor + IconvFBSDCD(); + + // Private data accessors + inline void setCDTo (iconv_t cd) { fCDTo = cd; } + inline void setCDFrom (iconv_t cd) { fCDFrom = cd; } + inline void setUChSize (size_t sz) { fUChSize = sz; } + inline void setUBO (unsigned int u) { fUBO = u; } + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvFBSDCD(const IconvFBSDCD&); + IconvFBSDCD& operator=(const IconvFBSDCD&); + + // ----------------------------------------------------------------------- + // Private data members + // + // fCDTo + // Characterset conversion descriptor TO the local-host encoding + // fCDFrom + // Characterset conversion descriptor FROM the local-host encoding + // fUChSize + // Sizeof the "native unicode" character in bytes + // fUBO + // "Native unicode" characters byte order + // ----------------------------------------------------------------------- + size_t fUChSize; + unsigned int fUBO; + iconv_t fCDTo; + iconv_t fCDFrom; +}; + +#endif /* XML_USE_LIBICONV */ + + + +// --------------------------------------------------------------------------- +// FreeBSD-specific Transcoding Service implementation +// --------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvFBSDTransService : public XMLTransService +#ifdef XML_USE_LIBICONV +, IconvFBSDCD +#endif +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvFBSDTransService(); + ~IconvFBSDTransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toUpperCase) const; + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvFBSDTransService(const IconvFBSDTransService&); + IconvFBSDTransService& operator=(const IconvFBSDTransService&); + +#ifdef XML_USE_LIBICONV + + // ----------------------------------------------------------------------- + // Private data members + // + // fUnicodeCP + // Unicode encoding schema name + // ----------------------------------------------------------------------- + const char* fUnicodeCP; + +#endif /* XML_USE_LIBICONV */ +}; + + +#ifdef XML_USE_LIBICONV +//---------------------------------------------------------------------------- +// Implementation of the transcoders for arbitrary input characterset is +// supported ONLY through libiconv interface +//---------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvFBSDTranscoder : public XMLTranscoder, IconvFBSDCD +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvFBSDTranscoder(const XMLCh* const encodingName + , const unsigned int blockSize + , iconv_t cd_from + , iconv_t cd_to + , size_t uchsize + , unsigned int ubo + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + ~IconvFBSDTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvFBSDTranscoder(); + IconvFBSDTranscoder(const IconvFBSDTranscoder&); + IconvFBSDTranscoder& operator=(const IconvFBSDTranscoder&); +}; + +#endif /* XML_USE_LIBICONV */ + + +// --------------------------------------------------------------------------- +// FreeBSD-specific XMLCh <-> local (host) characterset transcoder +// --------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvFBSDLCPTranscoder : public XMLLCPTranscoder +#ifdef XML_USE_LIBICONV +, IconvFBSDCD +#endif +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- +#ifdef XML_USE_LIBICONV + + IconvFBSDLCPTranscoder + ( + iconv_t from, + iconv_t to, + size_t uchsize, + unsigned int ubo + ); + +protected: + IconvFBSDLCPTranscoder(); // Unimplemented + +public: + +#else /* !XML_USE_LIBICONV */ + + IconvFBSDLCPTranscoder(); + +#endif /* XML_USE_LIBICONV */ + + ~IconvFBSDLCPTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxBytes + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvFBSDLCPTranscoder(const IconvFBSDLCPTranscoder&); + IconvFBSDLCPTranscoder& operator=(const IconvFBSDLCPTranscoder&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif /* ICONVFBSDTRANSSERVICE */ --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Iconv/IconvTransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Iconv/IconvTransService.hpp @@ -0,0 +1,141 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: IconvTransService.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef ICONVTRANSSERVICE_HPP +#define ICONVTRANSSERVICE_HPP + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class XMLUTIL_EXPORT IconvTransService : public XMLTransService +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvTransService(); + ~IconvTransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toLowerCase) const; + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvTransService(const IconvTransService&); + IconvTransService& operator=(const IconvTransService&); +}; + + +class XMLUTIL_EXPORT IconvLCPTranscoder : public XMLLCPTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvLCPTranscoder(); + ~IconvLCPTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxBytes + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvLCPTranscoder(const IconvLCPTranscoder&); + IconvLCPTranscoder& operator=(const IconvLCPTranscoder&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.hpp @@ -0,0 +1,352 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: IconvGNUTransService.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef ICONVGNUTRANSSERVICE_HPP +#define ICONVGNUTRANSSERVICE_HPP + +#include + + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// --------------------------------------------------------------------------- +// Libiconv wrapper (low-level conversion utilities collection) +// --------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvGNUWrapper +{ +public: + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvGNUWrapper + ( + iconv_t cd_from, + iconv_t cd_to, + size_t uchsize, + unsigned int ubo + ); + virtual ~IconvGNUWrapper(); + + // Convert "native unicode" character into XMLCh + void mbcToXMLCh (const char *mbc, XMLCh *toRet) const; + + // Convert XMLCh into "native unicode" character + void xmlChToMbc (XMLCh xch, char *mbc) const; + + // Return uppercase equivalent for XMLCh + XMLCh toUpper (const XMLCh ch) const; + + // Return uppercase equivalent for XMLCh + XMLCh toLower (const XMLCh ch) const; + + // Check if passed characters belongs to the :space: class + virtual bool isSpace(const XMLCh toCheck) const; + + // Fill array of XMLCh characters with data, supplyed in the array + // of "native unicode" characters. + XMLCh* mbsToXML ( + const char* mbs_str, + size_t mbs_cnt, + XMLCh* xml_str, + size_t xml_cnt + ) const; + + + // Fill array of "native unicode" characters with data, supplyed + // in the array of XMLCh characters. + char* xmlToMbs + ( + const XMLCh* xml_str, + size_t xml_cnt, + char* mbs_str, + size_t mbs_cnt + ) const; + + // Wrapper aroung the iconv() for transcoding from the local charset + size_t iconvFrom + ( + const char *fromPtr, + size_t *fromLen, + char **toPtr, + size_t toLen + ) const; + + // Wrapper aroung the iconv() for transcoding to the local charset + size_t iconvTo + ( + const char *fromPtr, + size_t *fromLen, + char **toPtr, + size_t toLen + ) const; + + // Private data accessors + inline iconv_t cdTo () const { return fCDTo; } + inline iconv_t cdFrom () const { return fCDFrom; } + inline size_t uChSize () const { return fUChSize; } + inline unsigned int UBO () const { return fUBO; } + +protected: + + // Hiden defaull constructor + IconvGNUWrapper(); + + // Private data accessors + inline void setCDTo (iconv_t cd) { fCDTo = cd; } + inline void setCDFrom (iconv_t cd) { fCDFrom = cd; } + inline void setUChSize (size_t sz) { fUChSize = sz; } + inline void setUBO (unsigned int u) { fUBO = u; } + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvGNUWrapper(const IconvGNUWrapper&); + IconvGNUWrapper& operator=(const IconvGNUWrapper&); + + // ----------------------------------------------------------------------- + // Private data members + // + // fCDTo + // Characterset conversion descriptor TO the local-host encoding + // fCDFrom + // Characterset conversion descriptor FROM the local-host encoding + // fUChSize + // Sizeof the "native unicode" character in bytes + // fUBO + // "Native unicode" characters byte order + // ----------------------------------------------------------------------- + size_t fUChSize; + unsigned int fUBO; + iconv_t fCDTo; + iconv_t fCDFrom; +}; + + + +// --------------------------------------------------------------------------- +// FreeBSD-specific Transcoding Service implementation +// --------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvGNUTransService : public XMLTransService, IconvGNUWrapper +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvGNUTransService(); + ~IconvGNUTransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toUpperCase) const; + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvGNUTransService(const IconvGNUTransService&); + IconvGNUTransService& operator=(const IconvGNUTransService&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fUnicodeCP + // Unicode encoding schema name + // ----------------------------------------------------------------------- + const char* fUnicodeCP; + +}; + + +//---------------------------------------------------------------------------- +// Implementation of the transcoders for arbitrary input characterset is +// supported ONLY through libiconv interface +//---------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvGNUTranscoder : public XMLTranscoder, IconvGNUWrapper +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + IconvGNUTranscoder(const XMLCh* const encodingName + , const unsigned int blockSize + , iconv_t cd_from + , iconv_t cd_to + , size_t uchsize + , unsigned int ubo + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + ~IconvGNUTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvGNUTranscoder(); + IconvGNUTranscoder(const IconvGNUTranscoder&); + IconvGNUTranscoder& operator=(const IconvGNUTranscoder&); +}; + + +// --------------------------------------------------------------------------- +// GNU-specific XMLCh <-> local (host) characterset transcoder +// --------------------------------------------------------------------------- + +class XMLUTIL_EXPORT IconvGNULCPTranscoder : public XMLLCPTranscoder, IconvGNUWrapper +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + + IconvGNULCPTranscoder + ( + iconv_t from, + iconv_t to, + size_t uchsize, + unsigned int ubo + ); + +protected: + IconvGNULCPTranscoder(); // Unimplemented + +public: + + ~IconvGNULCPTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxBytes + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + IconvGNULCPTranscoder(const IconvGNULCPTranscoder&); + IconvGNULCPTranscoder& operator=(const IconvGNULCPTranscoder&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif /* ICONVGNUTRANSSERVICE */ + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.hpp @@ -0,0 +1,278 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacOSUnicodeConverter.hpp 176306 2005-02-11 22:42:25Z jberry $ + */ + +#ifndef MACOSUNICODECONVERTER_HPP +#define MACOSUNICODECONVERTER_HPP + +#include +#include +#include + +#if defined(__APPLE__) + // Framework includes from ProjectBuilder + #include +#else + // Classic includes otherwise + #include +#endif + +XERCES_CPP_NAMESPACE_BEGIN + +// +// The transcoding service has to provide a couple of required string +// and character operations, but its most important service is the creation +// of transcoder objects. There are two types of transcoders, which are +// discussed below in the XMLTranscoder class' description. +// +class XMLUTIL_EXPORT MacOSUnicodeConverter : public XMLTransService +{ +public : + // ----------------------------------------------------------------------- + // Public Constructors and Destructor + // ----------------------------------------------------------------------- + ~MacOSUnicodeConverter(); + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toLowerCase) const; + +protected : + // ----------------------------------------------------------------------- + // Hidden constructors + // ----------------------------------------------------------------------- + MacOSUnicodeConverter(); + + // ----------------------------------------------------------------------- + // Protected virtual methods + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , TextEncoding textEncoding + , MemoryManager* const manager + ); + + // Sniff for available functionality + static bool IsMacOSUnicodeConverterSupported(void); + + +private : + friend class XMLPlatformUtils; + + static const XMLCh fgMyServiceId[]; // Name of the our unicode converter + static const XMLCh fgMacLCPEncodingName[]; // Name of the LCP transcoder we create + + bool fHasUnicodeCollation; // True if unicode collation is available + CollatorRef fCollator; // Our collator + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + MacOSUnicodeConverter(const MacOSUnicodeConverter&); + MacOSUnicodeConverter& operator=(const MacOSUnicodeConverter&); + + // ----------------------------------------------------------------------- + // Private methods + // ----------------------------------------------------------------------- + void ConvertWideToNarrow(const XMLCh* wide, char* narrow, std::size_t maxChars); + + // Figure out what text encoding to use for LCP transcoder + TextEncoding discoverLCPEncoding(); + +}; + + +// +// This type of transcoder is for non-local code page encodings, i.e. +// named encodings. These are used internally by the scanner to internalize +// raw XML into the internal Unicode format, and by writer classes to +// convert that internal Unicode format (which comes out of the parser) +// back out to a format that the receiving client code wants to use. +// +class XMLUTIL_EXPORT MacOSTranscoder : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + MacOSTranscoder( + const XMLCh* const encodingName, + TECObjectRef textToUnicode, + TECObjectRef unicodeToText, + const unsigned int blockSize, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + ~MacOSTranscoder(); + + + // ----------------------------------------------------------------------- + // The virtual transcoding interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + MacOSTranscoder(const MacOSTranscoder&); + MacOSTranscoder& operator=(const MacOSTranscoder&); + + // ----------------------------------------------------------------------- + // Private members + // ----------------------------------------------------------------------- + TECObjectRef mTextToUnicode; + TECObjectRef mUnicodeToText; +}; + + + +// +// This class is a specialized transcoder that only transcodes between +// the internal XMLCh format and the local code page. It is specialized +// for the very common job of translating data from the client app's +// native code page to the internal format and vice versa. +// +class XMLUTIL_EXPORT MacOSLCPTranscoder : public XMLLCPTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + MacOSLCPTranscoder(XMLTranscoder* const transcoder, MemoryManager* const manager); + ~MacOSLCPTranscoder(); + + + // ----------------------------------------------------------------------- + // The virtual transcoder API + // + // NOTE: All these APIs don't include null terminator characters in + // their parameters. So calcRequiredSize() returns the number + // of actual chars, not including the null. maxBytes and maxChars + // parameters refer to actual chars, not including the null so + // its assumed that the buffer is physically one char or byte + // larger. + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + MacOSLCPTranscoder(const MacOSLCPTranscoder&); + MacOSLCPTranscoder& operator=(const MacOSLCPTranscoder&); + + // ----------------------------------------------------------------------- + // Private data members + // ----------------------------------------------------------------------- + XMLTranscoder* const mTranscoder; + MemoryManager* const mManager; + XMLMutex mMutex; // Mutex to enable rentrancy of LCP transcoder + }; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Iconv390/Iconv390TransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Iconv390/Iconv390TransService.hpp @@ -0,0 +1,153 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: Iconv390TransService.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef ICONV390TRANSSERVICE_HPP +#define ICONV390TRANSSERVICE_HPP + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +/* Max encoding name in characters. */ +#define UCNV_MAX_CONVERTER_NAME_LENGTH 60 +typedef struct iconvconverter { + struct iconvconverter *nextconverter; + char name [UCNV_MAX_CONVERTER_NAME_LENGTH]; + XMLMutex fMutex; + iconv_t fIconv390Descriptor; + int usecount; +} iconvconverter_t; + +class XMLUTIL_EXPORT Iconv390TransService : public XMLTransService +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Iconv390TransService(); + ~Iconv390TransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toLowerCase) const; + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Iconv390TransService(const Iconv390TransService&); + Iconv390TransService& operator=(const Iconv390TransService&); +}; + +class XMLUTIL_EXPORT Iconv390LCPTranscoder : public XMLLCPTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Iconv390LCPTranscoder(); + Iconv390LCPTranscoder(iconvconverter_t* const toAdopt); + ~Iconv390LCPTranscoder(); + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxBytes + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Iconv390LCPTranscoder(const Iconv390LCPTranscoder&); + Iconv390LCPTranscoder& operator=(const Iconv390LCPTranscoder&); + iconvconverter_t *converter; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLWin1252Transcoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLWin1252Transcoder390.hpp @@ -0,0 +1,62 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XMLWin1252Transcoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XMLWIN1252TRANSCODER390_HPP +#define XMLWIN1252TRANSCODER390_HPP + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +// +// This class provides an implementation of the XMLTranscoder interface +// for the Windows variant of Latin1, called Windows-1252. Its close to +// Latin1, but is somewhat different. +// +class XMLUTIL_EXPORT XMLWin1252Transcoder390 : public XML256TableTranscoder390 +{ +public : + // ----------------------------------------------------------------------- + // Public constructors and destructor + // ----------------------------------------------------------------------- + XMLWin1252Transcoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual ~XMLWin1252Transcoder390(); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XMLWin1252Transcoder390(); + XMLWin1252Transcoder390(const XMLWin1252Transcoder390&); + XMLWin1252Transcoder390& operator=(const XMLWin1252Transcoder390&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/Uniconv390TransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/Uniconv390TransService.hpp @@ -0,0 +1,242 @@ +/* + * Copyright 2002-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: Uniconv390TransService.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#ifndef UNICONV390TRANSSERVICE_HPP +#define UNICONV390TRANSSERVICE_HPP + +#include +#include +#include +#include "uniconv.h" + +XERCES_CPP_NAMESPACE_BEGIN + +typedef struct uniconvconverter { + XMLMutex fMutex; + uniconv_t fIconv390DescriptorFrom; + uniconv_t fIconv390DescriptorTo; +} uniconvconverter_t; + +typedef struct uniconvcaseconverter { + XMLMutex fcaseMutex; + uniconv_t ftoupperhand; + uniconv_t ftolowerhand; +} uniconvcaseconverter_t; + +class XMLUTIL_EXPORT Uniconv390TransService : public XMLTransService +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Uniconv390TransService(); + ~Uniconv390TransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toLowerCase) const; + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + + virtual void initTransService(); + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Uniconv390TransService(const Uniconv390TransService&); + Uniconv390TransService& operator=(const Uniconv390TransService&); + ICUTransService * fICUService; + XMLLCPTranscoder* fLCPTranscoder; + uniconvcaseconverter_t *fCaseConverter; +}; + + + +class XMLUTIL_EXPORT Uniconv390Transcoder : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Uniconv390Transcoder + ( + const XMLCh* const encodingName + , uniconvconverter_t* const toAdopt + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + ~Uniconv390Transcoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Uniconv390Transcoder(); + Uniconv390Transcoder(const Uniconv390Transcoder&); + Uniconv390Transcoder& operator=(const Uniconv390Transcoder&); + + ICUTranscoder * fICUTranscoder; + + // ----------------------------------------------------------------------- + // Private data members + // + // fConverter + // This is a pointer to the converter structure that this transcoder + // uses. + // + // ----------------------------------------------------------------------- + uniconvconverter_t *fConverter; +}; + + +class XMLUTIL_EXPORT Uniconv390LCPTranscoder : public XMLLCPTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Uniconv390LCPTranscoder( uniconvconverter_t* const toAdopt); + ~Uniconv390LCPTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Uniconv390LCPTranscoder(); + Uniconv390LCPTranscoder(const Uniconv390LCPTranscoder&); + Uniconv390LCPTranscoder& operator=(const Uniconv390LCPTranscoder&); + + ICULCPTranscoder * fICULCPTranscoder; + + // ----------------------------------------------------------------------- + // Private data members + // + // fConverter + // This is a pointer to the converter structure that this transcoder + // uses. + // ----------------------------------------------------------------------- + uniconvconverter_t *fConverter; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLIBM1140Transcoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLIBM1140Transcoder390.hpp @@ -0,0 +1,70 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XMLIBM1140Transcoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XMLIBM1140TRANSCODER390_HPP +#define XMLIBM1140TRANSCODER390_HPP + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class provides an implementation of the XMLTranscoder interface +// for a simple ibm-1140 transcoder. The parser does some encodings +// intrinsically without depending upon external transcoding services. +// To make everything more orthagonal, we implement these internal +// transcoders using the same transcoder abstraction as the pluggable +// transcoding services do. +// +class XMLUTIL_EXPORT XMLIBM1140Transcoder390 : public XML256TableTranscoder390 +{ +public : + // ----------------------------------------------------------------------- + // Public, static methods + // ----------------------------------------------------------------------- + static XMLCh xlatThisOne(const XMLByte toXlat); + + + // ----------------------------------------------------------------------- + // Public constructors and destructor + // ----------------------------------------------------------------------- + XMLIBM1140Transcoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual ~XMLIBM1140Transcoder390(); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XMLIBM1140Transcoder390(); + XMLIBM1140Transcoder390(const XMLIBM1140Transcoder390&); + XMLIBM1140Transcoder390& operator=(const XMLIBM1140Transcoder390&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XML88591Transcoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XML88591Transcoder390.hpp @@ -0,0 +1,92 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XML88591Transcoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XML88591TRANSCODER390_HPP +#define XML88591TRANSCODER390_HPP + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class provides an implementation of the XMLTranscoder interface +// for a simple 8859-1 transcoder. The parser does some encodings +// intrinsically without depending upon external transcoding services. +// To make everything more orthagonal, we implement these internal +// transcoders using the same transcoder abstraction as the pluggable +// transcoding services do. +// +class XMLUTIL_EXPORT XML88591Transcoder390 : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Public constructors and destructor + // ----------------------------------------------------------------------- + XML88591Transcoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual ~XML88591Transcoder390(); + + + // ----------------------------------------------------------------------- + // Implementation of the XMLTranscoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XML88591Transcoder390(const XML88591Transcoder390&); + XML88591Transcoder390& operator=(const XML88591Transcoder390&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLIBM1047Transcoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLIBM1047Transcoder390.hpp @@ -0,0 +1,71 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XMLIBM1047Transcoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XMLIBM1047TRANSCODER390_HPP +#define XMLIBM1047TRANSCODER390_HPP + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class provides an implementation of the XMLTranscoder interface +// for a simple 1047-US transcoder. The parser does some encodings +// intrinsically without depending upon external transcoding services. +// To make everything more orthagonal, we implement these internal +// transcoders using the same transcoder abstraction as the pluggable +// transcoding services do. +// +// +class XMLUTIL_EXPORT XMLIBM1047Transcoder390 : public XML256TableTranscoder390 +{ +public : + // ----------------------------------------------------------------------- + // Public, static methods + // ----------------------------------------------------------------------- + static XMLCh xlatThisOne(const XMLByte toXlat); + + + // ----------------------------------------------------------------------- + // Public constructors and destructor + // ----------------------------------------------------------------------- + XMLIBM1047Transcoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual ~XMLIBM1047Transcoder390(); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XMLIBM1047Transcoder390(); + XMLIBM1047Transcoder390(const XMLIBM1047Transcoder390&); + void operator=(const XMLIBM1047Transcoder390&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XML256TableTranscoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XML256TableTranscoder390.hpp @@ -0,0 +1,145 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XML256TableTranscoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XML256TABLETRANSCODER390_HPP +#define XML256TABLETRANSCODER390_HPP + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class implements the functionality of a common type of transcoder +// for an 8 bit, single byte encoding based on a set of 'to' and 'from' +// translation tables. Actual derived classes are trivial and just have to +// provide us with pointers to their tables and we do all the work. +// +class XMLUTIL_EXPORT XML256TableTranscoder390 : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Public constructors and destructor + // ----------------------------------------------------------------------- + virtual ~XML256TableTranscoder390(); + + + // ----------------------------------------------------------------------- + // The virtual transcoding interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + +protected : + // ----------------------------------------------------------------------- + // Hidden constructors + // ----------------------------------------------------------------------- + XML256TableTranscoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , const XMLCh* const fromTable + , const XMLTransService::TransRec* const toTable + , const unsigned int toTableSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + + // ----------------------------------------------------------------------- + // Protected helper methods + // ----------------------------------------------------------------------- + XMLByte xlatOneTo + ( + const XMLCh toXlat + ) const; + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XML256TableTranscoder390(); + XML256TableTranscoder390(const XML256TableTranscoder390&); + XML256TableTranscoder390& operator=(const XML256TableTranscoder390&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fFromTable + // This is the 'from' table that we were given during construction. + // It is a 256 entry table of XMLCh chars. Each entry is the + // Unicode code point for the external encoding point of that value. + // So fFromTable[N] is the Unicode translation of code point N of + // the source encoding. + // + // We don't own this table, we just refer to it. It is assumed that + // the table is static, for performance reasons. + // + // fToSize + // The 'to' table is variable sized. This indicates how many records + // are in it. + // + // fToTable + // This is a variable sized table of TransRec structures. It must + // be sorted by the intCh field, i.e. the XMLCh field. It is searched + // binarily to find the record for a particular Unicode char. Then + // that record's extch field is the translation record. + // + // We don't own this table, we just refer to it. It is assumed that + // the table is static, for performance reasons. + // + // NOTE: There may be dups of the extCh field, since there might be + // multiple Unicode code points which map to the same external code + // point. Normally this won't happen, since the parser assumes that + // internalization is normalized, but we have to be prepared to do + // the right thing if some client code gives us non-normalized data + // itself. + // ----------------------------------------------------------------------- + const XMLCh* fFromTable; + unsigned int fToSize; + const XMLTransService::TransRec* fToTable; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLASCIITranscoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLASCIITranscoder390.hpp @@ -0,0 +1,92 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XMLASCIITranscoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XMLASCIITRANSCODER390_HPP +#define XMLASCIITRANSCODER390_HPP + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class provides an implementation of the XMLTranscoder interface +// for a simple ASCII transcoder. The parser does some encodings +// intrinsically without depending upon external transcoding services. +// To make everything more orthagonal, we implement these internal +// transcoders using the same transcoder abstraction as the pluggable +// transcoding services do. +// +class XMLUTIL_EXPORT XMLASCIITranscoder390 : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and destructor + // ----------------------------------------------------------------------- + XMLASCIITranscoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual ~XMLASCIITranscoder390(); + + + // ----------------------------------------------------------------------- + // Implementation of the XMLTranscoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XMLASCIITranscoder390(const XMLASCIITranscoder390&); + XMLASCIITranscoder390& operator=(const XMLASCIITranscoder390&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLEBCDICTranscoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLEBCDICTranscoder390.hpp @@ -0,0 +1,72 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XMLEBCDICTranscoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XMLEBCDICTRANSCODER390_HPP +#define XMLEBCDICTRANSCODER390_HPP + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class provides an implementation of the XMLTranscoder interface +// for a simple EBCDIC-US transcoder. The parser does some encodings +// intrinsically without depending upon external transcoding services. +// To make everything more orthagonal, we implement these internal +// transcoders using the same transcoder abstraction as the pluggable +// transcoding services do. +// +// EBCDIC-US is the same as IBM037, CP37, EBCDIC-CP-US, etc... +// +class XMLUTIL_EXPORT XMLEBCDICTranscoder390 : public XML256TableTranscoder390 +{ +public : + // ----------------------------------------------------------------------- + // Public, static methods + // ----------------------------------------------------------------------- + static XMLCh xlatThisOne(const XMLByte toXlat); + + + // ----------------------------------------------------------------------- + // Public constructors and destructor + // ----------------------------------------------------------------------- + XMLEBCDICTranscoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual ~XMLEBCDICTranscoder390(); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XMLEBCDICTranscoder390(); + XMLEBCDICTranscoder390(const XMLEBCDICTranscoder390&); + XMLEBCDICTranscoder390& operator=(const XMLEBCDICTranscoder390&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLUTF8Transcoder390.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Uniconv390/XMLUTF8Transcoder390.hpp @@ -0,0 +1,117 @@ +/* + * Copyright 2004,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XMLUTF8Transcoder390.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef XMLUTF8TRANSCODER390_HPP +#define XMLUTF8TRANSCODER390_HPP + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class provides an implementation of the XMLTranscoder interface +// for a simple UTF8 transcoder. The parser does some encodings +// intrinsically without depending upon external transcoding services. +// To make everything more orthagonal, we implement these internal +// transcoders using the same transcoder abstraction as the pluggable +// transcoding services do. +// +class XMLUTIL_EXPORT XMLUTF8Transcoder390 : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Public constructors and destructor + // ----------------------------------------------------------------------- + XMLUTF8Transcoder390 + ( + const XMLCh* const encodingName + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual ~XMLUTF8Transcoder390(); + + + // ----------------------------------------------------------------------- + // Implementation of the XMLTranscoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + +private : + + inline void checkTrailingBytes( + const XMLByte toCheck + , const unsigned int trailingBytes + , const unsigned int position + ) const; + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XMLUTF8Transcoder390(const XMLUTF8Transcoder390&); + XMLUTF8Transcoder390& operator=(const XMLUTF8Transcoder390&); +}; + +inline +void XMLUTF8Transcoder390::checkTrailingBytes(const XMLByte toCheck + , const unsigned int trailingBytes + , const unsigned int position) const +{ + + if((toCheck & 0xC0) != 0x80) + { + char len[2] = {(char)(trailingBytes+0x31), 0}; + char pos[2] = {(char)(position+0x31), 0}; + char byte[2] = {toCheck,0}; + ThrowXMLwithMemMgr3(UTFDataFormatException, XMLExcepts::UTF8_FormatError, pos, byte, len, getMemoryManager()); + } + +} + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/Transcoders/Win32/Win32TransService.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/Transcoders/Win32/Win32TransService.hpp @@ -0,0 +1,256 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: Win32TransService.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#ifndef WIN32TRANSSERVICE_HPP +#define WIN32TRANSSERVICE_HPP + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class CPMapEntry; + + + +//--------------------------------------------------------------------------- +// +// class Win32TransService +// +//--------------------------------------------------------------------------- +class XMLUTIL_EXPORT Win32TransService : public XMLTransService +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Win32TransService(); + virtual ~Win32TransService(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoding service API + // ----------------------------------------------------------------------- + virtual int compareIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + ); + + virtual int compareNIString + ( + const XMLCh* const comp1 + , const XMLCh* const comp2 + , const unsigned int maxChars + ); + + virtual const XMLCh* getId() const; + + virtual bool isSpace(const XMLCh toCheck) const; + + virtual XMLLCPTranscoder* makeNewLCPTranscoder(); + + virtual bool supportsSrcOfs() const; + + virtual void upperCase(XMLCh* const toUpperCase) const; + virtual void lowerCase(XMLCh* const toLowerCase) const; + + +protected : + // ----------------------------------------------------------------------- + // Protected virtual methods, implemented in Win32TransService2.cpp + // ----------------------------------------------------------------------- + virtual XMLTranscoder* makeNewXMLTranscoder + ( + const XMLCh* const encodingName + , XMLTransService::Codes& resValue + , const unsigned int blockSize + , MemoryManager* const manager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Win32TransService(const Win32TransService&); + Win32TransService& operator=(const Win32TransService&); + + // This is a hash table of entries which map encoding names to their + // Windows specific code pages. The code page allows us to create + // transcoders for those encodings. The encoding names come from XML + // files. + // + // This map is shared unsynchronized among all threads of the process, + // which is cool since it will be read only once its initialized. + + + + static bool isAlias(const HKEY encodingKey + , char* const aliasBuf = 0 + , const unsigned int nameBufSz = 0); + + + RefHashTableOf *fCPMap; +}; + + + + + + + +//--------------------------------------------------------------------------- +// +// class Win32Transcoder +// +//--------------------------------------------------------------------------- + +class XMLUTIL_EXPORT Win32Transcoder : public XMLTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Win32Transcoder + ( + const XMLCh* const encodingName + , const unsigned int winCP + , const unsigned int ieCP + , const unsigned int blockSize + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + ~Win32Transcoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int transcodeFrom + ( + const XMLByte* const srcData + , const unsigned int srcCount + , XMLCh* const toFill + , const unsigned int maxChars + , unsigned int& bytesEaten + , unsigned char* const charSizes + ); + + virtual unsigned int transcodeTo + ( + const XMLCh* const srcData + , const unsigned int srcCount + , XMLByte* const toFill + , const unsigned int maxBytes + , unsigned int& charsEaten + , const UnRepOpts options + ); + + virtual bool canTranscodeTo + ( + const unsigned int toCheck + ) const; + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Win32Transcoder(const Win32Transcoder&); + Win32Transcoder& operator=(const Win32Transcoder&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fIECP + // This is the internet explorer code page for this encoding. + // + // fWinCP + // This is the windows code page for this encoding. + // ----------------------------------------------------------------------- + unsigned int fIECP; + unsigned int fWinCP; +}; + + + + + +//--------------------------------------------------------------------------- +// +// class Win32LCPTranscoder +// +//--------------------------------------------------------------------------- +class XMLUTIL_EXPORT Win32LCPTranscoder : public XMLLCPTranscoder +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + Win32LCPTranscoder(); + ~Win32LCPTranscoder(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual transcoder interface + // ----------------------------------------------------------------------- + virtual unsigned int calcRequiredSize(const char* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual unsigned int calcRequiredSize(const XMLCh* const srcText + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + virtual char* transcode(const XMLCh* const toTranscode); + virtual char* transcode(const XMLCh* const toTranscode, + MemoryManager* const manager); + + virtual XMLCh* transcode(const char* const toTranscode); + virtual XMLCh* transcode(const char* const toTranscode, + MemoryManager* const manager); + + virtual bool transcode + ( + const char* const toTranscode + , XMLCh* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool transcode + ( + const XMLCh* const toTranscode + , char* const toFill + , const unsigned int maxChars + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Win32LCPTranscoder(const Win32LCPTranscoder&); + Win32LCPTranscoder& operator=(const Win32LCPTranscoder&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/libWWW/LibWWWNetAccessor.hpp @@ -0,0 +1,63 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: LibWWWNetAccessor.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +#if !defined(LIBWWWNETACCESSOR_HPP) +#define LIBWWWNETACCESSOR_HPP + + +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class is the wrapper for the libWWW library which provides +// support for HTTP and other network protocols, so that URL's using +// these protocols can be used in system id's in the XML decl clauses. +// + +class XMLUTIL_EXPORT LibWWWNetAccessor : public XMLNetAccessor +{ +public : + LibWWWNetAccessor(); + ~LibWWWNetAccessor(); + + BinInputStream* makeNew(const XMLURL& urlSource, const XMLNetHTTPInfo* httpInfo=0); + const XMLCh* getId() const; + +private : + static const XMLCh fgMyName[]; + + LibWWWNetAccessor(const LibWWWNetAccessor&); + LibWWWNetAccessor& operator=(const LibWWWNetAccessor&); + +}; // LibWWWNetAccessor + +inline const XMLCh* LibWWWNetAccessor::getId() const +{ + return fgMyName; +} + +XERCES_CPP_NAMESPACE_END + +#endif // LIBWWWNETACCESSOR_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/libWWW/BinURLInputStream.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/libWWW/BinURLInputStream.hpp @@ -0,0 +1,105 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: BinURLInputStream.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#if !defined(BINURLINPUTSTREAM_HPP) +#define BINURLINPUTSTREAM_HPP + + +#include +#include +#include + +// +// Forward reference the libWWW constructs here, so as to avoid including +// any of the libWWW headers in this file. Just being careful in isolating +// the files that explicitly need to include the libWWW headers. +// + +struct _HTAnchor; + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class implements the BinInputStream interface specified by the XML +// parser. +// + +class XMLUTIL_EXPORT BinURLInputStream : public BinInputStream +{ +public : + BinURLInputStream(const XMLURL& urlSource); + ~BinURLInputStream(); + + unsigned int curPos() const; + unsigned int readBytes + ( + XMLByte* const toFill + , const unsigned int maxToRead + ); + void reset(); + unsigned int bytesAvail() const; + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + BinURLInputStream(const BinURLInputStream&); + BinURLInputStream& operator=(const BinURLInputStream&); + + // ----------------------------------------------------------------------- + // Private data members + // + // fAnchor + // This is the handle that LibWWW returns for the remote file that + // is being addressed. + // fBuffer + // This is the array in which the data is stored after reading it + // of the network. The maximum size of this array is decided in the + // constructor via a file specific #define. + // fBufferIndex + // Its the index into fBuffer and points to the next unprocessed + // character. When the parser asks for more data to be read of the + // stream, then fBuffer[fBufferIndex] is the first byte returned, + // unless fBufferIndex equals fBufferSize indicating that all + // data in the fBuffer has been processed. + // fBufferSize + // This represents the extent of valid data in the fBuffer array. + // fRemoteFileSize + // This stores the size in bytes of the remote file addressed by + // this URL input stream. + // fBytesProcessed + // Its a rolling count of the number of bytes processed off this + // input stream. Its only reset back to zero, if the stream is + // reset. The maximum value this can have is fRemoteFileSize. + // ----------------------------------------------------------------------- + + struct _HTAnchor* fAnchor; + XMLByte* fBuffer; + unsigned int fBufferIndex; + unsigned int fBufferSize; + int fRemoteFileSize; + unsigned int fBytesProcessed; + MemoryManager* fMemoryManager; +}; + +XERCES_CPP_NAMESPACE_END + +#endif // BINURLINPUTSTREAM_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccessCF/URLAccessCFBinInputStream.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccessCF/URLAccessCFBinInputStream.hpp @@ -0,0 +1,73 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: URLAccessCFBinInputStream.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#if !defined(URLACCESSCFBININPUTSTREAM_HPP) +#define URLACCESSCFBININPUTSTREAM_HPP + + +#include +#include +#include + +#if defined(__APPLE__) + // Framework includes from ProjectBuilder + #include +#else + // Classic includes otherwise + #include + #include +#endif + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class implements the BinInputStream interface specified by the XML +// parser. +// + +class XMLUTIL_EXPORT URLAccessCFBinInputStream : public BinInputStream +{ +public : + URLAccessCFBinInputStream(const XMLURL& urlSource); + ~URLAccessCFBinInputStream(); + + unsigned int curPos() const; + unsigned int readBytes + ( + XMLByte* const toFill + , const unsigned int maxToRead + ); + + +private : + CFDataRef mDataRef; + CFIndex mBytesProcessed; +}; + + +inline unsigned int +URLAccessCFBinInputStream::curPos() const +{ + return mBytesProcessed; +} + +XERCES_CPP_NAMESPACE_END + +#endif // URLACCESSCFBININPUTSTREAM_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccessCF/MacOSURLAccessCF.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccessCF/MacOSURLAccessCF.hpp @@ -0,0 +1,66 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacOSURLAccessCF.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + + +#if !defined(MACOSURLACCESSCF_HPP) +#define MACOSURLACCESSCF_HPP + + +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class is the wrapper for the Mac OS CFURLAccess code +// (in CoreServices.framework) which provides access to network +// resources. It's being used here to add the ability to +// use HTTP URL's as the system id's in the XML decl clauses. +// + +class XMLUTIL_EXPORT MacOSURLAccessCF : public XMLNetAccessor +{ +public : + MacOSURLAccessCF(); + ~MacOSURLAccessCF(); + + BinInputStream* makeNew(const XMLURL& urlSource, const XMLNetHTTPInfo* httpInfo=0); + const XMLCh* getId() const; + +private : + static const XMLCh sMyID[]; + + MacOSURLAccessCF(const MacOSURLAccessCF&); + MacOSURLAccessCF& operator=(const MacOSURLAccessCF&); + +}; + +inline const XMLCh* +MacOSURLAccessCF::getId() const +{ + return sMyID; +} + + +XERCES_CPP_NAMESPACE_END + +#endif // MACOSURLACCESSCF_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccess/URLAccessBinInputStream.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccess/URLAccessBinInputStream.hpp @@ -0,0 +1,75 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: URLAccessBinInputStream.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#if !defined(URLACCESSBININPUTSTREAM_HPP) +#define URLACCESSBININPUTSTREAM_HPP + + +#include +#include +#include + +#if defined(__APPLE__) + // Framework includes from ProjectBuilder + #include +#else + // Classic includes otherwise + #include +#endif + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class implements the BinInputStream interface specified by the XML +// parser. +// + +class XMLUTIL_EXPORT URLAccessBinInputStream : public BinInputStream +{ +public : + URLAccessBinInputStream(const XMLURL& urlSource); + ~URLAccessBinInputStream(); + + unsigned int curPos() const; + unsigned int readBytes + ( + XMLByte* const toFill + , const unsigned int maxToRead + ); + + +private : + unsigned int mBytesProcessed; + URLReference mURLReference; + void* mBuffer; // Current buffer from URLAccess (or NULL) + char* mBufPos; // Read position in buffer + Size mBufAvailable; // Bytes available +}; + + +inline unsigned int +URLAccessBinInputStream::curPos() const +{ + return mBytesProcessed; +} + +XERCES_CPP_NAMESPACE_END + +#endif // URLACCESSBININPUTSTREAM_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccess/MacOSURLAccess.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/MacOSURLAccess/MacOSURLAccess.hpp @@ -0,0 +1,67 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MacOSURLAccess.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + + +#if !defined(MACOSURLACCESS_HPP) +#define MACOSURLACCESS_HPP + + +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class is the wrapper for the Mac OS URLAccess code +// which provides access to network resources. +// It's being used here to add the ability to +// use HTTP URL's as the system id's in the XML decl clauses. +// + +class XMLUTIL_EXPORT MacOSURLAccess : public XMLNetAccessor +{ +public : + MacOSURLAccess(); + ~MacOSURLAccess(); + + BinInputStream* makeNew(const XMLURL& urlSource, const XMLNetHTTPInfo* httpInfo=0); + const XMLCh* getId() const; + +private : + static const XMLCh sMyID[]; + + MacOSURLAccess(const MacOSURLAccess&); + MacOSURLAccess& operator=(const MacOSURLAccess&); + +}; + +inline const XMLCh* +MacOSURLAccess::getId() const +{ + return sMyID; +} + + +XERCES_CPP_NAMESPACE_END + + +#endif // MACOSURLACCESS_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.hpp @@ -0,0 +1,111 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: BinHTTPURLInputStream.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#if !defined(BINHTTPURLINPUTSTREAM_HPP) +#define BINHTTPURLINPUTSTREAM_HPP + + +#include +#include +#include +#include +#include + +// +// This class implements the BinInputStream interface specified by the XML +// parser. +// +struct hostent; +struct sockaddr; + +XERCES_CPP_NAMESPACE_BEGIN + +class XMLUTIL_EXPORT BinHTTPURLInputStream : public BinInputStream +{ +public : + BinHTTPURLInputStream(const XMLURL& urlSource, const XMLNetHTTPInfo* httpInfo=0); + ~BinHTTPURLInputStream(); + + unsigned int curPos() const; + unsigned int readBytes + ( + XMLByte* const toFill + , const unsigned int maxToRead + ); + + static void Cleanup(); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + BinHTTPURLInputStream(const BinHTTPURLInputStream&); + BinHTTPURLInputStream& operator=(const BinHTTPURLInputStream&); + // ----------------------------------------------------------------------- + // Private data members + // + // fSocketHandle + // The socket representing the connection to the remote file. + // We deliberately did not define the type to be SOCKET, so as to + // avoid bringing in any Windows header into this file. + // fBytesProcessed + // Its a rolling count of the number of bytes processed off this + // input stream. + // fBuffer + // Holds the http header, plus the first part of the actual + // data. Filled at the time the stream is opened, data goes + // out to user in response to readBytes(). + // fBufferPos, fBufferEnd + // Pointers into fBuffer, showing start and end+1 of content + // that readBytes must return. + // ----------------------------------------------------------------------- + MemoryManager* fMemoryManager; + unsigned int fSocketHandle; + unsigned int fBytesProcessed; + char fBuffer[4000]; + char * fBufferEnd; + char * fBufferPos; + static bool fInitialized; + static XMLMutex* fInitMutex; + + static void Initialize(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + inline static hostent* gethostbyname(const char* name); + inline static unsigned long inet_addr(const char* cp); + inline static hostent* gethostbyaddr(const char* addr,int len,int type); + inline static unsigned short htons(unsigned short hostshort); + inline static unsigned int socket(int af,int type,int protocol); + inline static int connect(unsigned int s,const sockaddr* name,int namelen); + inline static int send(unsigned int s,const char* buf,int len,int flags); + inline static int recv(unsigned int s,char* buf,int len,int flags); + inline static int shutdown(unsigned int s,int how); + inline static int closesocket(unsigned int socket); +}; + + +inline unsigned int BinHTTPURLInputStream::curPos() const +{ + return fBytesProcessed; +} + +XERCES_CPP_NAMESPACE_END + +#endif // BINHTTPURLINPUTSTREAM_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/NetAccessors/WinSock/WinSockNetAccessor.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/NetAccessors/WinSock/WinSockNetAccessor.hpp @@ -0,0 +1,65 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: WinSockNetAccessor.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +#if !defined(WINSOCKNETACCESSOR_HPP) +#define WINSOCKNETACCESSOR_HPP + + +#include +#include +#include +#include + + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This class is the wrapper for the WinSock library which provides +// support for sockets. Its being used here to add the ability to +// use HTTP URL's as the system id's in the XML decl clauses. +// + +class XMLUTIL_EXPORT WinSockNetAccessor : public XMLNetAccessor +{ +public : + WinSockNetAccessor(); + ~WinSockNetAccessor(); + + virtual BinInputStream* makeNew(const XMLURL& urlSource, const XMLNetHTTPInfo* httpInfo=0); + virtual const XMLCh* getId() const; + +private : + static const XMLCh fgMyName[]; + + WinSockNetAccessor(const WinSockNetAccessor&); + WinSockNetAccessor& operator=(const WinSockNetAccessor&); + +}; // WinSockNetAccessor + +inline const XMLCh* WinSockNetAccessor::getId() const +{ + return fgMyName; +} + +XERCES_CPP_NAMESPACE_END + + +#endif // WINSOCKNETACCESSOR_HPP --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/MsgLoaders/MsgFile/MsgLoader.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/MsgLoaders/MsgFile/MsgLoader.hpp @@ -0,0 +1,105 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MsgLoader.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#if !defined(ICONVMSGLOADER_HPP) +#define ICONVMSGLOADER_HPP + +#include +#include + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This is a simple in Iconv RC message loader implementation. +// +class XMLUTIL_EXPORT MsgCatalogLoader : public XMLMsgLoader +{ +public : + // ----------------------------------------------------------------------- + // Public Constructors and Destructor + // ----------------------------------------------------------------------- + MsgCatalogLoader(const XMLCh* const msgDomain); + ~MsgCatalogLoader(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual message loader API + // ----------------------------------------------------------------------- + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const XMLCh* const repText1 + , const XMLCh* const repText2 = 0 + , const XMLCh* const repText3 = 0 + , const XMLCh* const repText4 = 0 + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const char* const repText1 + , const char* const repText2 = 0 + , const char* const repText3 = 0 + , const char* const repText4 = 0 + , MemoryManager * const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + MsgCatalogLoader(); + MsgCatalogLoader(const MsgCatalogLoader&); + MsgCatalogLoader& operator=(const MsgCatalogLoader&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fModHandle + // This is our DLL module handle that we need in order to load + // resource messages. This is set during construction. + // + // fMsgDomain + // This is the name of the error domain that this loader is for. + // ----------------------------------------------------------------------- + nl_catd fCatalogHandle; + XMLCh* fMsgDomain; + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.hpp @@ -0,0 +1,107 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: ICUMsgLoader.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +#if !defined(ICUMSGLOADER_HPP) +#define ICUMSGLOADER_HPP + +#include +#include "unicode/ures.h" + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This is the ICU specific implementation of the XMLMsgLoader interface. +// This one uses ICU resource bundles to store its messages. +// +class XMLUTIL_EXPORT ICUMsgLoader : public XMLMsgLoader +{ +public : + // ----------------------------------------------------------------------- + // Public Constructors and Destructor + // ----------------------------------------------------------------------- + ICUMsgLoader(const XMLCh* const msgDomain); + ~ICUMsgLoader(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual message loader API + // ----------------------------------------------------------------------- + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const XMLCh* const repText1 + , const XMLCh* const repText2 = 0 + , const XMLCh* const repText3 = 0 + , const XMLCh* const repText4 = 0 + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const char* const repText1 + , const char* const repText2 = 0 + , const char* const repText3 = 0 + , const char* const repText4 = 0 + , MemoryManager * const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + ICUMsgLoader(); + ICUMsgLoader(const ICUMsgLoader&); + ICUMsgLoader& operator=(const ICUMsgLoader&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fLocaleBundle + // pointer to the required locale specific resource bundle, + // or to the default locale resrouce bundle in case the required + // locale specific resource bundle unavailable. + // + // fDomainBundle + // pointer to the domain specific resource bundle with in the + // required locale specific (or default locale) resource bundle. + // + // ----------------------------------------------------------------------- + UResourceBundle* fLocaleBundle; + UResourceBundle* fDomainBundle; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/MsgLoaders/Win32/Win32MsgLoader.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/MsgLoaders/Win32/Win32MsgLoader.hpp @@ -0,0 +1,111 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: Win32MsgLoader.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +#if !defined(WIN32MSGLOADER_HPP) +#define WIN32MSGLOADER_HPP + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This is a simple in Win32 RC message loader implementation. +// +class XMLUTIL_EXPORT Win32MsgLoader : public XMLMsgLoader +{ +public : + // ----------------------------------------------------------------------- + // Public Constructors and Destructor + // ----------------------------------------------------------------------- + Win32MsgLoader(const XMLCh* const msgDomain); + ~Win32MsgLoader(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual message loader API + // ----------------------------------------------------------------------- + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const XMLCh* const repText1 + , const XMLCh* const repText2 = 0 + , const XMLCh* const repText3 = 0 + , const XMLCh* const repText4 = 0 + , MemoryManager* const manger = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const char* const repText1 + , const char* const repText2 = 0 + , const char* const repText3 = 0 + , const char* const repText4 = 0 + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + Win32MsgLoader(); + Win32MsgLoader(const Win32MsgLoader&); + Win32MsgLoader& operator=(const Win32MsgLoader&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fDomainOfs + // This is the id offset for the current domain. Its used to bias + // the zero based id of each domain, since they are stored in the + // same file and have to have unique ids internally. This is set + // in the ctor from the domain name. We just have to agree with + // what our formatter in the NLSXlat program does. + // + // fModHandle + // This is our DLL module handle that we need in order to load + // resource messages. This is set during construction. + // + // fMsgDomain + // This is the name of the error domain that this loader is for. + // ----------------------------------------------------------------------- + unsigned int fDomainOfs; + HINSTANCE fModHandle; + XMLCh* fMsgDomain; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/MsgLoaders/MsgCatalog/MsgCatalogLoader.hpp @@ -0,0 +1,105 @@ +/* + * Copyright 1999-2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MsgCatalogLoader.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +#if !defined(ICONVMSGLOADER_HPP) +#define ICONVMSGLOADER_HPP + +#include +#include + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +// +// This is a simple in Iconv RC message loader implementation. +// +class XMLUTIL_EXPORT MsgCatalogLoader : public XMLMsgLoader +{ +public : + // ----------------------------------------------------------------------- + // Public Constructors and Destructor + // ----------------------------------------------------------------------- + MsgCatalogLoader(const XMLCh* const msgDomain); + ~MsgCatalogLoader(); + + + // ----------------------------------------------------------------------- + // Implementation of the virtual message loader API + // ----------------------------------------------------------------------- + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const XMLCh* const repText1 + , const XMLCh* const repText2 = 0 + , const XMLCh* const repText3 = 0 + , const XMLCh* const repText4 = 0 + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ); + + virtual bool loadMsg + ( + const XMLMsgLoader::XMLMsgId msgToLoad + , XMLCh* const toFill + , const unsigned int maxChars + , const char* const repText1 + , const char* const repText2 = 0 + , const char* const repText3 = 0 + , const char* const repText4 = 0 + , MemoryManager * const manager = XMLPlatformUtils::fgMemoryManager + ); + + +private : + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + MsgCatalogLoader(); + MsgCatalogLoader(const MsgCatalogLoader&); + MsgCatalogLoader& operator=(const MsgCatalogLoader&); + + + // ----------------------------------------------------------------------- + // Private data members + // + // fModHandle + // This is our DLL module handle that we need in order to load + // resource messages. This is set during construction. + // + // fMsgSet + // This is the message set id for the error domain that this loader is for. + // ----------------------------------------------------------------------- + nl_catd fCatalogHandle; + unsigned int fMsgSet; + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/util/MsgLoaders/MsgCatalog/XMLMsgCat_Ids.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/util/MsgLoaders/MsgCatalog/XMLMsgCat_Ids.hpp @@ -0,0 +1,16 @@ +// ---------------------------------------------------------------- +// This file was generated from the XML error message source. +// so do not edit this file directly!! +// ---------------------------------------------------------------- + +#include + +XERCES_CPP_NAMESPACE_BEGIN + +const unsigned int CatId_XMLErrs = 1; +const unsigned int CatId_XMLValid = 2; +const unsigned int CatId_XMLExcepts = 3; +const unsigned int CatId_XMLDOMMsg = 4; + +XERCES_CPP_NAMESPACE_END + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNodeIteratorImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNodeIteratorImpl.hpp @@ -0,0 +1,121 @@ +#ifndef DOMNodeIteratorImpl_HEADER_GUARD_ +#define DOMNodeIteratorImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeIteratorImpl.hpp 176080 2004-09-26 01:06:31Z cargilld $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +////////////////////////////////////////////////////////////////////// +// DOMNodeIteratorImpl.hpp: interface for the DOMNodeIteratorImpl class. +// +////////////////////////////////////////////////////////////////////// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class CDOM_EXPORT DOMNodeIteratorImpl : public DOMNodeIterator { + private: + // + // Data + // + // The root. + DOMNode* fRoot; + + // The Document used to create this iterator + DOMDocument* fDocument; + + // The whatToShow mask. + unsigned long fWhatToShow; + + // The NodeFilter reference. + DOMNodeFilter* fNodeFilter; + + + // The expandEntity reference flag. + bool fExpandEntityReferences; + bool fDetached; + + + // + // Iterator state - current node and direction. + // + // Note: The current node and direction are sufficient to implement + // the desired behaviour of the current pointer being _between_ + // two nodes. The fCurrentNode is actually the last node returned, + // and the + // direction is whether the pointer is in front or behind this node. + // (usually akin to whether the node was returned via nextNode()) + // (eg fForward = true) or previousNode() (eg fForward = false). + // The last Node returned. + DOMNode* fCurrentNode; + + // The direction of the iterator on the fCurrentNode. + // + // nextNode() == fForward = true;
+ // previousNode() == fForward = false;
+ //
+ bool fForward; + + public: + virtual ~DOMNodeIteratorImpl (); + DOMNodeIteratorImpl ( + DOMDocument* fDocument, + DOMNode* root, + unsigned long whatToShow, + DOMNodeFilter* nodeFilter, + bool expandEntityRef); + + DOMNodeIteratorImpl ( const DOMNodeIteratorImpl& toCopy); + DOMNodeIteratorImpl& operator= (const DOMNodeIteratorImpl& other); + + virtual DOMNode* getRoot (); + virtual unsigned long getWhatToShow (); + virtual DOMNodeFilter* getFilter (); + // Get the expandEntity reference flag. + virtual bool getExpandEntityReferences(); + + virtual DOMNode* nextNode (); + virtual DOMNode* previousNode (); + virtual void detach (); + + virtual void release(); + void removeNode (DOMNode* node); + + private: + DOMNode* matchNodeOrParent (DOMNode* node); + DOMNode* nextNode (DOMNode* node, bool visitChildren); + DOMNode* previousNode (DOMNode* node); + bool acceptNode (DOMNode* node); + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMConfigurationImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMConfigurationImpl.hpp @@ -0,0 +1,169 @@ +/* + * Copyright 2003,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#if !defined(DOMCONFIGURATIONIMPL_HPP) +#define DOMCONFIGURATIONIMPL_HPP + +//------------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------------ +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +class CDOM_EXPORT DOMConfigurationImpl : public DOMConfiguration +{ +private: + //unimplemented + DOMConfigurationImpl(const DOMConfiguration &); + DOMConfigurationImpl & operator = (const DOMConfiguration &); + + +public: + + //----------------------------------------------------------------------------------- + // Constructor + //----------------------------------------------------------------------------------- + DOMConfigurationImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + ~DOMConfigurationImpl(); + + enum DOMConfigurationFeature { + FEATURE_CANONICAL_FORM = 0x0001, + FEATURE_CDATA_SECTIONS = 0x0002, + FEATURE_COMMENTS = 0x0004, + FEATURE_DATATYPE_NORMALIZATION = 0x0008, + FEATURE_DISCARD_DEFAULT_CONTENT = 0x0010, + FEATURE_ENTITIES = 0x0020, + FEATURE_INFOSET = 0x0040, + FEATURE_NAMESPACES = 0x0080, + FEATURE_NAMESPACE_DECLARATIONS = 0x0100, + FEATURE_NORMALIZE_CHARACTERS = 0x0200, + FEATURE_SPLIT_CDATA_SECTIONS = 0x0400, + FEATURE_VALIDATE = 0x0800, + FEATURE_VALIDATE_IF_SCHEMA = 0x1000, + FEATURE_WHITESPACE_IN_ELEMENT_CONTENT = 0x2000 + }; + + unsigned short featureValues; + + // ----------------------------------------------------------------------- + // Setter methods + // ----------------------------------------------------------------------- + + void setParameter(const XMLCh* name, const void* value); + + // ----------------------------------------------------------------------- + // Getter methods + // ----------------------------------------------------------------------- + + const void* getParameter(const XMLCh* name) const; + + + // ----------------------------------------------------------------------- + // Query methods + // ----------------------------------------------------------------------- + + bool canSetParameter(const XMLCh* name, const void* value) const; + + + // --------------------------------------------------------------------------- + // Impl specific methods + // --------------------------------------------------------------------------- + + /* specific get and set methods for non-boolean parameters + * */ + + DOMErrorHandler* getErrorHandler() const; + + const XMLCh* getSchemaType() const; + + const XMLCh* getSchemaLocation() const; + + void setErrorHandler(DOMErrorHandler *erHandler); + + void setSchemaType(const XMLCh* st); + + void setSchemaLocation(const XMLCh* sl); + + // -------------------------------------- + // static consts names + // -------------------------------------- + static const XMLCh fgCANONICAL_FORM[]; + static const XMLCh fgCDATA_SECTIONS[]; + static const XMLCh fgCOMMENTS[]; + static const XMLCh fgDATATYPE_NORMALIZATION[]; + static const XMLCh fgDISCARD_DEFAULT_CONTENT[]; + static const XMLCh fgENTITIES[]; + static const XMLCh fgINFOSET[]; + static const XMLCh fgNAMESPACES[]; + static const XMLCh fgNAMESPACE_DECLARATIONS[]; + static const XMLCh fgNORMALIZE_CHARACTERS[]; + static const XMLCh fgSPLIT_CDATA_SECTIONS[]; + static const XMLCh fgVALIDATE[]; + static const XMLCh fgVALIDATE_IF_SCHEMA[]; + static const XMLCh fgWHITESPACE_IN_ELEMENT_CONTENT[]; + + static const XMLCh fgERROR_HANDLER[]; + static const XMLCh fgSCHEMA_TYPE[]; + static const XMLCh fgSCHEMA_LOCATION[]; + + // The default values for the boolean parameters + // from CANONICAL_FORM to WHITESPACE_IN_ELEMENT_CONTENT + // 10010110010110 = 0x2596 + static const unsigned short fDEFAULT_VALUES; + + +private: + // implements a simple map between the name and its enum value + DOMConfigurationFeature getFeatureFlag(const XMLCh* name) const; + + // the error handler + DOMErrorHandler* fErrorHandler; + + // the schema type + const XMLCh* fSchemaType; + + // the schema location + const XMLCh* fSchemaLocation; + + static const bool fFalse; + static const bool fTrue; + + MemoryManager* fMemoryManager; +}; + +XERCES_CPP_NAMESPACE_END + +#endif + +/** + * End of file DOMConfigurationImpl.hpp + */ --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMDocumentImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMDocumentImpl.hpp @@ -0,0 +1,398 @@ +#ifndef DOMDocumentImpl_HEADER_GUARD_ +#define DOMDocumentImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDocumentImpl.hpp 176273 2005-01-06 21:39:44Z amassari $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include +#include +#include +#include +#include +#include "DOMNodeImpl.hpp" +#include "DOMParentNode.hpp" +#include "DOMDeepNodeListPool.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMAttrImpl; +class DOMCDATASectionImpl; +class DOMCommentImpl; +class DOMConfiguration; +class DOMDeepNodeListImpl; +class DOMDocumentFragmentImpl; +class DOMDocumentTypeImpl; +class DOMElementImpl; +class DOMEntityImpl; +class DOMEntityReferenceImpl; +class DOMNotationImpl; +class DOMProcessingInstructionImpl; +class DOMTextImpl; +class DOMNodeIteratorImpl; +class DOMNormalizer; +class DOMTreeWalkerImpl; +class DOMNodeFilter; +class DOMNodeFilterImpl; +class DOMImplementation; +class DOMNodeIDMap; +class DOMRangeImpl; +class DOMStringPool; +class DOMBuffer; +class MemoryManager; +class XPathNSResolver; +class XPathExpression; + +typedef RefVectorOf Ranges; +typedef RefVectorOf NodeIterators; +typedef KeyRefPair DOMUserDataRecord; +typedef RefStackOf DOMNodePtr; + +class CDOM_EXPORT DOMDocumentImpl: public XMemory, public DOMDocument { +public: + // ----------------------------------------------------------------------- + // data types + // ----------------------------------------------------------------------- + enum NodeObjectType { + ATTR_OBJECT = 0, + ATTR_NS_OBJECT = 1, + CDATA_SECTION_OBJECT = 2, + COMMENT_OBJECT = 3, + DOCUMENT_FRAGMENT_OBJECT = 4, + DOCUMENT_TYPE_OBJECT = 5, + ELEMENT_OBJECT = 6, + ELEMENT_NS_OBJECT = 7, + ENTITY_OBJECT = 8, + ENTITY_REFERENCE_OBJECT = 9, + NOTATION_OBJECT = 10, + PROCESSING_INSTRUCTION_OBJECT = 11, + TEXT_OBJECT = 12 + }; + + + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + DOMNodeImpl fNode; // Implements common node functionality. + DOMParentNode fParent; // Implements common parent node functionality + DOMNodeIDMap* fNodeIDMap; // for use by GetElementsById(). + +public: + DOMDocumentImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMDocumentImpl(const XMLCh* namespaceURI, //DOM Level 2 + const XMLCh* qualifiedName, + DOMDocumentType* doctype, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual ~DOMDocumentImpl(); + + void setDocumentType(DOMDocumentType *doctype); + + // Add all functions that are pure virutal in DOMNODE + DOMNODE_FUNCTIONS; + + // Add all functions that are pure virutal in DOMDocument + virtual DOMAttr* createAttribute(const XMLCh *name); + virtual DOMCDATASection* createCDATASection(const XMLCh *data); + virtual DOMComment* createComment(const XMLCh *data); + virtual DOMDocumentFragment* createDocumentFragment(); + virtual DOMDocumentType* createDocumentType(const XMLCh *name); + virtual DOMDocumentType* createDocumentType(const XMLCh *qName, + const XMLCh *publicId, + const XMLCh *systemId); + virtual DOMElement* createElement(const XMLCh * tagName); + virtual DOMElement* createElementNoCheck(const XMLCh *tagName); + virtual DOMEntity* createEntity(const XMLCh * name); + virtual DOMEntityReference* createEntityReference(const XMLCh * name); + virtual DOMNotation* createNotation(const XMLCh * name); + virtual DOMProcessingInstruction* createProcessingInstruction(const XMLCh * target, const XMLCh * data); + virtual DOMText* createTextNode(const XMLCh * data); + virtual DOMDocumentType* getDoctype() const; + virtual DOMElement* getDocumentElement() const; + virtual DOMNodeList* getElementsByTagName(const XMLCh * tagname) const; + virtual DOMImplementation* getImplementation() const; + bool isXMLName(const XMLCh * s); + virtual DOMNodeIterator* createNodeIterator(DOMNode *root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + virtual DOMTreeWalker* createTreeWalker(DOMNode *root, + unsigned long whatToShow, + DOMNodeFilter* filter, + bool entityReferenceExpansion); + + + virtual DOMRange* createRange(); + virtual Ranges* getRanges() const; //non-standard api + virtual NodeIterators* getNodeIterators() const; //non-standard api + virtual void removeRange(DOMRangeImpl* range); //non-standard api + virtual void removeNodeIterator(DOMNodeIteratorImpl* nodeIterator); //non-standard api + + virtual const DOMXPathExpression* createExpression(const XMLCh *expression, const DOMXPathNSResolver *resolver); + virtual const DOMXPathNSResolver* createNSResolver(DOMNode *nodeResolver); + virtual void* evaluate(const XMLCh *expression, DOMNode *contextNode, const DOMXPathNSResolver *resolver, + unsigned short type, void* result); + + + // Extension to be called by the Parser + DOMEntityReference* createEntityReferenceByParser(const XMLCh * name); + + + // + // Functions to keep track of document mutations, so that node list chached + // information can be invalidated. One global changes counter per document. + // + virtual void changed(); + virtual int changes() const; + + /** + * Sets whether the DOM implementation performs error checking + * upon operations. Turning off error checking only affects + * the following DOM checks: + *
    + *
  • Checking strings to make sure that all characters are + * legal XML characters + *
  • Hierarchy checking such as allowed children, checks for + * cycles, etc. + *
+ *

+ * Turning off error checking does not turn off the + * following checks: + *

    + *
  • Read only checks + *
  • Checks related to DOM events + *
+ */ + inline void setErrorChecking(bool check) { + errorChecking = check; + } + + /** + * Returns true if the DOM implementation performs error checking. + */ + inline bool getErrorChecking() const { + return errorChecking; + } + + //Introduced in DOM Level 2 + virtual DOMNode* importNode(DOMNode *source, bool deep); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMElement* createElementNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLSSize_t lineNo, + const XMLSSize_t columnNo); + virtual DOMAttr* createAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName); + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMElement* getElementById(const XMLCh *elementId) const; + + //Introduced in DOM Level 3 + virtual const XMLCh* getActualEncoding() const; + virtual void setActualEncoding(const XMLCh* actualEncoding); + virtual const XMLCh* getEncoding() const; + virtual void setEncoding(const XMLCh* encoding); + virtual bool getStandalone() const; + virtual void setStandalone(bool standalone); + virtual const XMLCh* getVersion() const; + virtual void setVersion(const XMLCh* version); + virtual const XMLCh* getDocumentURI() const; + virtual void setDocumentURI(const XMLCh* documentURI); + virtual bool getStrictErrorChecking() const; + virtual void setStrictErrorChecking(bool strictErrorChecking); + virtual DOMNode* adoptNode(DOMNode* source); + virtual void normalizeDocument(); + virtual DOMConfiguration* getDOMConfiguration() const; + virtual void setDOMConfiguration(DOMConfiguration *config); + + // helper functions to prevent storing userdata pointers on every node. + void* setUserData(DOMNodeImpl* n, + const XMLCh* key, + void* data, + DOMUserDataHandler* handler); + void* getUserData(const DOMNodeImpl* n, + const XMLCh* key) const; + void callUserDataHandlers(const DOMNodeImpl* n, + DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + const DOMNode* dst) const; + void transferUserData(DOMNodeImpl* n1, DOMNodeImpl* n2); + + DOMNode* renameNode(DOMNode* n, + const XMLCh* namespaceURI, + const XMLCh* name); + + //Return the index > 0 of ':' in the given qualified name qName="prefix:localName". + //Return 0 if there is no ':', or -1 if qName is malformed such as ":abcd". + static int indexofQualifiedName(const XMLCh * qName); + static bool isKidOK(DOMNode *parent, DOMNode *child); + + inline DOMNodeIDMap* getNodeIDMap() {return fNodeIDMap;}; + + + // + // Memory Management Functions. All memory is allocated by and owned by + // a document, and is not recovered until the + // document itself is deleted. + // + void* allocate(size_t amount); + void* allocate(size_t amount, NodeObjectType type); + XMLCh* cloneString(const XMLCh *src); + const XMLCh* getPooledString(const XMLCh *src); + void deleteHeap(); + void release(DOMNode* object, NodeObjectType type); + void releaseDocNotifyUserData(DOMNode* object); + void releaseBuffer(DOMBuffer* buffer); + DOMBuffer* popBuffer(); + MemoryManager* getMemoryManager() const; + + // Factory methods for getting/creating node lists. + // Because nothing is ever deleted, the implementation caches and recycles + // previously used instances of DOMDeepNodeList + // + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, const XMLCh *tagName); + DOMNodeList* getDeepNodeList(const DOMNode *rootNode, //DOM Level 2 + const XMLCh *namespaceURI, + const XMLCh *localName); + +private: + //Internal helper functions + virtual DOMNode* importNode(DOMNode *source, bool deep, bool cloningNode); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDocumentImpl(const DOMDocumentImpl &); + DOMDocumentImpl & operator = (const DOMDocumentImpl &); + +private: + // ----------------------------------------------------------------------- + // data + // ----------------------------------------------------------------------- + // New data introduced in DOM Level 3 + const XMLCh* fActualEncoding; + const XMLCh* fEncoding; + bool fStandalone; + const XMLCh* fVersion; + const XMLCh* fDocumentURI; + DOMConfiguration* fDOMConfiguration; + + XMLStringPool fUserDataTableKeys; + RefHash2KeysTableOf* fUserDataTable; + + + // Per-Document heap Variables. + // The heap consists of one or more biggish blocks which are + // sub-allocated for individual allocations of nodes, strings, etc. + // The big blocks form a linked list, allowing them to be located for deletion. + // + // There is no provision for deleting suballocated blocks, other than + // deleting the entire heap when the document is deleted. + // + // There is no header on individual sub-allocated blocks. + // The header on big blocks consists only of a single back pointer to + // the previously allocated big block (our linked list of big blocks) + // + // + // revisit - this heap should be encapsulated into its own + // class, rather than hanging naked on Document. + // + void* fCurrentBlock; + char* fFreePtr; + XMLSize_t fFreeBytesRemaining; + + // To recycle the DOMNode pointer + RefArrayOf* fRecycleNodePtr; + + // To recycle DOMBuffer pointer + RefStackOf* fRecycleBufferPtr; + + // Pool of DOMNodeList for getElementsByTagName + DOMDeepNodeListPool* fNodeListPool; + + // Other data + DOMDocumentType* fDocType; + DOMElement* fDocElement; + DOMStringPool* fNamePool; + DOMNormalizer* fNormalizer; + Ranges* fRanges; + NodeIterators* fNodeIterators; + MemoryManager* fMemoryManager; // configurable memory manager + + int fChanges; + bool errorChecking; // Bypass error checking. + +}; + +inline MemoryManager* DOMDocumentImpl::getMemoryManager() const +{ + return fMemoryManager; +} + +XERCES_CPP_NAMESPACE_END + +// --------------------------------------------------------------------------- +// +// Operator new. Global overloaded version, lets any object be allocated on +// the heap owned by a document. +// +// --------------------------------------------------------------------------- +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl::NodeObjectType type) +{ + // revist. Probably should be a checked cast. + void *p = ((XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *)doc)->allocate(amt, type); + return p; +} + +inline void * operator new(size_t amt, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc) +{ + // revist. Probably should be a checked cast. + void *p = ((XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl *)doc)->allocate(amt); + return p; +} + +// --------------------------------------------------------------------------- +// For DOM: +// Bypass compiler warning: +// no matching operator delete found; memory will not be freed if initialization throws an exception +// --------------------------------------------------------------------------- +#if _MSC_VER >= 1200 /* VC++ 6.0 */ +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/) +{ + return; +} +inline void operator delete(void* /*ptr*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * /*doc*/, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocumentImpl::NodeObjectType /*type*/) +{ + return; +} +#endif + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNodeIDMap.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNodeIDMap.hpp @@ -0,0 +1,87 @@ +#ifndef DOMNodeIDMap_HEADER_GUARD_ +#define DOMNodeIDMap_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeIDMap.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +XERCES_CPP_NAMESPACE_BEGIN + + +// +// Class DOMNodeIDMap is a hash table that is used in the implementation of +// of DOM_Document::getElementsByID(). +// +// Why Yet Another HashTable implementation? Becuase it can be significantly +// smaller when tuned for this exact usage, and the generic RefHashTableOf +// from the xerces utils project is not a paricularly good fit. +// +class DOMAttr; +class DOMDocument; + + +class DOMNodeIDMap { +public: + + DOMNodeIDMap(int initialSize, DOMDocument *doc); // Create a new hash table, sized to hold "initialSize" + // Entries. It will automatically grow if need be. + + virtual ~DOMNodeIDMap(); + +private: + DOMNodeIDMap(const DOMNodeIDMap &other); // No copy, assignement, comparison. + DOMNodeIDMap &operator = (const DOMNodeIDMap &other); + bool operator == (const DOMNodeIDMap &other); + +public: + void add(DOMAttr *attr); // Add the specified attribute to the table. + void remove(DOMAttr *other); // Remove the specified attribute. + // Does nothing if the node is not in the table. + DOMAttr *find(const XMLCh *ID); // Find the attribute node in the table with this ID + +private: + void growTable(); + +private: + DOMAttr **fTable; + XMLSize_t fSizeIndex; // Index of the current table size in the + // array of possible table sizes. + XMLSize_t fSize; // The current size of the table array + // (number of slots, not bytes.) + XMLSize_t fNumEntries; // The number of entries used. + XMLSize_t fMaxEntries; // The max number of entries to use before + // growing the table. + DOMDocument *fDoc; // The owning document. + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMDeepNodeListImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMDeepNodeListImpl.hpp @@ -0,0 +1,77 @@ +#ifndef DOMDeepNodeListImpl_HEADER_GUARD_ +#define DOMDeepNodeListImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDeepNodeListImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNode; + + +class CDOM_EXPORT DOMDeepNodeListImpl: public DOMNodeList { +private: + const DOMNode* fRootNode; + const XMLCh* fTagName; + bool fMatchAll; + int fChanges; + DOMNode* fCurrentNode; + XMLSize_t fCurrentIndexPlus1; + + //DOM Level 2 + const XMLCh* fNamespaceURI; + bool fMatchAllURI; + bool fMatchURIandTagname; //match both namespaceURI and tagName + +public: + DOMDeepNodeListImpl(const DOMNode *rootNode, const XMLCh *tagName); + DOMDeepNodeListImpl(const DOMNode *rootNode, //DOM Level 2 + const XMLCh *namespaceURI, + const XMLCh *localName); + virtual ~DOMDeepNodeListImpl(); + virtual XMLSize_t getLength() const; + virtual DOMNode* item(XMLSize_t index) const; + DOMNode* cacheItem(XMLSize_t index); + +private: + DOMNode* nextMatchingElementAfter(DOMNode *current); + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDeepNodeListImpl(const DOMDeepNodeListImpl &); + DOMDeepNodeListImpl & operator = (const DOMDeepNodeListImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMElementImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMElementImpl.hpp @@ -0,0 +1,127 @@ +#ifndef DOMElementImpl_HEADER_GUARD_ +#define DOMElementImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMElementImpl.hpp 176052 2004-09-20 15:00:51Z amassari $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include +#include + +#include "DOMChildNode.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMParentNode.hpp" + +#include "DOMAttrMapImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMTypeInfo; +class DOMNodeList; +class DOMAttrMapImpl; +class DOMDocument; + + + + +class CDOM_EXPORT DOMElementImpl: public DOMElement { +public: + DOMNodeImpl fNode; + DOMParentNode fParent; + DOMChildNode fChild; + DOMAttrMapImpl *fAttributes; + DOMAttrMapImpl *fDefaultAttributes; + const XMLCh *fName; + +public: + DOMElementImpl(DOMDocument *ownerDoc, const XMLCh *name); + + DOMElementImpl(const DOMElementImpl &other, bool deep=false); + virtual ~DOMElementImpl(); + + // Declare functions from DOMNode. They all must be implemented by this class + DOMNODE_FUNCTIONS; + + // Functions introduced on Element... + virtual const XMLCh* getAttribute(const XMLCh *name) const; + virtual DOMAttr* getAttributeNode(const XMLCh *name) const; + virtual DOMNodeList* getElementsByTagName(const XMLCh *tagname) const; + virtual const XMLCh* getTagName() const; + virtual void removeAttribute(const XMLCh *name); + virtual DOMAttr* removeAttributeNode(DOMAttr * oldAttr); + virtual void setAttribute(const XMLCh *name, const XMLCh *value); + virtual DOMAttr* setAttributeNode(DOMAttr *newAttr); + virtual void setReadOnly(bool readOnly, bool deep); + + //Introduced in DOM Level 2 + virtual const XMLCh* getAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual void setAttributeNS(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLCh *value); + virtual void removeAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName); + virtual DOMAttr* getAttributeNodeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMAttr* setAttributeNodeNS(DOMAttr *newAttr); + virtual DOMNodeList* getElementsByTagNameNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual bool hasAttribute(const XMLCh *name) const; + virtual bool hasAttributeNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + + //Introduced in DOM level 3 + virtual void setIdAttribute(const XMLCh* name); + virtual void setIdAttributeNS(const XMLCh* namespaceURI, const XMLCh* localName); + virtual void setIdAttributeNode(const DOMAttr *idAttr); + virtual const DOMTypeInfo * getTypeInfo() const; + + // for handling of default attribute + virtual DOMAttr* setDefaultAttributeNode(DOMAttr *newAttr); + virtual DOMAttr* setDefaultAttributeNodeNS(DOMAttr *newAttr); + virtual DOMAttrMapImpl* getDefaultAttributes() const; + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + +protected: + // default attribute helper functions + virtual void setupDefaultAttributes(); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMElementImpl & operator = (const DOMElementImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMTreeWalkerImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMTreeWalkerImpl.hpp @@ -0,0 +1,167 @@ +#ifndef DOMTreeWalkerImpl_HEADER_GUARD_ +#define DOMTreeWalkerImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMTreeWalkerImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMTreeWalkerImpl : public DOMTreeWalker { + private: + // The whatToShow mask. + unsigned long fWhatToShow; + + // The NodeFilter reference. + DOMNodeFilter* fNodeFilter; + + // The current Node. + DOMNode* fCurrentNode; + + // The root Node. + DOMNode* fRoot; + + // The expandEntity reference flag. + bool fExpandEntityReferences; + + public: + // Implementation Note: No state is kept except the data above + // (fWhatToShow, fNodeFilter, fCurrentNode, fRoot) such that + // setters could be created for these data values and the + // implementation will still work. + + /** Public constructor */ + DOMTreeWalkerImpl ( + DOMNode* root, + unsigned long whatToShow, + DOMNodeFilter* nodeFilter, + bool expandEntityRef); + DOMTreeWalkerImpl (const DOMTreeWalkerImpl& twi); + DOMTreeWalkerImpl& operator= (const DOMTreeWalkerImpl& twi); + + // Return the root node. + virtual DOMNode* getRoot (); + + // Return the whatToShow value. + virtual unsigned long getWhatToShow (); + + // Return the NodeFilter. + virtual DOMNodeFilter* getFilter (); + + + // Return the current DOMNode. + virtual DOMNode* getCurrentNode (); + + // Return the current Node. + virtual void setCurrentNode (DOMNode* node); + + // Return the parent Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* parentNode (); + + // Return the first child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* firstChild (); + + // Return the last child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* lastChild (); + + // Return the previous sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousSibling (); + + // Return the next sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + + virtual DOMNode* nextSibling (); + // Return the previous Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* previousNode (); + + // Return the next Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + virtual DOMNode* nextNode (); + + // Get the expandEntity reference flag. + virtual bool getExpandEntityReferences(); + + // release the resource + virtual void release(); + +protected: + + // Internal function. + // Return the parent Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getParentNode (DOMNode* node); + + // Internal function. + // Return the nextSibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getNextSibling (DOMNode* node); + + // Internal function. + // Return the previous sibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getPreviousSibling (DOMNode* node); + + // Internal function. + // Return the first child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getFirstChild (DOMNode* node); + + // Internal function. + // Return the last child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOMNode* getLastChild (DOMNode* node); + + // The node is accepted if it passes the whatToShow and the filter. + short acceptNode (DOMNode* node); + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMLocatorImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMLocatorImpl.hpp @@ -0,0 +1,274 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMLocatorImpl.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +#ifndef DOMLOCATORIMPL_HPP +#define DOMLOCATORIMPL_HPP + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + + +/** + * Introduced in DOM Level 3 + * + * Implementation of a DOMLocator interface. + * + * @see DOMLocator#DOMLocator + */ + +class CDOM_EXPORT DOMLocatorImpl : public DOMLocator +{ +public: + /** @name Constructors and Destructor */ + //@{ + + /** Constructor */ + DOMLocatorImpl(); + + DOMLocatorImpl + ( + const XMLSSize_t lineNum + , const XMLSSize_t columnNum + , DOMNode* const errorNode + , const XMLCh* const uri + , const XMLSSize_t offset = -1 + ); + + /** Desctructor */ + virtual ~DOMLocatorImpl(); + + //@} + + /** @name Get function */ + //@{ + + /** + *

"Experimental - subject to change"

+ * + * Get the line number where the error occured. The value is -1 if there is + * no line number available. + * + * @see #setLineNumber + */ + virtual XMLSSize_t getLineNumber() const; + + /** + *

"Experimental - subject to change"

+ * + * Get the column number where the error occured. The value is -1 if there + * is no column number available. + * + * @see #setColumnNumber + */ + virtual XMLSSize_t getColumnNumber() const; + + /** + *

"Experimental - subject to change"

+ * + * Get the byte or character offset into the input source, if we're parsing + * a file or a byte stream then this will be the byte offset into that + * stream, but if a character media is parsed then the offset will be the + * character offset. The value is -1 if there is no offset available. + * + * @see #setOffset + */ + virtual XMLSSize_t getOffset() const; + + /** + *

"Experimental - subject to change"

+ * + * Get the DOM Node where the error occured, or null if there + * is no node available. + * + * @see #setErrorNode + */ + virtual DOMNode* getErrorNode() const; + + /** + *

"Experimental - subject to change"

+ * + * Get the URI where the error occured, or null if there is no + * URI available. + * + * @see #setURI + */ + virtual const XMLCh* getURI() const; + + //@} + + + /** @name Set function */ + //@{ + + /** + *

"Experimental - subject to change"

+ * + * Set the line number of the error + * + * @param lineNumber the line number to set + * + * @see #getLinNumner + */ + virtual void setLineNumber(const XMLSSize_t lineNumber); + + /** + *

"Experimental - subject to change"

+ * + * Set the column number of the error + * + * @param columnNumber the column number to set. + * + * @see #getColumnNumner + */ + virtual void setColumnNumber(const XMLSSize_t columnNumber); + + /** + *

"Experimental - subject to change"

+ * + * Set the byte/character offset. + * + * @param offset the byte/characte offset to set. + * + * @see #getOffset + */ + virtual void setOffset(const XMLSSize_t offset); + + /** + *

"Experimental - subject to change"

+ * + * Set the DOM Node where the error occured + * + * @param errorNode the DOM Node to set + * + * @see #getErrorNode + */ + virtual void setErrorNode(DOMNode* const errorNode); + + /** + *

"Experimental - subject to change"

+ * + * Set the URI where the error occured + * + * @param uri the URI to set. + * + * @see #getURI + */ + virtual void setURI(const XMLCh* const uri); + + //@} + + +private : + /* Unimplemented constructors and operators */ + + /* Copy constructor */ + DOMLocatorImpl(const DOMLocatorImpl&); + + /* Assignment operator */ + DOMLocatorImpl& operator=(const DOMLocatorImpl&); + + // ----------------------------------------------------------------------- + // Private data members + // + // fLineNum + // fColumnNum + // Track line/column number of where the error occured + // + // fOffset + // Track character/byte offset in the input source where the error + // occured + // + // fErrorNode + // Current error node where the error occured + // + // fURI + // The uri where the error occured + // ----------------------------------------------------------------------- + XMLSSize_t fLineNum; + XMLSSize_t fColumnNum; + XMLSSize_t fOffset; + DOMNode* fErrorNode; + const XMLCh* fURI; +}; + + +// --------------------------------------------------------------------------- +// DOMLocatorImpl: Getter methods +// --------------------------------------------------------------------------- +inline XMLSSize_t DOMLocatorImpl::getLineNumber() const +{ + return fLineNum; +} + +inline XMLSSize_t DOMLocatorImpl::getColumnNumber() const +{ + return fColumnNum; +} + +inline XMLSSize_t DOMLocatorImpl::getOffset() const +{ + return fOffset; +} + +inline DOMNode* DOMLocatorImpl::getErrorNode() const +{ + return fErrorNode; +} + +inline const XMLCh* DOMLocatorImpl::getURI() const +{ + return fURI; +} + + +// --------------------------------------------------------------------------- +// DOMLocatorImpl: Setter methods +// --------------------------------------------------------------------------- +inline void DOMLocatorImpl::setLineNumber(const XMLSSize_t lineNumber) +{ + fLineNum = lineNumber; +} + +inline void DOMLocatorImpl::setColumnNumber(const XMLSSize_t columnNumber) +{ + fColumnNum = columnNumber; +} + +inline void DOMLocatorImpl::setOffset(const XMLSSize_t offset) +{ + fOffset = offset; +} + +inline void DOMLocatorImpl::setErrorNode(DOMNode* const errorNode) +{ + fErrorNode = errorNode; +} + +inline void DOMLocatorImpl::setURI(const XMLCh* const uri) +{ + fURI = uri; +} + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNormalizer.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNormalizer.hpp @@ -0,0 +1,167 @@ +#ifndef DOMNormalizer_HEADER_GUARD_ +#define DOMNormalizer_HEADER_GUARD_ + +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include +#include + + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMConfigurationImpl; +class DOMErrorHandler; +class DOMDocumentImpl; +class DOMNode; +class DOMElementImpl; +class DOMAttr; +class DOMNamedNodeMap; + +class DOMNormalizer : public XMemory { + + //the following are the data structures maintain the stack of namespace information + class InScopeNamespaces : public XMemory { + class Scope : public XMemory { + public: + Scope(Scope *baseScopeWithBindings); + ~Scope(); + void addOrChangeBinding(const XMLCh *prefix, const XMLCh *uri, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + const XMLCh* getUri(const XMLCh *prefix) const; + const XMLCh* getPrefix(const XMLCh* uri) const; + Scope *fBaseScopeWithBindings; + + private: + RefHashTableOf *fPrefixHash; + RefHashTableOf *fUriHash; + // unimplemented + Scope ( const Scope& toCopy); + Scope& operator= (const Scope& other); + }; + + public: + InScopeNamespaces(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + ~InScopeNamespaces(); + void addOrChangeBinding(const XMLCh *prefix, const XMLCh *uri, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + void addScope(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + void removeScope(); + bool isValidBinding(const XMLCh* prefix, const XMLCh* uri) const; + const XMLCh* getOrDeclarePrefix(const XMLCh* uri); + const XMLCh* getPrefix(const XMLCh* uri) const; + const XMLCh* getUri(const XMLCh* prefix) const; + int size(); + + private: + RefVectorOf *fScopes; + Scope *lastScopeWithBindings; + // unimplemented + InScopeNamespaces ( const InScopeNamespaces& toCopy); + InScopeNamespaces& operator= (const InScopeNamespaces& other); + }; + +public: + DOMNormalizer(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + ~DOMNormalizer(); + + /** + * Main entry method to normalize a document + */ + void normalizeDocument(DOMDocumentImpl *doc); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitNormalizerMutex(); + static void reinitMsgLoader(); + +private: + // unimplemented + DOMNormalizer ( const DOMNormalizer& toCopy); + DOMNormalizer& operator= (const DOMNormalizer& other); + + /** + * Recursively normalizes a node + */ + DOMNode * normalizeNode(DOMNode *node) const; + + /** + * Helper method that fixes up the namespace declarations according to the + * DOM Level 3 psydocode + */ + void namespaceFixUp(DOMElementImpl *ele) const; + + /** + * Converts an integer to an XMLCh - max 15 digits long. + */ + const XMLCh * integerToXMLCh(unsigned int i) const; + + /** + * Adds a namespace attribute or replaces the value of existing namespace + * attribute with the given prefix and value for URI. + * In case prefix is empty will add/update default namespace declaration. + */ + void addOrChangeNamespaceDecl(const XMLCh* prefix, const XMLCh* uri, DOMElementImpl *element) const; + + /** + * Adds a custom namespace in the form "NSx" where x is an integer that + * has not yet used in the document + */ + const XMLCh* addCustomNamespaceDecl(const XMLCh* uri, DOMElementImpl *element) const; + + + /** + * Report an error + */ + void error(const XMLErrs::Codes code, const DOMNode *node) const; + + // + // fDocument - the document we are operating on + // + // fDOMConfiguration - the configuration from the document + // + // fErrorHandler - the errorhandler to be used when reporting errors during normalization + // + // fNSScope - the data stucture that holds the prefix-uri information + // + // fNewNamespaceCount - the number of custom namespace declarations we have created + // + DOMDocumentImpl *fDocument; + DOMConfigurationImpl *fConfiguration; + DOMErrorHandler *fErrorHandler; + InScopeNamespaces *fNSScope; + unsigned int fNewNamespaceCount; + MemoryManager* fMemoryManager; +}; + + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMDeepNodeListPool.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMDeepNodeListPool.hpp @@ -0,0 +1,213 @@ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDeepNodeListPool.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#if !defined(DOMDeepNODELISTPOOL_HPP) +#define DOMDeepNODELISTPOOL_HPP + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +// This hash table is modified from RefHash3KeysIdPool with first key as object ptr (DOMNode), +// second and third keys are both XMLCh* string + +template struct DOMDeepNodeListPoolTableBucketElem; + + +// +// This should really be a nested class, but some of the compilers we +// have to support cannot deal with that! +// +template +struct DOMDeepNodeListPoolTableBucketElem : public XMemory +{ + DOMDeepNodeListPoolTableBucketElem + ( + void* key1 + , XMLCh* key2 + , XMLCh* key3 + , TVal* const value + , DOMDeepNodeListPoolTableBucketElem* next + , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager + ) : + fData(value) + , fNext(next) + , fKey1(key1) + , fKey2(0) + , fKey3(0) + { + if (key2) + fKey2 = XMLString::replicate(key2, manager); + + if (key3) + fKey3 = XMLString::replicate(key3, manager); + } + + TVal* fData; + DOMDeepNodeListPoolTableBucketElem* fNext; + void* fKey1; + XMLCh* fKey2; + XMLCh* fKey3; + + ~DOMDeepNodeListPoolTableBucketElem() {}; +}; + + +template class DOMDeepNodeListPool +{ +public: + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + // backwards compatability - default hasher is HashXMLCh + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const XMLSize_t initSize = 128 + ); + + // backwards compatability - default hasher is HashXMLCh + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , const XMLSize_t initSize = 128 + ); + + // if a hash function is passed in, it will be deleted when the hashtable is deleted. + // use a new instance of the hasher class for each hashtable, otherwise one hashtable + // may delete the hasher of a different hashtable if both use the same hasher. + DOMDeepNodeListPool + ( + const XMLSize_t modulus + , const bool adoptElems + , HashBase* hashBase + , const XMLSize_t initSize = 128 + ); + + ~DOMDeepNodeListPool(); + + // ----------------------------------------------------------------------- + // Element management + // ----------------------------------------------------------------------- + bool isEmpty() const; + bool containsKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + void removeAll(); + void cleanup(); + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3); + const TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const; + + TVal* getById(const XMLSize_t elemId); + const TVal* getById(const XMLSize_t elemId) const; + + // ----------------------------------------------------------------------- + // Putters + // ----------------------------------------------------------------------- + XMLSize_t put(void* key1, XMLCh* key2, XMLCh* key3, TVal* const valueToAdopt); + +private: + + // ----------------------------------------------------------------------- + // Private methods + // ----------------------------------------------------------------------- + DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal); + const DOMDeepNodeListPoolTableBucketElem* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, XMLSize_t& hashVal) const; + void initialize(const XMLSize_t modulus); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDeepNodeListPool(const DOMDeepNodeListPool &); + DOMDeepNodeListPool & operator = (const DOMDeepNodeListPool &); + + // ----------------------------------------------------------------------- + // Data members + // + // fAdoptedElems + // Indicates whether the values added are adopted or just referenced. + // If adopted, then they are deleted when they are removed from the + // hash table. + // + // fBucketList + // This is the array that contains the heads of all of the list + // buckets, one for each possible hash value. + // + // fHashModulus + // The modulus used for this hash table, to hash the keys. This is + // also the number of elements in the bucket list. + // + // fHash + // The hasher for the key1 data type. + // + // fIdPtrs + // fIdPtrsCount + // This is the array of pointers to the bucket elements in order of + // their assigned ids. So taking id N and referencing this array + // gives you the element with that id. The count field indicates + // the current size of this list. When fIdCounter+1 reaches this + // value the list must be expanded. + // + // fIdCounter + // This is used to give out unique ids to added elements. It starts + // at zero (which means empty), and is bumped up for each newly added + // element. So the first element is 1, the next is 2, etc... This + // means that this value is set to the top index of the fIdPtrs array. + // ----------------------------------------------------------------------- + bool fAdoptedElems; + DOMDeepNodeListPoolTableBucketElem** fBucketList; + XMLSize_t fHashModulus; + HashBase* fHash; + TVal** fIdPtrs; + XMLSize_t fIdPtrsCount; + XMLSize_t fIdCounter; + MemoryManager* fMemoryManager; +}; + +XERCES_CPP_NAMESPACE_END + +#if !defined(XERCES_TMPLSINC) +#include +#endif + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMAttrImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMAttrImpl.hpp @@ -0,0 +1,126 @@ +#ifndef DOMAttrImpl_HEADER_GUARD_ +#define DOMAttrImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMAttrImpl.hpp 176052 2004-09-20 15:00:51Z amassari $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "DOMParentNode.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMDocumentImpl.hpp" +#include +#include +#include "DOMNodeIDMap.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMElementImpl; +class DOMTypeInfoImpl; + +class CDOM_EXPORT DOMAttrImpl: public DOMAttr { + +public: + DOMNodeImpl fNode; + DOMParentNode fParent; + const XMLCh *fName; + +private: + const DOMTypeInfoImpl *fSchemaType; + +public: + DOMAttrImpl(DOMDocument *ownerDocument, const XMLCh *aName); + DOMAttrImpl(const DOMAttrImpl &other, bool deep=false); + virtual ~DOMAttrImpl(); + + // Add all functions that are pure virtual in DOMNODE + DOMNODE_FUNCTIONS; + + virtual const XMLCh * getName() const; + virtual bool getSpecified() const; + virtual const XMLCh * getValue() const; + virtual void setSpecified(bool arg); + virtual void setValue(const XMLCh * value); + virtual bool isId() const; + + //Introduced in DOM Level 2 + DOMElement *getOwnerElement() const; + void setOwnerElement(DOMElement *ownerElem); //internal use only + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + + virtual const DOMTypeInfo* getTypeInfo() const; + + //helper function for DOM Level 3 TypeInfo + virtual void setTypeInfo(const DOMTypeInfoImpl* typeInfo); + + // helper method that sets this attr to an idnode and places it into the document map + virtual void addAttrToIDNodeMap(); + + // helper to remove this attr from from the id map if it is in there + virtual void removeAttrFromIDNodeMap(); + +private: + void getTextValue(DOMNode* node, XMLBuffer& buf) const; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMAttrImpl& operator=(const DOMAttrImpl&); +}; + +inline void DOMAttrImpl::removeAttrFromIDNodeMap() +{ + if (fNode.isIdAttr()) { + ((DOMDocumentImpl *)getOwnerDocument())->getNodeIDMap()->remove(this); + fNode.isIdAttr(false); + } +} + +inline void DOMAttrImpl::addAttrToIDNodeMap() +{ + if (fNode.isIdAttr()) + return; + + fNode.isIdAttr(true); + + // REVIST For now, we don't worry about what happens if the new + // name conflicts as per setValue + DOMDocumentImpl *doc = (DOMDocumentImpl *)(fParent.fOwnerDocument); + + if (doc->fNodeIDMap == 0) + doc->fNodeIDMap = new (doc) DOMNodeIDMap(500, doc); + + doc->getNodeIDMap()->add(this); +} + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNotationImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNotationImpl.hpp @@ -0,0 +1,89 @@ +#ifndef DOMNotationImpl_HEADER_GUARD_ +#define DOMNotationImpl_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNotationImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +#include "DOMNodeImpl.hpp" + +class DOMDocument; + + +class CDOM_EXPORT DOMNotationImpl: public DOMNotation { +public: + DOMNodeImpl fNode; + + const XMLCh * fName; + const XMLCh * fPublicId; + const XMLCh * fSystemId; + const XMLCh * fBaseURI; + +public: + DOMNotationImpl(DOMDocument *ownerDoc, const XMLCh *); + DOMNotationImpl(const DOMNotationImpl &other, bool deep=false); + + virtual ~DOMNotationImpl(); + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; + + // + // The Public Identifier for this Notation. If no public identifier + // was specified, this will be null. + virtual const XMLCh * getPublicId() const; + + // The System Identifier for this Notation. If no system identifier + // was specified, this will be null. + virtual const XMLCh * getSystemId() const; + + // NON-DOM: The Public Identifier for this Notation. If no public + // identifier was specified, this will be null. + virtual void setPublicId(const XMLCh *arg); + + + // NON-DOM: The System Identifier for this Notation. If no system + // identifier was specified, this will be null. + virtual void setSystemId(const XMLCh *arg); + + // NON-DOM: set base uri + virtual void setBaseURI(const XMLCh *arg); + +private: + // unimplemented + DOMNotationImpl& operator= (const DOMNotationImpl& other); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMAttrMapImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMAttrMapImpl.hpp @@ -0,0 +1,114 @@ +#ifndef DOMAttrMapImpl_HEADER_GUARD_ +#define DOMAttrMapImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMAttrMapImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMNodeVector; +class DOMNode; + +class CDOM_EXPORT DOMAttrMapImpl : public DOMNamedNodeMap +{ +protected: + DOMNodeVector* fNodes; + DOMNode* fOwnerNode; // the node this map belongs to + + virtual void cloneContent(const DOMAttrMapImpl *srcmap); + + bool readOnly(); // revisit. Look at owner node read-only. + +private: + bool attrDefaults; + +public: + DOMAttrMapImpl(DOMNode *ownerNod); + + // revisit. This "copy" constructor is used for cloning an Element with Attributes, + // and for setting up default attributes. It's probably not right + // for one or the other or both. + DOMAttrMapImpl(DOMNode *ownerNod, const DOMAttrMapImpl *defaults); + DOMAttrMapImpl(); + + virtual ~DOMAttrMapImpl(); + virtual DOMAttrMapImpl *cloneAttrMap(DOMNode *ownerNode); + virtual bool hasDefaults(); + virtual void hasDefaults(bool value); + virtual int findNamePoint(const XMLCh *name) const; + virtual int findNamePoint(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMNode* removeNamedItemAt(XMLSize_t index); + virtual void setReadOnly(bool readOnly, bool deep); + + + virtual XMLSize_t getLength() const; + virtual DOMNode* item(XMLSize_t index) const; + + virtual DOMNode* getNamedItem(const XMLCh *name) const; + virtual DOMNode* setNamedItem(DOMNode *arg); + virtual DOMNode* removeNamedItem(const XMLCh *name); + + virtual DOMNode* getNamedItemNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMNode* setNamedItemNS(DOMNode *arg); + virtual DOMNode* removeNamedItemNS(const XMLCh *namespaceURI, const XMLCh *localName); + + void reconcileDefaultAttributes(const DOMAttrMapImpl* defaults); + void moveSpecifiedAttributes(DOMAttrMapImpl* srcmap); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMAttrMapImpl(const DOMAttrMapImpl &); + DOMAttrMapImpl & operator = (const DOMAttrMapImpl &); +}; + +// --------------------------------------------------------------------------- +// DOMAttrMapImpl: Getters & Setters +// --------------------------------------------------------------------------- + +inline bool DOMAttrMapImpl::hasDefaults() +{ + return attrDefaults; +} + +inline void DOMAttrMapImpl::hasDefaults(bool value) +{ + attrDefaults = value; +} + +XERCES_CPP_NAMESPACE_END + + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMProcessingInstructionImpl.hpp @@ -0,0 +1,88 @@ +#ifndef DOMProcessingInstructionImpl_HEADER_GUARD_ +#define DOMProcessingInstructionImpl_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMProcessingInstructionImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include +#include "DOMCharacterDataImpl.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMChildNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DocumentImpl; + + +class CDOM_EXPORT DOMProcessingInstructionImpl: public DOMProcessingInstruction { +private: + DOMNodeImpl fNode; + DOMChildNode fChild; + // use fCharacterData to store its data so that those character utitlites can be used + DOMCharacterDataImpl fCharacterData; + + XMLCh *fTarget; + const XMLCh *fBaseURI; + +public: + DOMProcessingInstructionImpl(DOMDocument *ownerDoc, + const XMLCh * target, + const XMLCh *data); + DOMProcessingInstructionImpl(const DOMProcessingInstructionImpl &other, + bool deep=false); + virtual ~DOMProcessingInstructionImpl(); + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; + + virtual const XMLCh *getData() const; + virtual const XMLCh *getTarget() const; + virtual void setData(const XMLCh *arg); + + // NON-DOM: set base uri + virtual void setBaseURI(const XMLCh* baseURI); + + // Non standard extension for the range to work + void deleteData(XMLSize_t offset, XMLSize_t count); + const XMLCh* substringData(XMLSize_t offset, XMLSize_t count) const; + DOMProcessingInstruction* splitText(XMLSize_t offset); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMProcessingInstructionImpl & operator = (const DOMProcessingInstructionImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMTypeInfoImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMTypeInfoImpl.hpp @@ -0,0 +1,159 @@ +/* + * Copyright 2003,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#if !defined(DOMTYPEINFOIMPL_HPP) +#define DOMTYPEINFOIMPL_HPP + +//------------------------------------------------------------------------------------ +// Includes +//------------------------------------------------------------------------------------ +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMDocumentImpl; + +class CDOM_EXPORT DOMTypeInfoImpl : public DOMTypeInfo, public DOMPSVITypeInfo +{ +public: + + //----------------------------------------------------------------------------------- + // Constructor + //----------------------------------------------------------------------------------- + DOMTypeInfoImpl(const XMLCh* namespaceUri=0, const XMLCh* name=0); + + static DOMTypeInfoImpl g_DtdValidatedElement; + static DOMTypeInfoImpl g_DtdNotValidatedAttribute; + static DOMTypeInfoImpl g_DtdValidatedCDATAAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFAttribute; + static DOMTypeInfoImpl g_DtdValidatedIDREFSAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITYAttribute; + static DOMTypeInfoImpl g_DtdValidatedENTITIESAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENAttribute; + static DOMTypeInfoImpl g_DtdValidatedNMTOKENSAttribute; + static DOMTypeInfoImpl g_DtdValidatedNOTATIONAttribute; + static DOMTypeInfoImpl g_DtdValidatedENUMERATIONAttribute; + + //@{ + // ----------------------------------------------------------------------- + // Getter methods + // ----------------------------------------------------------------------- + /** + * Returns The name of a type declared for the associated DOMElement + * or DOMAttr, or null if undeclared. + * + *

"Experimental - subject to change"

+ * + * @return The name of a type declared for the associated DOMElement + * or DOMAttribute, or null if undeclared. + * @since DOM level 3 + */ + virtual const XMLCh* getName() const; + + /** + * The namespace of the type declared for the associated DOMElement + * or DOMAttr or null if the DOMElement does not have + * declaration or if no namespace information is available. + * + *

"Experimental - subject to change"

+ * + * @return The namespace of the type declared for the associated DOMElement + * or DOMAttr or null if the DOMElement does not have + * declaration or if no namespace information is available. + * @since DOM level 3 + */ + virtual const XMLCh* getNamespace() const; + + /** + * Returns the string value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or null if not available. + * + *

"Experimental - subject to change"

+ * + * @return the string value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or null if not available. + */ + virtual const XMLCh* getStringProperty(PSVIProperty prop) const; + + /** + * Returns the numeric value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or 0 if not available. + * + *

"Experimental - subject to change"

+ * + * @return the numeric value of the specified PSVI property associated to a + * DOMElement or DOMAttr, or 0 if not available. + */ + virtual int getNumericProperty(PSVIProperty prop) const; + //@} + + //@{ + // ----------------------------------------------------------------------- + // Setter methods + // ----------------------------------------------------------------------- + + /** + * Set the value for a string PSVI property. + * + *

"Experimental - subject to change"

+ * + */ + virtual void setStringProperty(PSVIProperty prop, const XMLCh* value); + + /** + * Set the value for a numeric PSVI property. + * + *

"Experimental - subject to change"

+ * + */ + virtual void setNumericProperty(PSVIProperty prop, int value); + //@} + + private: + int fBitFields; + const XMLCh* fTypeName; + const XMLCh* fTypeNamespace; + const XMLCh* fMemberTypeName; + const XMLCh* fMemberTypeNamespace; + const XMLCh* fDefaultValue; + const XMLCh* fNormalizedValue; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMTypeInfoImpl (const DOMTypeInfoImpl&); + DOMTypeInfoImpl & operator = (const DOMTypeInfoImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + +/** + * End of file DOMTypeInfo.hpp + */ --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMCDATASectionImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMCDATASectionImpl.hpp @@ -0,0 +1,96 @@ +#ifndef DOMCDATASectionImpl_HEADER_GUARD_ +#define DOMCDATASectionImpl_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMCDATASectionImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include +#include "DOMNodeImpl.hpp" +#include "DOMChildNode.hpp" +#include "DOMParentNode.hpp" +#include "DOMCharacterDataImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMCDATASectionImpl: public DOMCDATASection { +private: + DOMNodeImpl fNode; + DOMParentNode fParent; + DOMChildNode fChild; + DOMCharacterDataImpl fCharacterData; + + +public: + DOMCDATASectionImpl(DOMDocument *ownerDoc, const XMLCh * data); + DOMCDATASectionImpl(const DOMCDATASectionImpl &other, bool deep = false); + + virtual ~DOMCDATASectionImpl(); + + // Functions inherited from TEXT + virtual DOMText* splitText(XMLSize_t offset); + // DOM Level 3 + virtual bool getIsWhitespaceInElementContent() const; + virtual const XMLCh* getWholeText(); + virtual DOMText* replaceWholeText(const XMLCh* content); + + // non-standard extension + virtual bool isIgnorableWhitespace() const; + + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; + + + // Functions introduced by DOMCharacterData + virtual const XMLCh* getData() const; + virtual XMLSize_t getLength() const; + virtual const XMLCh* substringData(XMLSize_t offset, + XMLSize_t count) const; + virtual void appendData(const XMLCh *arg); + virtual void insertData(XMLSize_t offset, const XMLCh *arg); + virtual void deleteData(XMLSize_t offset, + XMLSize_t count); + virtual void replaceData(XMLSize_t offset, + XMLSize_t count, + const XMLCh *arg); + virtual void setData(const XMLCh *data); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMCDATASectionImpl & operator = (const DOMCDATASectionImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNamedNodeMapImpl.hpp @@ -0,0 +1,80 @@ +#ifndef DOMNamedNodeMapImpl_HEADER_GUARD_ +#define DOMNamedNodeMapImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNamedNodeMapImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNodeVector; +class DOMNode; + +#define MAP_SIZE 193 + +class CDOM_EXPORT DOMNamedNodeMapImpl: public DOMNamedNodeMap { +protected: + DOMNodeVector* fBuckets[MAP_SIZE]; + DOMNode* fOwnerNode; // the node this map belongs to + //bool fReadOnly; // revisit - flag on owner node instead? + + bool readOnly(); // revisit. Look at owner node read-only. + +public: + DOMNamedNodeMapImpl(DOMNode *ownerNode); + + virtual ~DOMNamedNodeMapImpl(); + virtual DOMNamedNodeMapImpl *cloneMap(DOMNode *ownerNode); + virtual void setReadOnly(bool readOnly, bool deep); + + virtual XMLSize_t getLength() const; + virtual DOMNode* item(XMLSize_t index) const; + virtual DOMNode* getNamedItem(const XMLCh *name) const; + virtual DOMNode* setNamedItem(DOMNode *arg); + virtual DOMNode* removeNamedItem(const XMLCh *name); + + //Introduced in DOM Level 2 + virtual DOMNode* getNamedItemNS(const XMLCh *namespaceURI, + const XMLCh *localName) const; + virtual DOMNode* setNamedItemNS(DOMNode *arg); + virtual DOMNode* removeNamedItemNS(const XMLCh *namespaceURI, + const XMLCh *localName); +private: + // unimplemented + DOMNamedNodeMapImpl(const DOMNamedNodeMapImpl &); + DOMNamedNodeMapImpl & operator = (const DOMNamedNodeMapImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMAttrNSImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMAttrNSImpl.hpp @@ -0,0 +1,74 @@ +#ifndef DOMAttrNSImpl_HEADER_GUARD_ +#define DOMAttrNSImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMAttrNSImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include "DOMAttrImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMAttrNSImpl: public DOMAttrImpl { +protected: + //Introduced in DOM Level 2 + const XMLCh * fNamespaceURI; //namespace URI of this node + const XMLCh * fLocalName; //local part of qualified name + const XMLCh * fPrefix; // prefix part of qualified name + // revisit - can return local part + // by pointing into the qualified (L1) name. + +public: + DOMAttrNSImpl(DOMDocument *ownerDoc, const XMLCh *name); + DOMAttrNSImpl(DOMDocument *ownerDoc, //DOM Level 2 + const XMLCh *namespaceURI, const XMLCh *qualifiedName); + DOMAttrNSImpl(const DOMAttrNSImpl &other, bool deep=false); + + virtual DOMNode * cloneNode(bool deep) const; + //Introduced in DOM Level 2 + virtual const XMLCh * getNamespaceURI() const; + virtual const XMLCh * getPrefix() const; + virtual const XMLCh * getLocalName() const; + virtual void setPrefix(const XMLCh *prefix); + virtual void release(); + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + void setName(const XMLCh* namespaceURI, const XMLCh* name); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMAttrNSImpl & operator = (const DOMAttrNSImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMEntityReferenceImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMEntityReferenceImpl.hpp @@ -0,0 +1,76 @@ +#ifndef DOMEntityReferenceImpl_HEADER_GUARD_ +#define DOMEntityReferenceImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMEntityReferenceImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include + +#include "DOMParentNode.hpp" +#include "DOMChildNode.hpp" +#include "DOMNodeImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMEntityReferenceImpl: public DOMEntityReference +{ +private: + DOMNodeImpl fNode; + DOMParentNode fParent; + DOMChildNode fChild; + + const XMLCh *fName; + const XMLCh *fBaseURI; + + friend class XercesDOMParser; + +public: + DOMEntityReferenceImpl(DOMDocument *ownerDoc, const XMLCh *entityName); + DOMEntityReferenceImpl(DOMDocument *ownerDoc, const XMLCh *entityName, bool cloneChild); + DOMEntityReferenceImpl(const DOMEntityReferenceImpl &other, bool deep=false); + virtual ~DOMEntityReferenceImpl(); + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; + + virtual void setReadOnly(bool readOnly,bool deep); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMEntityReferenceImpl & operator = (const DOMEntityReferenceImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNodeImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNodeImpl.hpp @@ -0,0 +1,380 @@ +#ifndef DOMNodeImpl_HEADER_GUARD_ +#define DOMNodeImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * A DOMNodeImpl doesn't have any children, and can therefore only be directly + * inherited by classes of nodes that never have any, such as Text nodes. For + * other types, such as Element, classes must inherit from ParentNode. + *

+ * All nodes in a single document must originate + * in that document. (Note that this is much tighter than "must be + * same implementation") Nodes are all aware of their ownerDocument, + * and attempts to mismatch will throw WRONG_DOCUMENT_ERR. + *

+ * However, to save memory not all nodes always have a direct reference + * to their ownerDocument. When a node is owned by another node it relies + * on its owner to store its ownerDocument. Parent nodes always store it + * though, so there is never more than one level of indirection. + * And when a node doesn't have an owner, ownerNode refers to its + * ownerDocument. + **/ + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNamedNodeMap; +class DOMNodeList; +class DOMNode; +class DOMDocument; +class DOMElement; + +class CDOM_EXPORT DOMNodeImpl { +public: + + // data + DOMNode *fOwnerNode; // typically the parent but not always! + + unsigned short flags; + + static const unsigned short READONLY; + static const unsigned short SYNCDATA; + static const unsigned short SYNCCHILDREN; + static const unsigned short OWNED; + static const unsigned short FIRSTCHILD; + static const unsigned short SPECIFIED; + static const unsigned short IGNORABLEWS; + static const unsigned short SETVALUE; + static const unsigned short ID_ATTR; + static const unsigned short USERDATA; + static const unsigned short LEAFNODETYPE; + static const unsigned short CHILDNODE; + static const unsigned short TOBERELEASED; + + +public: + DOMNodeImpl(DOMNode *ownerDocument); + DOMNodeImpl(const DOMNodeImpl &other); + ~DOMNodeImpl(); + + DOMNode * appendChild(DOMNode *newChild); + DOMNamedNodeMap * getAttributes() const; + DOMNodeList * getChildNodes() const; + DOMNode * getFirstChild() const; + DOMNode * getLastChild() const; + const XMLCh * getLocalName() const; + const XMLCh * getNamespaceURI() const; + DOMNode * getNextSibling() const; + const XMLCh * getNodeValue() const; + DOMDocument * getOwnerDocument() const; + DOMNode * getParentNode() const; + const XMLCh * getPrefix() const; + DOMNode * getPreviousSibling() const; + bool hasChildNodes() const; + DOMNode * insertBefore(DOMNode *newChild, DOMNode *refChild); + void normalize(); + DOMNode * removeChild(DOMNode *oldChild); + DOMNode * replaceChild(DOMNode *newChild, DOMNode *oldChild); + void setNodeValue(const XMLCh *value); + void setPrefix(const XMLCh *fPrefix); + void setReadOnly(bool readOnly, bool deep); + bool isSupported(const XMLCh *feature, const XMLCh *version) const; + bool hasAttributes() const; + + // Introduced in DOM Level 3 + void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler); + void* getUserData(const XMLCh* key) const; + bool isSameNode(const DOMNode* other) const; + bool isEqualNode(const DOMNode* arg) const; + const XMLCh* getBaseURI() const ; + short compareTreePosition(const DOMNode* other) const; + const XMLCh* getTextContent() const ; + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const; + void setTextContent(const XMLCh* textContent) ; + const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const ; + bool isDefaultNamespace(const XMLCh* namespaceURI) const ; + const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ; + DOMNode* getInterface(const XMLCh* feature) ; + + + // Helper functions for DOM Level 3 + void release(); + void callUserDataHandlers(DOMUserDataHandler::DOMOperationType operation, + const DOMNode* src, + const DOMNode* dst) const; + //reverses the bit pattern given by compareTreePosition + short reverseTreeOrderBitPattern(short pattern) const; + + + //Utility, not part of DOM Level 2 API + static bool isKidOK(DOMNode *parent, DOMNode *child); + static const XMLCh *mapPrefix(const XMLCh *prefix, + const XMLCh *namespaceURI, short nType); + + static const XMLCh *getXmlnsString(); + static const XMLCh *getXmlnsURIString(); + static const XMLCh *getXmlString(); + static const XMLCh *getXmlURIString(); + +public: // should really be protected - ALH + + DOMNode* getElementAncestor (const DOMNode* currentNode) const; + const XMLCh* lookupNamespacePrefix(const XMLCh* const namespaceURI, bool useDefaultx, DOMElement *el) const ; + void setOwnerDocument(DOMDocument *doc); + + /* + * Flags setters and getters + */ + + inline bool isReadOnly() const { + return (flags & READONLY) != 0; + } + + inline void isReadOnly(bool value) { + flags = (value ? flags | READONLY : flags & ~READONLY); + } + + inline bool needsSyncData() const { + return (flags & SYNCDATA) != 0; + } + + inline void needsSyncData(bool value) { + flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA); + } + + inline bool needsSyncChildren() const { + return (flags & SYNCCHILDREN) != 0; + } + + inline void needsSyncChildren(bool value) { + flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN); + } + + // For Attributes, true if the attr node is attached to an element. + // For all other node types, true if the node has a parent node. + inline bool isOwned() const { + return (flags & OWNED) != 0; + } + + inline void isOwned(bool value) { + flags = (value ? flags | OWNED : flags & ~OWNED); + } + + inline bool isFirstChild() const { + return (flags & FIRSTCHILD) != 0; + } + + inline void isFirstChild(bool value) { + flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); + } + + inline bool isSpecified() const { + return (flags & SPECIFIED) != 0; + } + + inline void isSpecified(bool value) { + flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED); + } + + inline bool ignorableWhitespace() const { + return (flags & IGNORABLEWS) != 0; + } + + inline void ignorableWhitespace(bool value) { + flags = (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS); + } + + inline bool setValue() const { + return (flags & SETVALUE) != 0; + } + + inline void setValue(bool value) { + flags = (value ? flags | SETVALUE : flags & ~SETVALUE); + } + + inline bool isIdAttr() const { + return (flags & ID_ATTR) != 0; + } + + inline void isIdAttr(bool value) { + flags = (value ? flags | ID_ATTR : flags & ~ID_ATTR); + } + + inline bool hasUserData() const { + return (flags & USERDATA) != 0; + } + + inline void hasUserData(bool value) { + flags = (value ? flags | USERDATA : flags & ~USERDATA); + } + + // + // LeafNode is set true for node types that can not be ParentNodes (can't have children) + // This knowledge is used to allow casting from any unknown node type to the + // IDParentImpl or IDChildImpl parts of the node. + // + inline bool isLeafNode() const { + return (flags & LEAFNODETYPE) != 0; + } + + inline void setIsLeafNode(bool value) { + flags = (value ? flags | LEAFNODETYPE : flags & ~LEAFNODETYPE); + } + + + // + // ChildNode is set true for node types that can be children of other nodes, and + // therefore include a DOMChildNode data member. Note that all of the leaf + // node types (above flag) are also ChildNodes, but not all ChildNodes are + // leaf nodes. + inline bool isChildNode() const { + return (flags & CHILDNODE) != 0; + } + + inline void setIsChildNode(bool value) { + flags = (value ? flags | CHILDNODE : flags & ~CHILDNODE); + } + + // True if this node has to be released regardless if it has a owner or not + // This is true if called from fParent->release() + inline bool isToBeReleased() const { + return (flags & TOBERELEASED) != 0; + } + + inline void isToBeReleased(bool value) { + flags = (value ? flags | TOBERELEASED : flags & ~TOBERELEASED); + } + +}; + + +// This macro lists all of the pure virtual functions declared in DOMNode that must +// be implemented by all node types. Since there is no inheritance of implementation, +// using this macro in the class declaration of the node types make it easier to +// accurately get all of the functions declared. +// +#define DOMNODE_FUNCTIONS \ + virtual DOMNode* appendChild(DOMNode *newChild) ;\ + virtual DOMNode* cloneNode(bool deep) const ;\ + virtual DOMNamedNodeMap* getAttributes() const ;\ + virtual DOMNodeList* getChildNodes() const ;\ + virtual DOMNode* getFirstChild() const ;\ + virtual DOMNode* getLastChild() const ;\ + virtual const XMLCh* getLocalName() const ;\ + virtual const XMLCh* getNamespaceURI() const ;\ + virtual DOMNode* getNextSibling() const ;\ + virtual const XMLCh* getNodeName() const ;\ + virtual short getNodeType() const ;\ + virtual const XMLCh* getNodeValue() const ;\ + virtual DOMDocument* getOwnerDocument() const ;\ + virtual const XMLCh* getPrefix() const ;\ + virtual DOMNode* getParentNode() const ;\ + virtual DOMNode* getPreviousSibling() const ;\ + virtual bool hasChildNodes() const ;\ + virtual DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild) ;\ + virtual void normalize() ;\ + virtual DOMNode* removeChild(DOMNode *oldChild) ;\ + virtual DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild) ;\ + virtual void setNodeValue(const XMLCh *nodeValue) ;\ + virtual bool isSupported(const XMLCh *feature, const XMLCh *version) const ;\ + virtual bool hasAttributes() const ;\ + virtual void setPrefix(const XMLCh * prefix) ;\ + virtual void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) ;\ + virtual void* getUserData(const XMLCh* key) const ;\ + virtual bool isSameNode(const DOMNode* other) const;\ + virtual bool isEqualNode(const DOMNode* arg) const;\ + virtual const XMLCh* getBaseURI() const ;\ + virtual short compareTreePosition(const DOMNode* other) const ;\ + virtual const XMLCh* getTextContent() const ;\ + const XMLCh* getTextContent(XMLCh* pzBuffer, unsigned int& rnBufferLength) const;\ + virtual void setTextContent(const XMLCh* textContent) ;\ + virtual const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const ;\ + virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const;\ + virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const ;\ + virtual DOMNode* getInterface(const XMLCh* feature) ;\ + virtual void release() + + +/* + * Here are dummy stubs for most of the functions introduced by DOMNode. + * Each subclass of DOMNode will have something like this that delegates each + * function to the appropriate implementation. + * Functions that must be supplied by every node class are omitted. + * + DOMNode* xxx::appendChild(DOMNode *newChild) {return fParent.appendChild (newChild); }; + DOMNamedNodeMap* xxx::getAttributes() const {return fNode.getAttributes (); }; + DOMNodeList* xxx::getChildNodes() const {return fParent.getChildNodes (); }; + DOMNode* xxx::getFirstChild() const {return fParent.getFirstChild (); }; + DOMNode* xxx::getLastChild() const {return fParent.getLastChild (); }; + const XMLCh* xxx::getLocalName() const {return fNode.getLocalName (); }; + const XMLCh* xxx::getNamespaceURI() const {return fNode.getNamespaceURI (); }; + DOMNode* xxx::getNextSibling() const {return fChild.getNextSibling (); }; + const XMLCh* xxx::getNodeValue() const {return fNode.getNodeValue (); }; + DOMDocument* xxx::getOwnerDocument() const {return fNode.getOwnerDocument (); }; + const XMLCh* xxx::getPrefix() const {return fNode.getPrefix (); }; + DOMNode* xxx::getParentNode() const {return fChild.getParentNode (this); }; + DOMNode* xxx::getPreviousSibling() const {return fChild.getPreviousSibling (this); }; + bool xxx::hasChildNodes() const {return fParent.hasChildNodes (); }; + DOMNode* xxx::insertBefore(DOMNode *newChild, DOMNode *refChild) + {return fParent.insertBefore (newChild, refChild); }; + void xxx::normalize() {fParent.normalize(); }; + DOMNode* xxx::removeChild(DOMNode *oldChild) {return fParent.removeChild (oldChild); }; + DOMNode* xxx::replaceChild(DOMNode *newChild, DOMNode *oldChild) + {return fParent.replaceChild (newChild, oldChild); }; + bool xxx::isSupported(const XMLCh *feature, const XMLCh *version) const + {return fNode.isSupported (feature, version); }; + void xxx::setPrefix(const XMLCh *prefix) {fNode.setPrefix(prefix); }; + bool xxx::hasAttributes() const {return fNode.hasAttributes(); }; + bool xxx::isSameNode(const DOMNode* other) const {return fNode.isSameNode(other); }; + bool xxx::isEqualNode(const DOMNode* arg) const {return fNode.isEqualNode(arg); }; + void* xxx::setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) + {return fNode.setUserData(key, data, handler); }; + void* xxx::getUserData(const XMLCh* key) const {return fNode.getUserData(key); }; + const XMLCh* xxx::getBaseURI() const {return fNode.getBaseURI(); }; + short xxx::compareTreePosition(const DOMNode* other) const {return fNode.compareTreePosition(other); }; + const XMLCh* xxx::getTextContent() const {return fNode.getTextContent(); }; + void xxx::setTextContent(const XMLCh* textContent){fNode.setTextContent(textContent); }; + const XMLCh* xxx::lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const {return fNode.lookupNamespacePrefix(namespaceURI, useDefault); }; + bool xxx::isDefaultNamespace(const XMLCh* namespaceURI) const {return fNode.isDefaultNamespace(namespaceURI); }; + const XMLCh* xxx::lookupNamespaceURI(const XMLCh* prefix) const {return fNode.lookupNamespaceURI(prefix); }; + DOMNode* xxx::getInterface(const XMLCh* feature) {return fNode.getInterface(feature); }; + + +*/ + + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMCommentImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMCommentImpl.hpp @@ -0,0 +1,83 @@ +#ifndef DOMCommentImpl_HEADER_GUARD_ +#define DOMCommentImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMCommentImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include + +#include "DOMNodeImpl.hpp" +#include "DOMChildNode.hpp" +#include "DOMCharacterDataImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMCommentImpl: public DOMComment { +public: + DOMNodeImpl fNode; + DOMChildNode fChild; + DOMCharacterDataImpl fCharacterData; + +public: + DOMCommentImpl(DOMDocument *, const XMLCh *); + DOMCommentImpl(const DOMCommentImpl &other, bool deep); + virtual ~DOMCommentImpl(); + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; + + + // Functions from DOMCharacterData + virtual void appendData(const XMLCh *data); + virtual void deleteData(XMLSize_t offset, XMLSize_t count); + virtual const XMLCh * getData() const; + virtual XMLSize_t getLength() const; + virtual void insertData(XMLSize_t offset, const XMLCh * data); + virtual void replaceData(XMLSize_t offset, XMLSize_t count, const XMLCh * data); + virtual void setData(const XMLCh * arg); + virtual const XMLCh * substringData(XMLSize_t offset, XMLSize_t count) const; + + // Non standard extension for the range to work + DOMComment* splitText(XMLSize_t offset); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMCommentImpl & operator = (const DOMCommentImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMChildNode.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMChildNode.hpp @@ -0,0 +1,71 @@ +#ifndef DOMChildNode_HEADER_GUARD_ +#define DOMChildNode_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMChildNode.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * ChildNode adds to NodeImpl the capability of being a child, this is having + * siblings. + **/ + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMDocument; +class DOMNode; + + +class CDOM_EXPORT DOMChildNode { + +public: + DOMNode *previousSibling; + DOMNode *nextSibling; + + DOMChildNode(); + DOMChildNode(const DOMChildNode &other); + ~DOMChildNode(); + + DOMNode * getNextSibling() const; + DOMNode * getParentNode(const DOMNode *thisNode) const; + DOMNode * getPreviousSibling(const DOMNode *thisNode) const; + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMChildNode & operator = (const DOMChildNode &); +}; + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMImplementationImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMImplementationImpl.hpp @@ -0,0 +1,97 @@ +#ifndef DOMImplementationImpl_HEADER_GUARD_ +#define DOMImplementationImpl_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMImplementationImpl.hpp 176148 2004-10-20 15:19:07Z knoaman $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class XMLMsgLoader; + +class DOMImplementationImpl: public XMemory, + public DOMImplementation, + public DOMImplementationSource +{ +private: + DOMImplementationImpl(const DOMImplementationImpl &); + DOMImplementationImpl & operator = (const DOMImplementationImpl &); + friend class XMLInitializer; +protected: + DOMImplementationImpl() {}; +public: + virtual ~DOMImplementationImpl() {}; + static DOMImplementationImpl* getDOMImplementationImpl(); + static XMLMsgLoader* getMsgLoader4DOM(); + + // ------------------------------------------------------------ + // DOMImplementation Virtual interface + // ------------------------------------------------------------ + virtual bool hasFeature(const XMLCh * feature, const XMLCh * version) const; + + // Introduced in DOM Level 2 + virtual DOMDocumentType* createDocumentType(const XMLCh *qualifiedName, + const XMLCh * publicId, + const XMLCh *systemId); + virtual DOMDocument* createDocument(const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + DOMDocumentType *doctype, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + // DOM Level 3 + virtual DOMImplementation* getInterface(const XMLCh* feature); + + // Non-standard extension + virtual DOMDocument* createDocument(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + // ------------------------------------------------------------ + // DOMImplementationLS Virtual interface + // ------------------------------------------------------------ + // Introduced in DOM Level 3 + // Experimental - subject to change + virtual DOMBuilder* createDOMBuilder(const short mode, + const XMLCh* const schemaType, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager, + XMLGrammarPool* const gramPool = 0); + virtual DOMWriter* createDOMWriter(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual DOMInputSource* createDOMInputSource(); + + // ------------------------------------------------------------ + // DOMImplementationSource Virtual interface + // ------------------------------------------------------------ + virtual DOMImplementation* getDOMImplementation(const XMLCh* features) const; + +}; + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMStringPool.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMStringPool.hpp @@ -0,0 +1,172 @@ +#ifndef DOMStringPool_HEADER_GUARD_ +#define DOMStringPool_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMStringPool.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +struct DOMStringPoolEntry; +class DOMDocumentImpl; + +// +// DOMStringPool is a hash table of XMLCh* Strings. +// Each DOM Document maintains a DOMStringPool containing a XMLCh* String +// for each Element tag name and Attribute Name that has been added +// to the document. When creating additional elements or attributes, +// if the name has been seen before, the already existing string +// will be reused. +// +class DOMStringPool +{ +public: + DOMStringPool(int hashTableSize, DOMDocumentImpl *doc); + ~DOMStringPool(); + + const XMLCh *getPooledString(const XMLCh *in); + + +private: + DOMStringPool(const DOMStringPool &other); // Copy constructor and assignment + DOMStringPool& operator = (const DOMStringPool &other); // of DOMStringPool are not supported. + + + DOMDocumentImpl *fDoc; + DOMStringPoolEntry **fHashTable; + int fHashTableSize; + +}; + + +// +// DOMBuffer is a lightweight text buffer +// The buffer is not nul terminated until some asks to see the raw buffer +// contents. This also avoids overhead during append operations. +class DOMBuffer +{ +public : + // ----------------------------------------------------------------------- + // Constructors and Destructor + // ----------------------------------------------------------------------- + DOMBuffer(DOMDocumentImpl *doc, int capacity = 31); + + DOMBuffer(DOMDocumentImpl *doc, const XMLCh* string); + + ~DOMBuffer() + { + } + + // ----------------------------------------------------------------------- + // Buffer Management + // ----------------------------------------------------------------------- + void append + ( + const XMLCh* const chars + , const unsigned int count = 0 + ); + + const XMLCh* getRawBuffer() const + { + fBuffer[fIndex] = 0; + return fBuffer; + } + + void reset() + { + fIndex = 0; + fBuffer[0] = 0; + } + + void set + ( + const XMLCh* const chars + , const unsigned int count = 0 + ); + + void chop + ( + const unsigned int count + ) + { + fBuffer[count] = 0; + fIndex = count; + } + + + // ----------------------------------------------------------------------- + // Getters + // ----------------------------------------------------------------------- + unsigned int getLen() const + { + return fIndex; + } + + // ----------------------------------------------------------------------- + // Private helpers + // ----------------------------------------------------------------------- + void expandCapacity(const unsigned int extraNeeded); + + +private : + // ----------------------------------------------------------------------- + // Private data members + // + // fBuffer + // The pointer to the buffer data. Its grown as needed. Its always + // one larger than fCapacity, to leave room for the null terminator. + // + // fIndex + // The current index into the buffer, as characters are appended + // to it. If its zero, then the buffer is empty. + // + // fCapacity + // The current capacity of the buffer. Its actually always one + // larger, to leave room for the null terminator. + // + // fDoc + // For allocating memory + // ----------------------------------------------------------------------- + XMLCh* fBuffer; + unsigned int fIndex; + unsigned int fCapacity; + DOMDocumentImpl* fDoc; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMBuffer(const DOMBuffer &); + DOMBuffer & operator = (const DOMBuffer &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMDocumentTypeImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMDocumentTypeImpl.hpp @@ -0,0 +1,104 @@ +#ifndef DOMDocumentTypeImpl_HEADER_GUARD_ +#define DOMDocumentTypeImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDocumentTypeImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#include +#include +#include "DOMNodeImpl.hpp" +#include "DOMChildNode.hpp" +#include "DOMParentNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNamedNodeMapImpl; + +class CDOM_EXPORT DOMDocumentTypeImpl: public DOMDocumentType { +private: + DOMNodeImpl fNode; + DOMParentNode fParent; + DOMChildNode fChild; + + const XMLCh * fName; + DOMNamedNodeMapImpl* fEntities; + DOMNamedNodeMapImpl* fNotations; + DOMNamedNodeMapImpl* fElements; + const XMLCh * fPublicId; + const XMLCh * fSystemId; + const XMLCh * fInternalSubset; + + bool fIntSubsetReading; + bool fIsCreatedFromHeap; + + virtual void setPublicId(const XMLCh * value); + virtual void setSystemId(const XMLCh * value); + virtual void setInternalSubset(const XMLCh *value); + bool isIntSubsetReading() const; + + friend class AbstractDOMParser; + friend class DOMDocumentImpl; + +public: + DOMDocumentTypeImpl(DOMDocument *, const XMLCh *, bool); + DOMDocumentTypeImpl(DOMDocument *, + const XMLCh *qualifiedName, //DOM Level 2 + const XMLCh *publicId, const XMLCh *systemId, bool); + DOMDocumentTypeImpl(const DOMDocumentTypeImpl &other, bool heap, bool deep=false); + virtual ~DOMDocumentTypeImpl(); + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; + + virtual void setOwnerDocument(DOMDocument *doc); + virtual DOMNamedNodeMap * getEntities() const; + virtual const XMLCh * getName() const; + virtual DOMNamedNodeMap * getNotations() const; + virtual DOMNamedNodeMap * getElements() const; + virtual void setReadOnly(bool readOnly, bool deep); + + //Introduced in DOM Level 2 + + virtual const XMLCh * getPublicId() const; + virtual const XMLCh * getSystemId() const; + virtual const XMLCh * getInternalSubset() const; + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDocumentTypeImpl & operator = (const DOMDocumentTypeImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMParentNode.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMParentNode.hpp @@ -0,0 +1,111 @@ +#ifndef DOMParentNode_HEADER_GUARD_ +#define DOMParentNode_HEADER_GUARD_ + + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMParentNode.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * ParentNode provides the capability of having child + * nodes. Not every node in the DOM can have children, so only nodes that can + * should include this class and pay the price for it. + *

+ * While we have a direct reference to the first child, the last child is + * stored as the previous sibling of the first child. First child nodes are + * marked as being so, and getNextSibling hides this fact. + * + **/ + +#include +#include "DOMNodeListImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMChildNode; +class DOMDocument; +class DOMNode; +class DOMNodeList; + +class CDOM_EXPORT DOMParentNode { +public: + DOMDocument *fOwnerDocument; // Document this node belongs to + DOMNode *fFirstChild; + DOMNodeListImpl fChildNodeList; // for GetChildNodes() + +public: + DOMParentNode(DOMDocument *ownerDocument); + DOMParentNode(const DOMParentNode &other); + + DOMDocument * getOwnerDocument() const; + void setOwnerDocument(DOMDocument* doc); + + // Track changes to the node tree structure under this node. An optimization + // for NodeLists. + int changes() const; + void changed(); + + DOMNode* appendChild(DOMNode *newChild); + DOMNodeList* getChildNodes() const; + DOMNode* getFirstChild() const; + DOMNode* getLastChild() const; + XMLSize_t getLength() const; + bool hasChildNodes() const; + DOMNode* insertBefore(DOMNode *newChild, DOMNode *refChild); + DOMNode* item(XMLSize_t index) const; + DOMNode* removeChild(DOMNode *oldChild); + DOMNode* replaceChild(DOMNode *newChild, DOMNode *oldChild); + + //Introduced in DOM Level 2 + void normalize(); + + //Introduced in DOM Level 3 + bool isEqualNode(const DOMNode* arg) const; + + // NON-DOM + // unlike getOwnerDocument this never returns null, even for Document nodes + DOMDocument * getDocument() const; + void release(); + + +public: + void cloneChildren(const DOMNode *other); + DOMNode * lastChild() const; + void lastChild(DOMNode *); + +private: + // unimplemented + DOMParentNode& operator= (const DOMParentNode& other); +}; + +#define GetDOMParentNodeMemoryManager GET_DIRECT_MM(fOwnerDocument) + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMTextImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMTextImpl.hpp @@ -0,0 +1,97 @@ +#ifndef DOMTextImpl_HEADER_GUARD_ +#define DOMTextImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMTextImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#include +#include + +#include "DOMChildNode.hpp" +#include "DOMNodeImpl.hpp" +#include "DOMCharacterDataImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMTextImpl: public DOMText { +public: + DOMNodeImpl fNode; + DOMChildNode fChild; + DOMCharacterDataImpl fCharacterData; + +public: + DOMTextImpl(DOMDocument* ownerDoc, const XMLCh* data); + DOMTextImpl(const DOMTextImpl& other, bool deep=false); + + virtual ~DOMTextImpl(); + virtual DOMText* splitText(XMLSize_t offset); + // DOM Level 3 + virtual bool getIsWhitespaceInElementContent() const; + virtual const XMLCh* getWholeText(); + virtual DOMText* replaceWholeText(const XMLCh* content); + + // non-standard extension + virtual bool isIgnorableWhitespace() const; + + // Declare the functions coming from DOMNode. + DOMNODE_FUNCTIONS; + + + // All of the functions coming from DOMCharacterData + virtual const XMLCh* getData() const; + virtual XMLSize_t getLength() const; + virtual const XMLCh* substringData(XMLSize_t offset, + XMLSize_t count) const; + virtual void appendData(const XMLCh *arg); + virtual void insertData(XMLSize_t offset, const XMLCh *arg); + virtual void deleteData(XMLSize_t offset, + XMLSize_t count); + virtual void replaceData(XMLSize_t offset, + XMLSize_t count, + const XMLCh *arg); + virtual void setData(const XMLCh *data); + +protected: + virtual void setIgnorableWhitespace(bool ignorable); + friend class AbstractDOMParser; + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMTextImpl & operator = (const DOMTextImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMErrorImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMErrorImpl.hpp @@ -0,0 +1,262 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMErrorImpl.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + + +#ifndef DOMERRORIMPL_HPP +#define DOMERRORIMPL_HPP + +#include +#include +XERCES_CPP_NAMESPACE_BEGIN + + +/** + * Introduced in DOM Level 3 + * Implementation of a DOMError interface. + * + * @see DOMError#DOMError + */ + +class CDOM_EXPORT DOMErrorImpl : public DOMError +{ +public: + /** @name Constructors and Destructor */ + //@{ + + /** Constructors */ + DOMErrorImpl(const short severity); + + DOMErrorImpl + ( + const short severity + , const XMLCh* const message + , DOMLocator* const location + ); + + DOMErrorImpl + ( + const short severity + , const XMLCh* type + , const XMLCh* message + , void* relatedData + ); + + /** Desctructor */ + virtual ~DOMErrorImpl(); + + //@} + + /** @name Get function */ + //@{ + + /** + *

"Experimental - subject to change"

+ * + * Get the severity of the error + */ + virtual short getSeverity() const; + + /** + *

"Experimental - subject to change"

+ * + * Get the message describing the error that occured. + */ + virtual const XMLCh* getMessage() const; + + /** + *

"Experimental - subject to change"

+ * + * Get the location of the error + */ + virtual DOMLocator* getLocation() const; + + /** + * The related platform dependent exception if any. + * + *

"Experimental - subject to change"

+ * + * @see setRelatedException + * @since DOM Level 3 + */ + virtual void* getRelatedException() const; + + virtual const XMLCh* getType() const; + + virtual void* getRelatedData() const; + + //@} + + + /** @name Set function */ + //@{ + + /** + *

"Experimental - subject to change"

+ * + * Set the severity of the error + * + * @param severity the type of the error to set + */ + virtual void setSeverity(const short severity); + + /** + *

"Experimental - subject to change"

+ * + * Set the error message + * + * @param message the error message to set. + */ + virtual void setMessage(const XMLCh* const message); + + /** + *

"Experimental - subject to change"

+ * + * Set the location of the error + * + * @param location the location of the error to set. + */ + virtual void setLocation(DOMLocator* const location); + + /** + * @param value true if DOMLocator is owned and should be + * deleted, false otherwise. + */ + void setAdoptLocation(const bool value); + + /** + * The related platform dependent exception if any. + * + *

"Experimental - subject to change"

+ * + * @param exc the related exception to set. + * @see getRelatedException + * @since DOM Level 3 + */ + virtual void setRelatedException(void* exc) const; + + virtual void setType(const XMLCh* type); + + virtual void setRelatedData(void* relatedData); + + +private : + /* Unimplemented constructors and operators */ + + /* Copy constructor */ + DOMErrorImpl(const DOMErrorImpl&); + + /* Assignment operator */ + DOMErrorImpl& operator=(const DOMErrorImpl&); + + // ----------------------------------------------------------------------- + // Private data members + // + // fAdoptLocation + // Indicates whether we own the DOMLocator object or not. + // + // fSeverity + // The type of the error. + // + // fMessage + // The error message. + // + // fLocation + // The location info of the error. + // + // fType + // The type of the error. + // + // fRelatedData + // The data related to this error. + // + // ----------------------------------------------------------------------- + bool fAdoptLocation; + short fSeverity; + const XMLCh* fMessage; + DOMLocator* fLocation; + const XMLCh* fType; + void* fRelatedData; +}; + +// --------------------------------------------------------------------------- +// DOMErrorImpl: Getter methods +// --------------------------------------------------------------------------- +inline short DOMErrorImpl::getSeverity() const +{ + return fSeverity; +} + +inline const XMLCh* DOMErrorImpl::getMessage() const +{ + return fMessage; +} + +inline DOMLocator* DOMErrorImpl::getLocation() const +{ + return fLocation; +} + +inline void* DOMErrorImpl::getRelatedException() const +{ + return 0; +} + +inline const XMLCh* DOMErrorImpl::getType() const +{ + return fType; +} + +inline void* DOMErrorImpl::getRelatedData() const +{ + return fRelatedData; +} + +// --------------------------------------------------------------------------- +// DOMLocatorImpl: Setter methods +// --------------------------------------------------------------------------- +inline void DOMErrorImpl::setSeverity(const short severity) +{ + fSeverity = severity; +} + +inline void DOMErrorImpl::setMessage(const XMLCh* const message) +{ + fMessage = message; +} + +inline void DOMErrorImpl::setAdoptLocation(const bool value) +{ + fAdoptLocation = value; +} + +inline void DOMErrorImpl::setType(const XMLCh* type) +{ + fType = type; +} + +inline void DOMErrorImpl::setRelatedData(void* relatedData) +{ + fRelatedData = relatedData; +} + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNodeListImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNodeListImpl.hpp @@ -0,0 +1,72 @@ +#ifndef DOMNodeListImpl_HEADER_GUARD_ +#define DOMNodeListImpl_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeListImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +// NodeList implementation class - +// This is for NodeLists returned by GetChildNodes only, not for +// node lists returned by GetElementsByTagName +// +// Every node type capable of having children has (as an embedded member) +// an instance of this class. To hold down the size overhead on each node, a +// cache of extended data for active node lists is maintained +// separately. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNode; + +class CDOM_EXPORT DOMNodeListImpl: public DOMNodeList +{ +private: + DOMNode *fNode; + + // Unused, and unimplemented constructors, operators, etc. + DOMNodeListImpl(); + DOMNodeListImpl(const DOMNodeListImpl & other); + DOMNodeListImpl & operator = (const DOMNodeListImpl & other); + +public: + DOMNodeListImpl(DOMNode *node); + virtual ~DOMNodeListImpl(); + virtual DOMNode * item(XMLSize_t index) const; + virtual XMLSize_t getLength() const; +}; + +XERCES_CPP_NAMESPACE_END + +#endif + + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMNodeVector.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMNodeVector.hpp @@ -0,0 +1,86 @@ +#ifndef DOMNodeVector_HEADER_GUARD_ +#define DOMNodeVector_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMNodeVector.hpp 176317 2005-02-21 18:19:45Z cargilld $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNode; +class DOMDocument; + + +class DOMNodeVector { +private: + DOMNode **data; + XMLSize_t allocatedSize; + XMLSize_t nextFreeSlot; + void init(DOMDocument *doc, XMLSize_t size); + void checkSpace(); + + // unimplemented + DOMNodeVector ( const DOMNodeVector& toCopy); + DOMNodeVector& operator= (const DOMNodeVector& other); + +public: + DOMNodeVector(DOMDocument *doc); + DOMNodeVector(DOMDocument *doc, XMLSize_t size); + ~DOMNodeVector(); + + XMLSize_t size(); + DOMNode* elementAt(XMLSize_t index); + DOMNode* lastElement(); + void addElement(DOMNode *); + void insertElementAt(DOMNode *, XMLSize_t index); + void setElementAt(DOMNode *val, XMLSize_t index); + void removeElementAt(XMLSize_t index); + void reset(); +}; + +inline DOMNode *DOMNodeVector::elementAt(XMLSize_t index) { + if (index >= nextFreeSlot) + return 0; + return data[index]; +} + +inline DOMNode *DOMNodeVector::lastElement() { + if (nextFreeSlot == 0) + return 0; + return data[nextFreeSlot-1]; +} + +inline XMLSize_t DOMNodeVector::size() { + return nextFreeSlot; +} + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMElementNSImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMElementNSImpl.hpp @@ -0,0 +1,86 @@ +#ifndef DOMElementNSImpl_HEADER_GUARD_ +#define DOMElementNSImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMElementNSImpl.hpp 176052 2004-09-20 15:00:51Z amassari $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include "DOMElementImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMTypeInfoImpl; + +class CDOM_EXPORT DOMElementNSImpl: public DOMElementImpl { +protected: + //Introduced in DOM Level 2 + const XMLCh * fNamespaceURI; //namespace URI of this node + const XMLCh * fLocalName; //local part of qualified name + const XMLCh * fPrefix; + +private: + const DOMTypeInfoImpl *fSchemaType; + +public: + DOMElementNSImpl(DOMDocument *ownerDoc, const XMLCh *name); + DOMElementNSImpl(DOMDocument *ownerDoc, //DOM Level 2 + const XMLCh *namespaceURI, const XMLCh *qualifiedName); + DOMElementNSImpl(const DOMElementNSImpl &other, bool deep=false); + + virtual DOMNode * cloneNode(bool deep) const; + virtual DOMNode * getInterface(const XMLCh* feature); + + //Introduced in DOM Level 2 + virtual const XMLCh *getNamespaceURI() const; + virtual const XMLCh *getPrefix() const; + virtual const XMLCh *getLocalName() const; + virtual void setPrefix(const XMLCh *prefix); + virtual void release(); + + //Introduced in DOM Level 3 + virtual const XMLCh *getBaseURI() const; + virtual const DOMTypeInfo * getTypeInfo() const; + + // helper function for DOM Level 3 renameNode + virtual DOMNode* rename(const XMLCh* namespaceURI, const XMLCh* name); + void setName(const XMLCh* namespaceURI, const XMLCh* name); + + //helper function for DOM Level 3 TypeInfo + virtual void setTypeInfo(const DOMTypeInfoImpl* typeInfo); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMElementNSImpl & operator = (const DOMElementNSImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMRangeImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMRangeImpl.hpp @@ -0,0 +1,174 @@ +#ifndef DOMRangeImpl_HEADER_GUARD_ +#define DOMRangeImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* + * $Id: DOMRangeImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + + +class DOMNode; +class DOMDocumentFragment; +class DOMDocument; +class DOMText; +class MemoryManager; + +class CDOM_EXPORT DOMRangeImpl: public DOMRange { +private: + enum TraversalType { + EXTRACT_CONTENTS = 1, + CLONE_CONTENTS = 2, + DELETE_CONTENTS = 3 + }; + + enum TraversePoint { + BEFORE = -1, + START = 0, + AFTER = 1 + }; + + //private data + + DOMNode* fStartContainer; + XMLSize_t fStartOffset; + DOMNode* fEndContainer; + XMLSize_t fEndOffset; + bool fCollapsed; + DOMDocument* fDocument; + bool fDetached; + + DOMNode* fRemoveChild; + MemoryManager* fMemoryManager; + +public: + //c'tor + DOMRangeImpl(DOMDocument* doc, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DOMRangeImpl(const DOMRangeImpl& other); + + //d'tor + ~DOMRangeImpl(); + + //getter functions + virtual DOMNode* getStartContainer() const; + virtual XMLSize_t getStartOffset() const; + virtual DOMNode* getEndContainer() const; + virtual XMLSize_t getEndOffset() const; + virtual bool getCollapsed() const; + virtual const DOMNode* getCommonAncestorContainer() const; + + //setter functions + virtual void setStart(const DOMNode *parent, XMLSize_t offset); + virtual void setEnd(const DOMNode *parent, XMLSize_t offset); + + virtual void setStartBefore(const DOMNode *refNode); + virtual void setStartAfter(const DOMNode *refNode); + virtual void setEndBefore(const DOMNode *refNode); + virtual void setEndAfter(const DOMNode *refNode); + + //misc functions + virtual void collapse(bool toStart); + virtual void selectNode(const DOMNode *node); + virtual void selectNodeContents(const DOMNode *node); + + //Functions related to comparing range Boundrary-Points + virtual short compareBoundaryPoints(CompareHow how, const DOMRange* range) const; + virtual void deleteContents(); + virtual DOMDocumentFragment* extractContents(); + virtual DOMDocumentFragment* cloneContents() const; + virtual void insertNode(DOMNode* node); + + //Misc functions + virtual void surroundContents(DOMNode *node); + virtual DOMRange* cloneRange() const; + virtual const XMLCh* toString() const; + virtual void detach(); + virtual void release(); + + //getter functions + DOMDocument* getDocument(); + + // functions to inform all existing valid ranges about a change + void updateSplitInfo(DOMNode* oldNode, DOMNode* startNode, XMLSize_t offset); + void updateRangeForInsertedNode(DOMNode* node); + void receiveReplacedText(DOMNode* node); + void updateRangeForDeletedText(DOMNode* node, XMLSize_t offset, int count); + void updateRangeForInsertedText(DOMNode* node, XMLSize_t offset, int count); + void updateRangeForDeletedNode(DOMNode* node); + +private: + //setter functions + void setStartContainer(const DOMNode* node); + void setStartOffset(XMLSize_t offset) ; + void setEndContainer(const DOMNode* node); + void setEndOffset(XMLSize_t offset) ; + + //misc functions + void validateNode(const DOMNode* node) const; + bool isValidAncestorType(const DOMNode* node) const; + bool hasLegalRootContainer(const DOMNode* node) const; + bool isLegalContainedNode(const DOMNode* node ) const; + void checkIndex(const DOMNode* node, XMLSize_t offset) const; + static bool isAncestorOf(const DOMNode* a, const DOMNode* b); + + XMLSize_t indexOf(const DOMNode* child, const DOMNode* parent) const; + + const DOMNode* commonAncestorOf(const DOMNode* pointA, const DOMNode* pointB) const; + DOMNode* nextNode(const DOMNode* node, bool visitChildren) const; + DOMDocumentFragment* traverseContents(TraversalType type); + void checkReadOnly(DOMNode* start, DOMNode* end, + XMLSize_t starOffset, XMLSize_t endOffset); + void recurseTreeAndCheck(DOMNode* start, DOMNode* end); + DOMNode* removeChild(DOMNode* parent, DOMNode* child); + + DOMDocumentFragment* traverseSameContainer( int how ); + DOMDocumentFragment* traverseCommonStartContainer( DOMNode *endAncestor, int how ); + DOMDocumentFragment* traverseCommonEndContainer( DOMNode *startAncestor, int how ); + DOMDocumentFragment* traverseCommonAncestors( DOMNode *startAncestor, DOMNode *endAncestor, int how ); + DOMNode* traverseRightBoundary( DOMNode *root, int how ); + DOMNode* traverseLeftBoundary( DOMNode *root, int how ); + DOMNode* traverseNode( DOMNode *n, bool isFullySelected, bool isLeft, int how ); + DOMNode* traverseFullySelected( DOMNode *n, int how ); + DOMNode* traversePartiallySelected( DOMNode *n, int how ); + DOMNode* traverseTextNode( DOMNode *n, bool isLeft, int how ); + DOMNode* getSelectedNode( DOMNode *container, int offset ); + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMRangeImpl & operator = (const DOMRangeImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMEntityImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMEntityImpl.hpp @@ -0,0 +1,104 @@ +#ifndef DOMEntityImpl_HEADER_GUARD_ +#define DOMEntityImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMEntityImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "DOMNodeImpl.hpp" +#include "DOMParentNode.hpp" +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMEntityReference; + +class CDOM_EXPORT DOMEntityImpl: public DOMEntity { +private: + DOMNodeImpl fNode; + DOMParentNode fParent; + + const XMLCh * fName; + const XMLCh * fPublicId; + const XMLCh * fSystemId; + const XMLCh * fNotationName; + DOMEntityReference* fRefEntity; + + // New data introduced in DOM Level 3 + const XMLCh* fActualEncoding; + const XMLCh* fEncoding; + const XMLCh* fVersion; + const XMLCh* fBaseURI; + bool fEntityRefNodeCloned; + // private helper function + void cloneEntityRefTree() const; + + friend class XercesDOMParser; + +public: + DOMEntityImpl(DOMDocument *doc, const XMLCh *eName); + DOMEntityImpl(const DOMEntityImpl &other, bool deep=false); + virtual ~DOMEntityImpl(); + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; + + + virtual const XMLCh * getPublicId() const; + virtual const XMLCh * getSystemId() const; + virtual const XMLCh * getNotationName() const; + virtual void setNotationName(const XMLCh *arg); + virtual void setPublicId(const XMLCh *arg); + virtual void setSystemId(const XMLCh *arg); + + //DOM Level 2 additions. Non standard functions + virtual void setEntityRef(DOMEntityReference *); + virtual DOMEntityReference* getEntityRef() const; + + //Introduced in DOM Level 3 + virtual const XMLCh* getActualEncoding() const; + virtual void setActualEncoding(const XMLCh* actualEncoding); + virtual const XMLCh* getEncoding() const; + virtual void setEncoding(const XMLCh* encoding); + virtual const XMLCh* getVersion() const; + virtual void setVersion(const XMLCh* version); + virtual void setBaseURI(const XMLCh *arg); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMEntityImpl & operator = (const DOMEntityImpl &); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMWriterImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMWriterImpl.hpp @@ -0,0 +1,434 @@ +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMWriterImpl.hpp 191054 2005-06-17 02:56:35Z jberry $ + */ + +/** + * DOMWriterImpl provides an API for serializing (writing) a DOM document out in + * an XML document. The XML data is written to an output stream, the type of + * which depends on the specific language bindings in use. During + * serialization of XML data, namespace fixup is done when possible. + *

DOMWriterImpl accepts any node type for serialization. For + * nodes of type Document or Entity, well formed + * XML will be created if possible. The serialized output for these node + * types is either as a Document or an External Entity, respectively, and is + * acceptable input for an XML parser. For all other types of nodes the + * serialized form is not specified, but should be something useful to a + * human for debugging or diagnostic purposes. Note: rigorously designing an + * external (source) form for stand-alone node types that don't already have + * one defined in seems a bit much to take on here. + *

Within a Document or Entity being serialized, Nodes are processed as + * follows Documents are written including an XML declaration and a DTD + * subset, if one exists in the DOM. Writing a document node serializes the + * entire document. Entity nodes, when written directly by + * writeNode defined in the DOMWriterImpl interface, + * output the entity expansion but no namespace fixup is done. The resulting + * output will be valid as an external entity. Entity References nodes are + * serializes as an entity reference of the form + * "&entityName;") in the output. Child nodes (the + * expansion) of the entity reference are ignored. CDATA sections + * containing content characters that can not be represented in the + * specified output encoding are handled according to the + * "split-cdata-sections" feature.If the feature is true, CDATA + * sections are split, and the unrepresentable characters are serialized as + * numeric character references in ordinary content. The exact position and + * number of splits is not specified. If the feature is false, + * unrepresentable characters in a CDATA section are reported as errors. The + * error is not recoverable - there is no mechanism for supplying + * alternative characters and continuing with the serialization. All other + * node types (Element, Text, etc.) are serialized to their corresponding + * XML source form. + *

Within the character data of a document (outside of markup), any + * characters that cannot be represented directly are replaced with + * character references. Occurrences of '<' and '&' are replaced by + * the predefined entities &lt; and &amp. The other predefined + * entities (&gt, &apos, etc.) are not used; these characters can be + * included directly. Any character that can not be represented directly in + * the output character encoding is serialized as a numeric character + * reference. + *

Attributes not containing quotes are serialized in quotes. Attributes + * containing quotes but no apostrophes are serialized in apostrophes + * (single quotes). Attributes containing both forms of quotes are + * serialized in quotes, with quotes within the value represented by the + * predefined entity &quot;. Any character that can not be represented + * directly in the output character encoding is serialized as a numeric + * character reference. + *

Within markup, but outside of attributes, any occurrence of a character + * that cannot be represented in the output character encoding is reported + * as an error. An example would be serializing the element + * <LaCa�ada/> with the encoding="us-ascii". + *

When requested by setting the normalize-characters feature + * on DOMWriterImpl, all data to be serialized, both markup and + * character data, is W3C Text normalized according to the rules defined in + * . The W3C Text normalization process affects only the data as it is being + * written; it does not alter the DOM's view of the document after + * serialization has completed. + *

Namespaces are fixed up during serialization, the serialization process + * will verify that namespace declarations, namespace prefixes and the + * namespace URIs associated with Elements and Attributes are consistent. If + * inconsistencies are found, the serialized form of the document will be + * altered to remove them. The algorithm used for doing the namespace fixup + * while seralizing a document is a combination of the algorithms used for + * lookupNamespaceURI and lookupNamespacePrefix . previous paragraph to be + * defined closer here. + *

Any changes made affect only the namespace prefixes and declarations + * appearing in the serialized data. The DOM's view of the document is not + * altered by the serialization operation, and does not reflect any changes + * made to namespace declarations or prefixes in the serialized output. + *

While serializing a document the serializer will write out + * non-specified values (such as attributes whose specified is + * false) if the output-default-values feature is + * set to true. If the output-default-values flag + * is set to false and the use-abstract-schema + * feature is set to true the abstract schema will be used to + * determine if a value is specified or not, if + * use-abstract-schema is not set the specified + * flag on attribute nodes is used to determine if attribute values should + * be written out. + *

Ref to Core spec (1.1.9, XML namespaces, 5th paragraph) entity ref + * description about warning about unbound entity refs. Entity refs are + * always serialized as &foo;, also mention this in the load part of + * this spec. + *

When serializing a document the DOMWriterImpl checks to see if the document + * element in the document is a DOM Level 1 element or a DOM Level 2 (or + * higher) element (this check is done by looking at the localName of the + * root element). If the root element is a DOM Level 1 element then the + * DOMWriterImpl will issue an error if a DOM Level 2 (or higher) element is + * found while serializing. Likewise if the document element is a DOM Level + * 2 (or higher) element and the DOMWriterImpl sees a DOM Level 1 element an + * error is issued. Mixing DOM Level 1 elements with DOM Level 2 (or higher) + * is not supported. + *

DOMWriterImpls have a number of named features that can be + * queried or set. The name of DOMWriterImpl features must be valid + * XML names. Implementation specific features (extensions) should choose an + * implementation dependent prefix to avoid name collisions. + *

Here is a list of properties that must be recognized by all + * implementations. + *

+ *
"normalize-characters"
+ *
+ *
+ *
true
+ *
[ + * optional] (default) Perform the W3C Text Normalization of the characters + * in document as they are written out. Only the characters being written + * are (potentially) altered. The DOM document itself is unchanged.
+ *
+ * false
+ *
[required] do not perform character normalization.
+ *
+ *
+ * "split-cdata-sections"
+ *
+ *
+ *
true
+ *
[required] (default) + * Split CDATA sections containing the CDATA section termination marker + * ']]>' or characters that can not be represented in the output + * encoding, and output the characters using numeric character references. + * If a CDATA section is split a warning is issued.
+ *
false
+ *
[ + * required] Signal an error if a CDATASection contains an + * unrepresentable character.
+ *
+ *
"validation"
+ *
+ *
+ *
true
+ *
[ + * optional] Use the abstract schema to validate the document as it is being + * serialized. If validation errors are found the error handler is notified + * about the error. Setting this state will also set the feature + * use-abstract-schema to true.
+ *
false
+ *
[ + * required] (default) Don't validate the document as it is being + * serialized.
+ *
+ *
"expand-entity-references"
+ *
+ *
+ *
true
+ *
[ + * optional] Expand EntityReference nodes when serializing.
+ *
+ * false
+ *
[required] (default) Serialize all + * EntityReference nodes as XML entity references.
+ *
+ *
+ * "whitespace-in-element-content"
+ *
+ *
+ *
true
+ *
[required] ( + * default) Output all white spaces in the document.
+ *
false
+ *
[ + * optional] Only output white space that is not within element content. The + * implementation is expected to use the + * isWhitespaceInElementContent flag on Text nodes + * to determine if a text node should be written out or not.
+ *
+ *
+ * "discard-default-content"
+ *
+ *
+ *
true
+ *
[required] (default + * ) Use whatever information available to the implementation (i.e. XML + * schema, DTD, the specified flag on Attr nodes, + * and so on) to decide what attributes and content should be serialized or + * not. Note that the specified flag on Attr nodes + * in itself is not always reliable, it is only reliable when it is set to + * false since the only case where it can be set to + * false is if the attribute was created by a Level 1 + * implementation.
+ *
false
+ *
[required] Output all attributes and + * all content.
+ *
+ *
"format-canonical"
+ *
+ *
+ *
true
+ *
[optional] + * This formatting writes the document according to the rules specified in . + * Setting this feature to true will set the feature "format-pretty-print" + * to false.
+ *
false
+ *
[required] (default) Don't canonicalize the + * output.
+ *
+ *
"format-pretty-print"
+ *
+ *
+ *
true
+ *
[optional] + * Formatting the output by adding whitespace to produce a pretty-printed, + * indented, human-readable form. The exact form of the transformations is + * not specified by this specification. Setting this feature to true will + * set the feature "format-canonical" to false.
+ *
false
+ *
[required] + * (default) Don't pretty-print the result.
+ *
+ *
+ *

See also the Document Object Model (DOM) Level 3 Abstract Schemas and Load + * and Save Specification. + */ + +#ifndef DOMWriterImpl_HEADER_GUARD_ +#define DOMWriterImpl_HEADER_GUARD_ + +#include +#include +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMWriterImpl:public XMemory, + public DOMWriter { + +public: + + /** @name Constructor and Destructor */ + //@{ + + /** + * Constructor. + */ + DOMWriterImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + + /** + * Destructor. + */ + ~DOMWriterImpl(); + //@} + + /** @name Inplementation of Abstract interface */ + + virtual bool canSetFeature(const XMLCh* const featName + , bool state) const; + + virtual void setFeature(const XMLCh* const featName + , bool state); + virtual bool getFeature(const XMLCh* const featName) const; + + virtual void setEncoding(const XMLCh* const encoding); + virtual const XMLCh* getEncoding() const; + + virtual void setNewLine(const XMLCh* const newLine); + virtual const XMLCh* getNewLine() const; + + virtual void setErrorHandler(DOMErrorHandler *errorHandler); + virtual DOMErrorHandler* getErrorHandler() const; + + virtual void setFilter(DOMWriterFilter *filter); + virtual DOMWriterFilter* getFilter() const; + + virtual bool writeNode(XMLFormatTarget* const destination + , const DOMNode &nodeToWrite); + virtual void release(); + + /** + * The caller is responsible for the release of the returned string + */ + + virtual XMLCh* writeToString(const DOMNode &nodeToWrite); + //@} + +private: + + /** unimplemented copy ctor and assignment operator */ + DOMWriterImpl(const DOMWriterImpl&); + DOMWriterImpl & operator = (const DOMWriterImpl&); + + /** helper **/ + void initSession(const DOMNode* const); + void processNode(const DOMNode* const); + + void procCdataSection(const XMLCh* const nodeValue + , const DOMNode* const nodeToWrite + , int level); + + void procUnrepCharInCdataSection(const XMLCh* const nodeValue + , const DOMNode* const nodeToWrite + , int level); + +protected: + /** + * Overidden by derived classes to extend the abilities of the standard writer + * always returns false in the default implementation + * @return true if the method deals with nodeToWrite + */ + virtual bool customNodeSerialize(const DOMNode* const nodeToWrite, int level); + + DOMNodeFilter::FilterAction checkFilter(const DOMNode* const) const; + + bool checkFeature(const XMLCh* const featName + , bool state + , int& featureId) const; + + bool reportError(const DOMNode* const errorNode + , DOMError::ErrorSeverity errorType + , const XMLCh* const errorMsg); + bool reportError(const DOMNode* const errorNode + , DOMError::ErrorSeverity errorType + , XMLDOMMsg::Codes toEmit); + + bool canSetFeature(const int featureId + , bool val) const; + void setFeature(const int featureId + , bool val); + bool getFeature(const int featureId) const; + + void printNewLine(); + void setURCharRef(); + + + void printIndent(int level) const; + //does the actual work for processNode while keeping track of the level + void processNode(const DOMNode* const nodeToWrite, int level); + + void processBOM(); + + // ----------------------------------------------------------------------- + // Private data members + // + // fFeatures + // + // fEncoding + // own it + // + // fNewLine + // own it + // + // fErrorHandler + // don't own it + // + // fFilter + // don't own it + // + // fDocumentVersion + // The XML Version of the document to be serialized. + // + // fEncodingUsed (session var) + // the actual encoding used in WriteNode(), + // it does not own any data(memory). + // + // fNewLineUsed (session var) + // the actual "end of line" sequence used in WriteNode(), + // it does not own any data(memory). + // + // fFormatter (session var) + // the formatter used in WriteNode() + // + // fErrorCount + // the count of error encountered in the serialization, + // which neither the error handler, nor the serializer itself, + // treat as fatal. And the serializer will return true/false + // based on this value. + // + // fCurrentLine + // the current line. Used to track the line number the current + // node begins on + // + // ----------------------------------------------------------------------- + + int fFeatures; + XMLCh *fEncoding; + XMLCh *fNewLine; + DOMErrorHandler *fErrorHandler; + DOMWriterFilter *fFilter; + const XMLCh *fDocumentVersion; + + //session vars + const XMLCh *fEncodingUsed; + const XMLCh *fNewLineUsed; + XMLFormatter *fFormatter; + int fErrorCount; + int fCurrentLine; + + RefVectorOf< RefHashTableOf >* fNamespaceStack; + MemoryManager* fMemoryManager; +}; + +inline void DOMWriterImpl::setFeature(const int featureId + , bool val) +{ + (val)? fFeatures |= (1<setUnRepFlags(XMLFormatter::UnRep_CharRef); +} + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMDocumentFragmentImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMDocumentFragmentImpl.hpp @@ -0,0 +1,69 @@ +#ifndef DOMDocumentFragmentImpl_HEADER_GUARD_ +#define DOMDocumentFragmentImpl_HEADER_GUARD_ +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMDocumentFragmentImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include +#include "DOMParentNode.hpp" +#include "DOMNodeImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class CDOM_EXPORT DOMDocumentFragmentImpl: public DOMDocumentFragment { +private: + DOMNodeImpl fNode; + DOMParentNode fParent; + + + +protected: + DOMDocumentFragmentImpl(DOMDocument *); + +private: + DOMDocumentFragmentImpl(const DOMDocumentFragmentImpl &other, bool deep); + friend class DOMDocumentImpl; + + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMDocumentFragmentImpl & operator = (const DOMDocumentFragmentImpl &); + +public: + virtual ~DOMDocumentFragmentImpl(); + + // Declare all of the functions from DOMNode. + DOMNODE_FUNCTIONS; +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/XSDElementNSImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/XSDElementNSImpl.hpp @@ -0,0 +1,70 @@ +#ifndef XSDElementNSImpl_HEADER_GUARD_ +#define XSDElementNSImpl_HEADER_GUARD_ + +/* + * Copyright 2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XSDElementNSImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It is used by TraverseSchema to store line/column information. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include "DOMElementNSImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + + +class CDOM_EXPORT XSDElementNSImpl: public DOMElementNSImpl { +protected: + XMLSSize_t fLineNo; //Line number + XMLSSize_t fColumnNo; //Column number + + +public: + XSDElementNSImpl(DOMDocument *ownerDoc, const XMLCh *name); + XSDElementNSImpl(DOMDocument *ownerDoc, //DOM Level 2 + const XMLCh *namespaceURI, + const XMLCh *qualifiedName, + const XMLSSize_t lineNo, + const XMLSSize_t columnNo); + XSDElementNSImpl(const XSDElementNSImpl &other, bool deep=false); + + virtual DOMNode * cloneNode(bool deep) const; + + XMLSSize_t getLineNo() const { return fLineNo; } + XMLSSize_t getColumnNo() const { return fColumnNo; } + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + XSDElementNSImpl& operator=(const XSDElementNSImpl&); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMCharacterDataImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMCharacterDataImpl.hpp @@ -0,0 +1,86 @@ +#ifndef DOMCharacterDataImpl_HEADER_GUARD_ +#define DOMCharacterDataImpl_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMCharacterDataImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMNode; +class DOMDocument; +class DOMDocumentImpl; +class DOMBuffer; + +// Instances of DOMCharacterDataImpl appear as members of node types +// that implement the DOMCharacterData interfaces. +// Operations in those classes are delegated to this class. +// +class CDOM_EXPORT DOMCharacterDataImpl +{ +public: + DOMBuffer* fDataBuf; + // for the buffer bid + DOMDocumentImpl* fDoc; + +public: + DOMCharacterDataImpl(DOMDocument *doc, const XMLCh *dat); + DOMCharacterDataImpl(const DOMCharacterDataImpl &other); + ~DOMCharacterDataImpl(); + const XMLCh * getNodeValue() const; + void setNodeValue(const XMLCh * value); + void appendData(const DOMNode *node, const XMLCh *data); + void deleteData(const DOMNode *node, XMLSize_t offset, XMLSize_t count); + const XMLCh* getData() const; + XMLSize_t getLength() const; + void insertData(const DOMNode *node, XMLSize_t offset, const XMLCh * data); + void replaceData(const DOMNode *node, XMLSize_t offset, XMLSize_t count, const XMLCh * data); + void setData(const DOMNode *node, const XMLCh * arg); + void setNodeValue(const DOMNode *node, const XMLCh *value); + + + const XMLCh* substringData(const DOMNode *node, XMLSize_t offset, XMLSize_t count) const; + void releaseBuffer(); + +private: + // ----------------------------------------------------------------------- + // Unimplemented constructors and operators + // ----------------------------------------------------------------------- + DOMCharacterDataImpl & operator = (const DOMCharacterDataImpl &); +}; + +#define GetDOMCharacterDataImplMemoryManager GET_DIRECT_MM(fDoc) + +XERCES_CPP_NAMESPACE_END + + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/impl/DOMCasts.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/impl/DOMCasts.hpp @@ -0,0 +1,145 @@ +#ifndef DOMCasts_HEADER_GUARD_ +#define DOMCasts_HEADER_GUARD_ + +/* + * Copyright 2001-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMCasts.hpp 176319 2005-02-22 05:57:21Z jberry $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +// +// Define inline casting functions to convert from +// (DOMNode *) to DOMParentNode or DOMChildNode *. +// +// This requires knowledge of the structure of the fields of +// for all node types. There are three categories - +// +// Nodetypes that can have children and can be a child themselves. +// e.g. Elements +// +// Object +// DOMNodeImpl fNode; +// DOMParentNode fParent; +// DOMChildNode fChild; +// ... // other fields, depending on node type. +// +// Nodetypes that can not have children, e.g. TEXT +// +// Object +// DOMNodeImpl fNode; +// DOMChildNode fChild; +// ... // other fields, depending on node type +// +// Nodetypes that can not be a child of other nodes, but that can +// have children (are a parent) e.g. ATTR +// Object +// DOMNodeImpl fNode; +// DOMParentNode fParent +// ... // other fields, depending on node type +// +// The casting functions make these assumptions: +// 1. The cast is possible. Using code will not attempt to +// cast to something that does not exist, such as the child +// part of an ATTR +// +// 2. The nodes belong to this implementation. +// +// Some of the casts use the LEAFNODE flag in the common fNode part to +// determine whether an fParent field exists, and thus the +// position of the fChild part within the node. +// +// These functions also cast off const. It was either do that, or make +// a second overloaded set that took and returned const arguements. +// + +// +// Note that using offsetof, or taking the offset of an object member at +// a 0 address, is now undefined in C++. And gcc now warns about this behavior. +// This is because doing do so is unreliable for some types of objects. +// See: http://gcc.gnu.org/ml/gcc/2004-06/msg00227.html +// : http://gcc.gnu.org/ml/gcc-bugs/2000-03/msg00805.html +// The casting code below works around gcc's warnings by using a dummy +// pointer, which the compiler cannot tell is null. The defeats the warning, +// but also masks the potential problem. +// The gcc option -Wno-invalid-offsetof may also be used to turn off this warning. +// + +#include "DOMElementImpl.hpp" +#include "DOMTextImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +static inline DOMNodeImpl *castToNodeImpl(const DOMNode *p) +{ + DOMElementImpl *pE = (DOMElementImpl *)p; + return &(pE->fNode); +} + + +static inline DOMParentNode *castToParentImpl(const DOMNode *p) { + DOMElementImpl *pE = (DOMElementImpl *)p; + return &(pE->fParent); +} + + +static inline DOMChildNode *castToChildImpl(const DOMNode *p) { + DOMElementImpl *pE = (DOMElementImpl *)p; + if (pE->fNode.isLeafNode()) { + DOMTextImpl *pT = (DOMTextImpl *)p; + return &(pT->fChild); + } + return &(pE->fChild); +} + + +static inline DOMNode *castToNode(const DOMParentNode *p ) { + DOMElementImpl* dummy = 0; + size_t parentOffset = (char *)&(dummy->fParent) - (char *)dummy; + char *retPtr = (char *)p - parentOffset; + return (DOMNode *)retPtr; +} + +static inline DOMNode *castToNode(const DOMNodeImpl *p) { + DOMElementImpl* dummy = 0; + size_t nodeImplOffset = (char *)&(dummy->fNode) - (char *)dummy; + char *retPtr = (char *)p - nodeImplOffset; + return (DOMNode *)retPtr; +} + + +static inline DOMNodeImpl *castToNodeImpl(const DOMParentNode *p) +{ + DOMElementImpl* dummy = 0; + size_t nodeImplOffset = (char *)&(dummy->fNode) - (char *)dummy; + size_t parentOffset = (char *)&(dummy->fParent) - (char *)dummy; + char *retPtr = (char *)p - parentOffset + nodeImplOffset; + return (DOMNodeImpl *)retPtr; +} + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/DeepNodeListImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/DeepNodeListImpl.hpp @@ -0,0 +1,78 @@ +#ifndef DeepNodeListImpl_HEADER_GUARD_ +#define DeepNodeListImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DeepNodeListImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "NodeListImpl.hpp" +#include "DOMString.hpp" +#include "NodeImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class NodeImpl; +class NodeVector; + + +class DEPRECATED_DOM_EXPORT DeepNodeListImpl: public NodeListImpl { +private: + NodeImpl *rootNode; + DOMString tagName; + bool matchAll; + int changes; + NodeVector *nodes; + + //DOM Level 2 + DOMString namespaceURI; + bool matchAllURI; + bool matchURIandTagname; //match both namespaceURI and tagName + +public: + DeepNodeListImpl(NodeImpl *rootNode, const DOMString &tagName); + DeepNodeListImpl(NodeImpl *rootNode, //DOM Level 2 + const DOMString &namespaceURI, const DOMString &localName); + virtual ~DeepNodeListImpl(); + virtual unsigned int getLength(); + virtual NodeImpl *item(unsigned int index); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitDeepNodeListImpl(); + +private: + virtual NodeImpl *nextMatchingElementAfter(NodeImpl *current); + virtual void unreferenced(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NodeListImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NodeListImpl.hpp @@ -0,0 +1,54 @@ +#ifndef NodeListImpl_HEADER_GUARD_ +#define NodeListImpl_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: NodeListImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "RefCountedImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class NodeImpl; + + +class DEPRECATED_DOM_EXPORT NodeListImpl : public RefCountedImpl +{ +protected: + NodeListImpl(); +public: + virtual ~NodeListImpl(); + virtual NodeImpl * item(unsigned int index) = 0; + virtual unsigned int getLength() = 0; +}; + +XERCES_CPP_NAMESPACE_END + +#endif + + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/ElementDefinitionImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/ElementDefinitionImpl.hpp @@ -0,0 +1,57 @@ +#ifndef ElementDefinitionImpl_HEADER_GUARD_ +#define ElementDefinitionImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: ElementDefinitionImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include "NodeImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT ElementDefinitionImpl: public NodeImpl { +private: + DOMString name; + NamedNodeMapImpl *attributes; + +public: + ElementDefinitionImpl(DocumentImpl *ownerDocument, const DOMString &name); + ElementDefinitionImpl(const ElementDefinitionImpl& other, bool deep=false); + + virtual ~ElementDefinitionImpl(); + virtual NodeImpl *cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual NamedNodeMapImpl *getAttributes(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NodeImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NodeImpl.hpp @@ -0,0 +1,271 @@ +#ifndef NodeImpl_HEADER_GUARD_ +#define NodeImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: NodeImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * A NodeImpl doesn't have any children, and can therefore only be directly + * inherited by classes of nodes that never have any, such as Text nodes. For + * other types, such as Element, classes must inherit from ParentNode. + *

+ * All nodes in a single document must originate + * in that document. (Note that this is much tighter than "must be + * same implementation") Nodes are all aware of their ownerDocument, + * and attempts to mismatch will throw WRONG_DOCUMENT_ERR. + *

+ * However, to save memory not all nodes always have a direct reference + * to their ownerDocument. When a node is owned by another node it relies + * on its owner to store its ownerDocument. Parent nodes always store it + * though, so there is never more than one level of indirection. + * And when a node doesn't have an owner, ownerNode refers to its + * ownerDocument. + **/ + +#include +#include "NodeListImpl.hpp" +#include "DOMString.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class NamedNodeMapImpl; +class NodeListImpl; +class DocumentImpl; + +// define 'null' is used extensively in the DOM implementation code, +// as a consequence of its Java origins. +// MSVC 5.0 compiler has problems with overloaded function resolution +// when using the const int definition. +// +#if defined(XML_CSET) +const int null = 0; +#else +#define null 0 +#endif + + +class DEPRECATED_DOM_EXPORT NodeImpl: public NodeListImpl { +public: + NodeImpl *ownerNode; // typically the parent but not always! + + // data + + unsigned short flags; + + static const unsigned short READONLY; + static const unsigned short SYNCDATA; + static const unsigned short SYNCCHILDREN; + static const unsigned short OWNED; + static const unsigned short FIRSTCHILD; + static const unsigned short SPECIFIED; + static const unsigned short IGNORABLEWS; + static const unsigned short SETVALUE; + static const unsigned short ID_ATTR; + static const unsigned short USERDATA; + static const unsigned short HASSTRING; + + static int gLiveNodeImpls; // Counters for debug & tuning. + static int gTotalNodeImpls; + +public: + NodeImpl(DocumentImpl *ownerDocument); + NodeImpl(const NodeImpl &other); + virtual ~NodeImpl(); + + // Dynamic Cast replacement functions. + virtual bool isAttrImpl(); + virtual bool isCDATASectionImpl(); + virtual bool isDocumentFragmentImpl(); + virtual bool isDocumentImpl(); + virtual bool isDocumentTypeImpl(); + virtual bool isElementImpl(); + virtual bool isEntityReference(); + virtual bool isTextImpl(); + + virtual void changed(); + virtual int changes(); + + virtual NodeImpl *appendChild(NodeImpl *newChild); + virtual NodeImpl * cloneNode(bool deep) = 0; + static void deleteIf(NodeImpl *thisNode); + virtual NamedNodeMapImpl * getAttributes(); + virtual NodeListImpl *getChildNodes(); + virtual NodeImpl * getFirstChild(); + virtual NodeImpl * getLastChild(); + virtual unsigned int getLength(); + virtual NodeImpl * getNextSibling(); + virtual DOMString getNodeName() = 0; + virtual short getNodeType() = 0; + virtual DOMString getNodeValue(); + virtual DocumentImpl * getOwnerDocument(); + virtual NodeImpl * getParentNode(); + virtual NodeImpl* getPreviousSibling(); + virtual void *getUserData(); + virtual bool hasChildNodes(); + virtual NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild); + static bool isKidOK(NodeImpl *parent, NodeImpl *child); + virtual NodeImpl *item(unsigned int index); + virtual void referenced(); + virtual NodeImpl * removeChild(NodeImpl *oldChild); + virtual NodeImpl *replaceChild(NodeImpl *newChild, NodeImpl *oldChild); + virtual void setNodeValue(const DOMString &value); + virtual void setReadOnly(bool readOnly, bool deep); + virtual void setUserData(void *value); + virtual DOMString toString(); + virtual void unreferenced(); + + //Introduced in DOM Level 2 + virtual void normalize(); + virtual bool isSupported(const DOMString &feature, const DOMString &version); + virtual DOMString getNamespaceURI(); + virtual DOMString getPrefix(); + virtual DOMString getLocalName(); + virtual void setPrefix(const DOMString &prefix); + virtual bool hasAttributes(); + +protected: + //Utility, not part of DOM Level 2 API + static const DOMString& mapPrefix(const DOMString &prefix, + const DOMString &namespaceURI, short nType); + static DOMString getXmlnsString(); + static DOMString getXmlnsURIString(); + static DOMString getXmlString(); + static DOMString getXmlURIString(); + +public: // should really be protected - ALH + + virtual void setOwnerDocument(DocumentImpl *doc); + // NON-DOM + // unlike getOwnerDocument this never returns null, even for Document nodes + virtual DocumentImpl * getDocument(); + + /* + * Flags setters and getters + */ + + inline bool isReadOnly() const { + return (flags & READONLY) != 0; + } + + inline void isReadOnly(bool value) { + flags = (value ? flags | READONLY : flags & ~READONLY); + } + + inline bool needsSyncData() const { + return (flags & SYNCDATA) != 0; + } + + inline void needsSyncData(bool value) { + flags = (value ? flags | SYNCDATA : flags & ~SYNCDATA); + } + + inline bool needsSyncChildren() const { + return (flags & SYNCCHILDREN) != 0; + } + + inline void needsSyncChildren(bool value) { + flags = (value ? flags | SYNCCHILDREN : flags & ~SYNCCHILDREN); + } + + inline bool isOwned() const { + return (flags & OWNED) != 0; + } + + inline void isOwned(bool value) { + flags = (value ? flags | OWNED : flags & ~OWNED); + } + + inline bool isFirstChild() const { + return (flags & FIRSTCHILD) != 0; + } + + inline void isFirstChild(bool value) { + flags = (value ? flags | FIRSTCHILD : flags & ~FIRSTCHILD); + } + + inline bool isSpecified() const { + return (flags & SPECIFIED) != 0; + } + + inline void isSpecified(bool value) { + flags = (value ? flags | SPECIFIED : flags & ~SPECIFIED); + } + + inline bool ignorableWhitespace() const { + return (flags & IGNORABLEWS) != 0; + } + + inline void ignorableWhitespace(bool value) { + flags = (value ? flags | IGNORABLEWS : flags & ~IGNORABLEWS); + } + + inline bool setValueCalled() const { + return (flags & SETVALUE) != 0; + } + + inline void setValueCalled(bool value) { + flags = (value ? flags | SETVALUE : flags & ~SETVALUE); + } + + inline bool isIdAttr() const { + return (flags & ID_ATTR) != 0; + } + + inline void isIdAttr(bool value) { + flags = (value ? flags | ID_ATTR : flags & ~ID_ATTR); + } + + inline bool hasUserData() const { + return (flags & USERDATA) != 0; + } + + inline void hasUserData(bool value) { + flags = (value ? flags | USERDATA : flags & ~USERDATA); + } + + inline bool hasStringValue() const { + return (flags & HASSTRING) != 0; + } + + inline void hasStringValue(bool value) { + flags = (value ? flags | HASSTRING : flags & ~HASSTRING); + } + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitNodeImpl(); + +}; + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/XMLDeclImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/XMLDeclImpl.hpp @@ -0,0 +1,80 @@ +#ifndef XMLDeclImpl_HEADER_GUARD_ +#define XMLDeclImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: XMLDeclImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "ChildNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DOMString; + +class DEPRECATED_DOM_EXPORT XMLDeclImpl: public ChildNode { + +private: + // ----------------------------------------------------------------------- + // Private data types + // ----------------------------------------------------------------------- + DOMString version; + DOMString encoding; + DOMString standalone; + +public: + XMLDeclImpl(DocumentImpl *ownerDoc); + XMLDeclImpl(DocumentImpl *ownerDoc, const DOMString& version, + const DOMString& encoding, const DOMString& standalone); + XMLDeclImpl(const XMLDeclImpl &other, bool deep=false); + virtual ~XMLDeclImpl(); + + virtual NodeImpl * cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + + + virtual DOMString getVersion() const; + virtual DOMString getEncoding() const; + virtual DOMString getStandalone() const; + + virtual void setVersion(const DOMString& data); + virtual void setEncoding(const DOMString& data); + virtual void setStandalone(const DOMString& data); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitXMLDeclImpl(); + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/ElementNSImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/ElementNSImpl.hpp @@ -0,0 +1,62 @@ +#ifndef ElementNSImpl_HEADER_GUARD_ +#define ElementNSImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: ElementNSImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include "ElementImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT ElementNSImpl: public ElementImpl { +protected: + //Introduced in DOM Level 2 + DOMString namespaceURI; //namespace URI of this node + DOMString localName; //local part of qualified name + + +public: + ElementNSImpl(DocumentImpl *ownerDoc, const DOMString &name); + ElementNSImpl(DocumentImpl *ownerDoc, //DOM Level 2 + const DOMString &namespaceURI, const DOMString &qualifiedName); + ElementNSImpl(const ElementNSImpl &other, bool deep=false); + + virtual NodeImpl * cloneNode(bool deep); + //Introduced in DOM Level 2 + virtual DOMString getNamespaceURI(); + virtual DOMString getPrefix(); + virtual DOMString getLocalName(); + virtual void setPrefix(const DOMString &prefix); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/AttrMapImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/AttrMapImpl.hpp @@ -0,0 +1,77 @@ +#ifndef AttrMapImpl_HEADER_GUARD_ +#define AttrMapImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/* + * $Id: AttrMapImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#include +#include "AttrImpl.hpp" +#include "NodeImpl.hpp" +#include "NamedNodeMapImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class NamedNodeMapImpl; + +class DEPRECATED_DOM_EXPORT AttrMapImpl : public NamedNodeMapImpl +{ +private: + bool attrDefaults; + +public: + AttrMapImpl(NodeImpl *ownerNod); + AttrMapImpl(NodeImpl *ownerNod, NamedNodeMapImpl *defaults); + virtual ~AttrMapImpl(); + virtual AttrMapImpl *cloneAttrMap(NodeImpl *ownerNode); + virtual bool hasDefaults(); + virtual void hasDefaults(bool value); + + virtual NodeImpl *removeNamedItem(const DOMString &name); + virtual NodeImpl *removeNamedItemNS(const DOMString &namespaceURI, const DOMString &localName); +}; + +// --------------------------------------------------------------------------- +// AttrMapImpl: Getters & Setters +// --------------------------------------------------------------------------- + +inline bool AttrMapImpl::hasDefaults() +{ + return attrDefaults; +} + +inline void AttrMapImpl::hasDefaults(bool value) +{ + attrDefaults = value; +} + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/ParentNode.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/ParentNode.hpp @@ -0,0 +1,113 @@ +#ifndef ParentNode_HEADER_GUARD_ +#define ParentNode_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/* + * $Id: ParentNode.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +/** + * ParentNode inherits from ChildImpl and adds the capability of having child + * nodes. Not every node in the DOM can have children, so only nodes that can + * should inherit from this class and pay the price for it. + *

+ * ParentNode, just like NodeImpl, also implements NodeList, so it can + * return itself in response to the getChildNodes() query. This eliminiates + * the need for a separate ChildNodeList object. Note that this is an + * IMPLEMENTATION DETAIL; applications should _never_ assume that + * this identity exists. + *

+ * While we have a direct reference to the first child, the last child is + * stored as the previous sibling of the first child. First child nodes are + * marked as being so, and getNextSibling hides this fact. + *

Note: Not all parent nodes actually need to also be a child. At some + * point we used to have ParentNode inheriting from NodeImpl and another class + * called ChildAndParentNode that inherited from ChildNode. But due to the lack + * of multiple inheritance a lot of code had to be duplicated which led to a + * maintenance nightmare. At the same time only a few nodes (Document, + * DocumentFragment, Entity, and Attribute) cannot be a child so the gain is + * memory wasn't really worth it. The only type for which this would be the + * case is Attribute, but we deal with there in another special way, so this is + * not applicable. + * + *

WARNING: Some of the code here is partially duplicated in + * AttrImpl, be careful to keep these two classes in sync! + * + **/ + +#include +#include "ChildNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DEPRECATED_DOM_EXPORT ParentNode: public ChildNode { +public: + DocumentImpl *ownerDocument; // Document this node belongs to + + ChildNode *firstChild; + +public: + ParentNode(DocumentImpl *ownerDocument); + ParentNode(const ParentNode &other); + + virtual DocumentImpl * getOwnerDocument(); + virtual void setOwnerDocument(DocumentImpl *doc); + + virtual NodeListImpl *getChildNodes(); + virtual NodeImpl * getFirstChild(); + virtual NodeImpl * getLastChild(); + virtual unsigned int getLength(); + virtual bool hasChildNodes(); + virtual NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild); + virtual NodeImpl *item(unsigned int index); + virtual NodeImpl * removeChild(NodeImpl *oldChild); + virtual NodeImpl *replaceChild(NodeImpl *newChild, NodeImpl *oldChild); + virtual void setReadOnly(bool isReadOnly, bool deep); + + //Introduced in DOM Level 2 + virtual void normalize(); + + // NON-DOM + // unlike getOwnerDocument this never returns null, even for Document nodes + virtual DocumentImpl * getDocument(); +protected: + void cloneChildren(const NodeImpl &other); + ChildNode * lastChild(); + void lastChild(ChildNode *); + + /** Cached node list length. */ + int fCachedLength; + + /** Last requested child. */ + ChildNode * fCachedChild; + + /** Last requested child index. */ + int fCachedChildIndex; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/DocumentFragmentImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/DocumentFragmentImpl.hpp @@ -0,0 +1,62 @@ +#ifndef DocumentFragmentImpl_HEADER_GUARD_ +#define DocumentFragmentImpl_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DocumentFragmentImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "ParentNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT DocumentFragmentImpl: public ParentNode { +protected: + DocumentFragmentImpl(DocumentImpl *); + +private: + DocumentFragmentImpl(const DocumentFragmentImpl &other, bool deep); + friend class DocumentImpl; + +public: + virtual ~DocumentFragmentImpl(); + virtual NodeImpl *cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual bool isDocumentFragmentImpl(); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitDocumentFragmentImpl(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NodeIteratorImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NodeIteratorImpl.hpp @@ -0,0 +1,120 @@ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: NodeIteratorImpl.hpp 176080 2004-09-26 01:06:31Z cargilld $ + */ + +#ifndef NodeIteratorImpl_HEADER_GUARD_ +#define NodeIteratorImpl_HEADER_GUARD_ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include "DOM_Node.hpp" +#include "DOM_NodeIterator.hpp" +#include "RefCountedImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT NodeIteratorImpl : public RefCountedImpl { + protected: + NodeIteratorImpl (); + + public: + virtual ~NodeIteratorImpl (); + NodeIteratorImpl ( + DOM_Node root, + unsigned long whatToShow, + DOM_NodeFilter* nodeFilter, + bool expandEntityRef); + + NodeIteratorImpl ( const NodeIteratorImpl& toCopy); + + NodeIteratorImpl& operator= (const NodeIteratorImpl& other); + + DOM_Node getRoot (); + unsigned long getWhatToShow (); + DOM_NodeFilter* getFilter (); + + DOM_Node nextNode (); + DOM_Node previousNode (); + bool acceptNode (DOM_Node node); + DOM_Node matchNodeOrParent (DOM_Node node); + DOM_Node nextNode (DOM_Node node, bool visitChildren); + DOM_Node previousNode (DOM_Node node); + void removeNode (DOM_Node node); + + void unreferenced(); + + void detach (); + + // Get the expandEntity reference flag. + bool getExpandEntityReferences(); + + + private: + // + // Data + // + // The root. + DOM_Node fRoot; + + // The whatToShow mask. + unsigned long fWhatToShow; + + // The NodeFilter reference. + DOM_NodeFilter* fNodeFilter; + + // The expandEntity reference flag. + bool fExpandEntityReferences; + + bool fDetached; + + // + // Iterator state - current node and direction. + // + // Note: The current node and direction are sufficient to implement + // the desired behaviour of the current pointer being _between_ + // two nodes. The fCurrentNode is actually the last node returned, + // and the + // direction is whether the pointer is in front or behind this node. + // (usually akin to whether the node was returned via nextNode()) + // (eg fForward = true) or previousNode() (eg fForward = false). + + // The last Node returned. + DOM_Node fCurrentNode; + + // The direction of the iterator on the fCurrentNode. + // + // nextNode() == fForward = true;
+ // previousNode() == fForward = false;
+ //
+ bool fForward; + + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/AttrImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/AttrImpl.hpp @@ -0,0 +1,169 @@ +#ifndef AttrImpl_HEADER_GUARD_ +#define AttrImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Attribute represents an XML-style attribute of an + * Element. Typically, the allowable values are controlled by its + * declaration in the Document Type Definition (DTD) governing this + * kind of document. + *

+ * If the attribute has not been explicitly assigned a value, but has + * been declared in the DTD, it will exist and have that default. Only + * if neither the document nor the DTD specifies a value will the + * Attribute really be considered absent and have no value; in that + * case, querying the attribute will return null. + *

+ * Attributes may have multiple children that contain their data. (XML + * allows attributes to contain entity references, and tokenized + * attribute types such as NMTOKENS may have a child for each token.) + * For convenience, the Attribute object's getValue() method returns + * the string version of the attribute's value. + *

+ * Attributes are not children of the Elements they belong to, in the + * usual sense, and have no valid Parent reference. However, the spec + * says they _do_ belong to a specific Element, and an INUSE exception + * is to be thrown if the user attempts to explicitly share them + * between elements. + *

+ * Note that Elements do not permit attributes to appear to be shared + * (see the INUSE exception), so this object's mutability is + * officially not an issue. + *

+ * Note: The ownerNode attribute is used to store the Element the Attr + * node is associated with. Attr nodes do not have parent nodes. + * Besides, the getOwnerElement() method can be used to get the element node + * this attribute is associated with. + *

+ * AttrImpl does not support Namespaces. AttrNSImpl, which inherits from + * it, does. + * + *

AttrImpl used to inherit from ParentNode. It now directly inherits from + * NodeImpl and provide its own implementation of the ParentNode's behavior. + * The reason is that we now try and avoid to always creating a Text node to + * hold the value of an attribute. The DOM spec requires it, so we still have + * to do it in case getFirstChild() is called for instance. The reason + * attribute values are stored as a list of nodes is so that they can carry + * more than a simple string. They can also contain EntityReference nodes. + * However, most of the times people only have a single string that they only + * set and get through Element.set/getAttribute or Attr.set/getValue. In this + * new version, the Attr node has a value pointer which can either be the + * String directly or a pointer to the first ChildNode. A flag tells which one + * it currently is. Note that while we try to stick with the direct String as + * much as possible once we've switched to a node there is no going back. This + * is because we have no way to know whether the application keeps referring to + * the node we once returned. + *

The gain in memory varies on the density of attributes in the document. + * But in the tests I've run I've seen up to 12% of memory gain. And the good + * thing is that it also leads to a slight gain in speed because we allocate + * fewer objects! I mean, that's until we have to actually create the node... + *

+ * To avoid too much duplicated code, I got rid of ParentNode and renamed + * ChildAndParentNode, which I never really liked, to ParentNode for + * simplicity, this doesn't make much of a difference in memory usage because + * there are only very objects that are only a Parent. This is only true now + * because AttrImpl now inherits directly from NodeImpl and has its own + * implementation of the ParentNode's node behavior. So there is still some + * duplicated code there. + * + *

WARNING: Some of the code here is partially duplicated in + * ParentNode, be careful to keep these two classes in sync! + * + * $Id: AttrImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#include +#include "ChildNode.hpp" +#include "DOM_Node.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class ElementImpl; + +class DEPRECATED_DOM_EXPORT AttrImpl: public NodeImpl { + +public: + DOMString name; + + /** This can either be a DOMString or the first child node (ChildNode*). */ + union { + ChildNode *child; + DOMString *str; + } value; + +public: + AttrImpl(DocumentImpl *ownerDocument, const DOMString &aName); + AttrImpl(const AttrImpl &other, bool deep=false); + virtual ~AttrImpl(); + virtual NodeImpl *cloneNode(bool deep=false); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual DOMString getName(); + virtual DOMString getNodeValue(); + virtual bool getSpecified(); + virtual DOMString getValue(); + virtual bool isAttrImpl(); + virtual void setNodeValue(const DOMString &value); + virtual void setSpecified(bool arg); + virtual void setValue(const DOMString &value); + virtual DOMString toString(); + + //Introduced in DOM Level 2 + ElementImpl *getOwnerElement(); + void setOwnerElement(ElementImpl *ownerElem); //internal use only + + + // ParentNode stuff + virtual NodeListImpl *getChildNodes(); + virtual NodeImpl * getFirstChild(); + virtual NodeImpl * getLastChild(); + virtual unsigned int getLength(); + virtual bool hasChildNodes(); + virtual NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild); + virtual NodeImpl *item(unsigned int index); + virtual NodeImpl *removeChild(NodeImpl *oldChild); + virtual NodeImpl *replaceChild(NodeImpl *newChild, NodeImpl *oldChild); + virtual void setReadOnly(bool isReadOnly, bool deep); + + //Introduced in DOM Level 2 + virtual void normalize(); + +protected: + void makeChildNode(); + void cloneChildren(const NodeImpl &other); + ChildNode * lastChild(); + void lastChild(ChildNode *); + inline DOMString* valueToDOMString(); + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/MemDebug.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/MemDebug.hpp @@ -0,0 +1,54 @@ +#ifndef MemDebug_HEADER_GUARD_ +#define MemDebug_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MemDebug.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DomMemDebug +{ +public: + int liveStringHandles; + int totalStringHandles; + int liveStringBuffers; + int totalStringBuffers; + int liveNodeImpls; + int totalNodeImpls; + int liveNamedNodeMaps; + int totalNamedNodeMaps; + +public: + DOMMemDebug(); + ~DOMMemDebug(); + + void print(); + void printDifference(const DOMMemDebug &other); + bool operator == (const DOMMemDebug &other); + bool operator != (const DOMMemDebug &other); + bool operator = (const DOMMemDebug &other); +}; + +XERCES_CPP_NAMESPACE_END + +#endif // MemDebug_HEADER_GUARD_ --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/TextImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/TextImpl.hpp @@ -0,0 +1,66 @@ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: TextImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#ifndef TextImpl_HEADER_GUARD_ +#define TextImpl_HEADER_GUARD_ + +#include +#include "CharacterDataImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT TextImpl: public CharacterDataImpl { +public: + TextImpl(DocumentImpl *ownerDoc, const DOMString &data); + TextImpl(const TextImpl &other, bool deep=false); + virtual ~TextImpl(); + virtual NodeImpl *cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual bool isTextImpl(); + virtual TextImpl *splitText(unsigned int offset); + virtual bool isIgnorableWhitespace(); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitTextImpl(); + +protected: + virtual void setIgnorableWhitespace(bool ignorable); + friend class DOMParser; +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/DocumentImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/DocumentImpl.hpp @@ -0,0 +1,250 @@ +#ifndef DocumentImpl_HEADER_GUARD_ +#define DocumentImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DocumentImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "ParentNode.hpp" +#include "DOM_Node.hpp" +#include "DOM_Element.hpp" +#include "xercesc/util/RefVectorOf.hpp" +#include "xercesc/util/RefHashTableOf.hpp" +#include "XMLDeclImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DocumentTypeImpl; +class ElementImpl; +class AttrImpl; +class CDATASectionImpl; +class CommentImpl; +class DeepNodeListImpl; +class DocumentFragmentImpl; +class DocumentTypeImpl; +class DStringPool; +class EntityImpl; +class EntityReferenceImpl; +class NotationImpl; +class ProcessingInstructionImpl; +class TextImpl; +class NodeIteratorImpl; +class TreeWalkerImpl; +class DOM_NodeFilter; +class NodeFilterImpl; +class DOM_DOMImplementation; +class DOMString; +class NodeIDMap; +class RangeImpl; + +typedef RefVectorOf NodeIterators; +typedef RefVectorOf TreeWalkers; +typedef RefVectorOf RangeImpls; + + +class DEPRECATED_DOM_EXPORT DocumentImpl: public ParentNode { +private: + // ----------------------------------------------------------------------- + // Private data types + // ----------------------------------------------------------------------- + + void setDocumentType(DocumentTypeImpl *doctype); + + DocumentTypeImpl *docType; + ElementImpl *docElement; + DStringPool *namePool; + NodeIDMap *fNodeIDMap; // for use by GetElementsById(). + + NodeIterators *iterators; + TreeWalkers *treeWalkers; + RefHashTableOf *userData; + RangeImpls *ranges; + + /** + * Number of alterations made to this document since its creation. + * Serves as a "dirty bit" so that live objects such as NodeList can + * recognize when an alteration has been made and discard its cached + * state information. + *

+ * Any method that alters the tree structure MUST cause or be + * accompanied by a call to changed(), to inform it that any outstanding + * NodeLists may have to be updated. + *

+ * (Required because NodeList is simultaneously "live" and integer- + * indexed -- a bad decision in the DOM's design.) + *

+ * Note that changes which do not affect the tree's structure -- changing + * the node's name, for example -- do _not_ have to call changed(). + *

+ * Alternative implementation would be to use a cryptographic + * Digest value rather than a count. This would have the advantage that + * "harmless" changes (those producing equal() trees) would not force + * NodeList to resynchronize. Disadvantage is that it's slightly more prone + * to "false negatives", though that's the difference between "wildly + * unlikely" and "absurdly unlikely". IF we start maintaining digests, + * we should consider taking advantage of them. + * + * Note: This used to be done a node basis, so that we knew what + * subtree changed. But since only DeepNodeList really use this today, + * the gain appears to be really small compared to the cost of having + * an int on every (parent) node plus having to walk up the tree all the + * way to the root to mark the branch as changed everytime a node is + * changed. + * So we now have a single counter global to the document. It means that + * some objects may flush their cache more often than necessary, but this + * makes nodes smaller and only the document needs to be marked as changed. + */ + int fChanges; + + /** Bypass error checking. */ + bool errorChecking; + + MemoryManager *fMemoryManager; + + friend class NodeIteratorImpl; + friend class TreeWalkerImpl; + friend class RangeImpl; + friend class DOMParser; + +public: + DocumentImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + DocumentImpl(const DOMString &namespaceURI, //DOM Level 2 + const DOMString &qualifiedName, + DocumentTypeImpl *doctype, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual ~DocumentImpl(); + virtual bool isDocumentImpl(); // RTTI replacement function + + virtual NodeImpl *cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual DocumentImpl * getOwnerDocument(); + virtual AttrImpl *createAttribute(const DOMString &name); + virtual CDATASectionImpl *createCDATASection(const DOMString &data); + virtual CommentImpl *createComment(const DOMString &data); + virtual DocumentFragmentImpl *createDocumentFragment(); + virtual DocumentTypeImpl *createDocumentType(const DOMString &name); + virtual DocumentTypeImpl *createDocumentType(const DOMString &qName, + const DOMString &publicId, + const DOMString &systemId); + virtual ElementImpl *createElement(const DOMString & tagName); + virtual ElementImpl *createElement(const XMLCh *tagName); + virtual EntityImpl *createEntity(const DOMString & name); + virtual EntityReferenceImpl *createEntityReference(const DOMString & name); + virtual NotationImpl *createNotation(const DOMString & name); + virtual ProcessingInstructionImpl *createProcessingInstruction(const DOMString & target, const DOMString & data); + virtual TextImpl *createTextNode(const DOMString & data); + virtual DocumentTypeImpl *getDoctype(); + virtual ElementImpl *getDocumentElement(); + virtual DeepNodeListImpl *getElementsByTagName(const DOMString & tagname); + virtual NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild); + bool isXMLName(const DOMString & s); + virtual void referenced(); + virtual NodeImpl *removeChild(NodeImpl *oldChild); + virtual void unreferenced(); + static NodeIteratorImpl* createNodeIterator(DOM_Node root, unsigned long whatToShow, DOM_NodeFilter* filter, bool entityReferenceExpansion, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + static TreeWalkerImpl* createTreeWalker(DOM_Node root, unsigned long whatToShow, DOM_NodeFilter* filter, bool entityReferenceExpansion, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + virtual XMLDeclImpl* createXMLDecl(const DOMString& version, const DOMString& encoding, const DOMString& standalone); + virtual void* getUserData(); + virtual void setUserData(void* value); + virtual RangeImpl* createRange(); + virtual RangeImpls* getRanges(); //non-standard api + virtual void removeRange(RangeImpl* range); //non-standard api + + + // helper functions to prevent storing userdata pointers on every node. + virtual void setUserData(NodeImpl* n, void* data); + virtual void* getUserData(NodeImpl* n); + + //Introduced in DOM Level 2 + virtual NodeImpl *importNode(NodeImpl *source, bool deep); + virtual ElementImpl *createElementNS(const DOMString &namespaceURI, + const DOMString &qualifiedName); + virtual AttrImpl *createAttributeNS(const DOMString &namespaceURI, + const DOMString &qualifiedName); + virtual DeepNodeListImpl *getElementsByTagNameNS(const DOMString &namespaceURI, + const DOMString &localName); + virtual ElementImpl *getElementById(const DOMString &elementId); + + //Return the index > 0 of ':' in the given qualified name qName="prefix:localName". + //Return 0 if there is no ':', or -1 if qName is malformed such as ":abcd". + static int indexofQualifiedName(const DOMString & qName); + static bool isKidOK(NodeImpl *parent, NodeImpl *child); + + inline NodeIDMap * getNodeIDMap() {return fNodeIDMap;}; + + virtual void changed(); + virtual int changes(); + + /** + * Sets whether the DOM implementation performs error checking + * upon operations. Turning off error checking only affects + * the following DOM checks: + *

    + *
  • Checking strings to make sure that all characters are + * legal XML characters + *
  • Hierarchy checking such as allowed children, checks for + * cycles, etc. + *
+ *

+ * Turning off error checking does not turn off the + * following checks: + *

    + *
  • Read only checks + *
  • Checks related to DOM events + *
+ */ + inline void setErrorChecking(bool check) { + errorChecking = check; + } + + /** + * Returns true if the DOM implementation performs error checking. + */ + inline bool getErrorChecking() { + return errorChecking; + } + + inline MemoryManager* getMemoryManager() const { + return fMemoryManager; + } + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitDocumentImpl(); + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/CommentImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/CommentImpl.hpp @@ -0,0 +1,59 @@ +#ifndef CommentImpl_HEADER_GUARD_ +#define CommentImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: CommentImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "CharacterDataImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT CommentImpl: public CharacterDataImpl { +public: + CommentImpl(DocumentImpl *, const DOMString &); + CommentImpl(const CommentImpl &other, bool deep); + virtual ~CommentImpl(); + virtual NodeImpl * cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitCommentImpl(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/TreeWalkerImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/TreeWalkerImpl.hpp @@ -0,0 +1,167 @@ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: TreeWalkerImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#ifndef TreeWalkerImpl_HEADER_GUARD_ +#define TreeWalkerImpl_HEADER_GUARD_ + +#include +#include "DOM_TreeWalker.hpp" +#include "RefCountedImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + +class DEPRECATED_DOM_EXPORT TreeWalkerImpl : public RefCountedImpl { + + public: + // Implementation Note: No state is kept except the data above + // (fWhatToShow, fNodeFilter, fCurrentNode, fRoot) such that + // setters could be created for these data values and the + // implementation will still work. + + /** Public constructor */ + TreeWalkerImpl ( + DOM_Node root, + unsigned long whatToShow, + DOM_NodeFilter* nodeFilter, + bool expandEntityRef); + TreeWalkerImpl (const TreeWalkerImpl& twi); + TreeWalkerImpl& operator= (const TreeWalkerImpl& twi); + + // Return the root DOM_Node. + DOM_Node getRoot (); + + // Return the whatToShow value. + unsigned long getWhatToShow (); + + // Return the NodeFilter. + DOM_NodeFilter* getFilter (); + + + // Return the current DOM_Node. + DOM_Node getCurrentNode (); + + // Return the current Node. + void setCurrentNode (DOM_Node node); + + // Return the parent Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + DOM_Node parentNode (); + + // Return the first child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + DOM_Node firstChild (); + + // Return the last child Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + DOM_Node lastChild (); + + // Return the previous sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + DOM_Node previousSibling (); + + // Return the next sibling Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + + DOM_Node nextSibling (); + // Return the previous Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + DOM_Node previousNode (); + + // Return the next Node from the current node, + // after applying filter, whatToshow. + // If result is not null, set the current Node. + DOM_Node nextNode (); + + void unreferenced (); + + // Get the expandEntity reference flag. + bool getExpandEntityReferences(); + +protected: + + // Internal function. + // Return the parent Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOM_Node getParentNode (DOM_Node node); + + // Internal function. + // Return the nextSibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOM_Node getNextSibling (DOM_Node node); + + // Internal function. + // Return the previous sibling Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOM_Node getPreviousSibling (DOM_Node node); + + // Internal function. + // Return the first child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOM_Node getFirstChild (DOM_Node node); + + // Internal function. + // Return the last child Node, from the input node + // after applying filter, whatToshow. + // The current node is not consulted or set. + DOM_Node getLastChild (DOM_Node node); + + // The node is accepted if it passes the whatToShow and the filter. + short acceptNode (DOM_Node node); + + +private: + // The whatToShow mask. + unsigned long fWhatToShow; + + // The NodeFilter reference. + DOM_NodeFilter* fNodeFilter; + + // The current Node. + DOM_Node fCurrentNode; + + // The root Node. + DOM_Node fRoot; + + // The expandEntity reference flag. + bool fExpandEntityReferences; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/EntityImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/EntityImpl.hpp @@ -0,0 +1,70 @@ +#ifndef EntityImpl_HEADER_GUARD_ +#define EntityImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: EntityImpl.hpp 176291 2005-01-14 10:37:42Z amassari $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "ParentNode.hpp" +#include "EntityReferenceImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT EntityImpl: public ParentNode { +private: + DOMString name; + DOMString publicId; + DOMString systemId; + DOMString notationName; + + void setEntityRef(EntityReferenceImpl*); + + friend class DOMParser; + +public: + EntityImpl(DocumentImpl*, const DOMString &eName); + EntityImpl(const EntityImpl &other, bool deep=false); + virtual ~EntityImpl(); + + virtual NodeImpl* cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual DOMString getPublicId(); + virtual DOMString getSystemId(); + virtual DOMString getNotationName(); + virtual void setNotationName(const DOMString &arg); + virtual void setPublicId(const DOMString &arg); + virtual void setSystemId(const DOMString &arg); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NamedNodeMapImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NamedNodeMapImpl.hpp @@ -0,0 +1,91 @@ +#ifndef NamedNodeMapImpl_HEADER_GUARD_ +#define NamedNodeMapImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: NamedNodeMapImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "NodeImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class NodeVector; +class DocumentImpl; +class NodeImpl; + +class DEPRECATED_DOM_EXPORT NamedNodeMapImpl: public XMemory { +protected: + NodeVector *nodes; + NodeImpl *ownerNode; // the node this map belongs to + bool readOnly; + int refCount; + static int gLiveNamedNodeMaps; + static int gTotalNamedNodeMaps; + + + friend class DOM_NamedNodeMap; + friend class DomMemDebug; + friend class ElementImpl; + friend class DocumentImpl; + + virtual void cloneContent(NamedNodeMapImpl *srcmap); + +public: + NamedNodeMapImpl(NodeImpl *ownerNode); + + virtual ~NamedNodeMapImpl(); + virtual NamedNodeMapImpl *cloneMap(NodeImpl *ownerNode); + static void addRef(NamedNodeMapImpl *); + virtual int findNamePoint(const DOMString &name); + virtual unsigned int getLength(); + virtual NodeImpl *getNamedItem(const DOMString &name); + virtual NodeImpl *item(unsigned int index); + virtual void removeAll(); + virtual NodeImpl *removeNamedItem(const DOMString &name); + static void removeRef(NamedNodeMapImpl *); + virtual NodeImpl *setNamedItem(NodeImpl *arg); + virtual void setReadOnly(bool readOnly, bool deep); + + //Introduced in DOM Level 2 + virtual int findNamePoint(const DOMString &namespaceURI, + const DOMString &localName); + virtual NodeImpl *getNamedItemNS(const DOMString &namespaceURI, + const DOMString &localName); + virtual NodeImpl *setNamedItemNS(NodeImpl *arg); + virtual NodeImpl *removeNamedItemNS(const DOMString &namespaceURI, + const DOMString &localName); + + virtual void setOwnerDocument(DocumentImpl *doc); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NameNodeFilter.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NameNodeFilter.hpp @@ -0,0 +1,72 @@ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: NameNodeFilter.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#ifndef DOM_NameNodeFilter_HEADER_GUARD_ +#define DOM_NameNodeFilter_HEADER_GUARD_ + + +#include "DOM_NodeFilter.hpp" +#include "NodeFilterImpl.hpp" +#include "DOMString.hpp" +#include "DOM_Node.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT NameNodeFilter : public NodeFilterImpl +{ + public: + NameNodeFilter(); + virtual ~NameNodeFilter(); + + // The name to compare with the node name. If null, all node names + // are successfully matched. + void setName(DOMString name); + + // Return the name to compare with node name. + DOMString getName(); + + // If match is true, the node name is accepted when it matches. + // If match is false, the node name is accepted when does not match. + void setMatch(bool match) ; + + // Return match value. + bool getMatch(); + + virtual DOM_NodeFilter::FilterAction acceptNode(DOM_Node n); + + private: + DOMString fName; + bool fMatch; + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/CharacterDataImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/CharacterDataImpl.hpp @@ -0,0 +1,65 @@ +#ifndef CharacterDataImpl_HEADER_GUARD_ +#define CharacterDataImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: CharacterDataImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#include "ChildNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT CharacterDataImpl: public ChildNode +{ +protected: + DOMString data; + +public: + CharacterDataImpl(DocumentImpl *ownerDocument, const DOMString &data); + CharacterDataImpl(const CharacterDataImpl &other, bool deep = false); + virtual ~CharacterDataImpl(); + virtual DOMString getNodeValue(); + virtual void setNodeValue(const DOMString &value); + virtual void appendData(const DOMString &data); + virtual void deleteData(unsigned int offset, unsigned int count); + virtual DOMString &getData(); + virtual unsigned int getCharDataLength(); + virtual void insertData(unsigned int offset, const DOMString &data); + virtual void replaceData(unsigned int offset, unsigned int count, const DOMString &data); + virtual void setData(const DOMString &arg); + virtual DOMString substringData(unsigned int offset, unsigned int count); + +}; + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/ChildNode.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/ChildNode.hpp @@ -0,0 +1,61 @@ +#ifndef ChildNode_HEADER_GUARD_ +#define ChildNode_HEADER_GUARD_ + +/* + * Copyright 2000,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: ChildNode.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +/** + * ChildNode adds to NodeImpl the capability of being a child, this is having + * siblings. + **/ + +#include "NodeImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT ChildNode: public NodeImpl { +public: + ChildNode *previousSibling; + ChildNode *nextSibling; + +public: + ChildNode(DocumentImpl *ownerDocument); + ChildNode(const ChildNode &other); + virtual ~ChildNode(); + + virtual NodeImpl * getNextSibling(); + virtual NodeImpl * getParentNode(); + virtual NodeImpl* getPreviousSibling(); +}; + + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NodeVector.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NodeVector.hpp @@ -0,0 +1,69 @@ +#ifndef NodeVector_HEADER_GUARD_ +#define NodeVector_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: NodeVector.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class NodeImpl; + + +class NodeVector : public XMemory { +private: + NodeImpl **data; + unsigned int allocatedSize; + unsigned int nextFreeSlot; + MemoryManager* fMemoryManager; + + void init(unsigned int size); + void checkSpace(); + +public: + NodeVector(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + NodeVector(unsigned int size, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + ~NodeVector(); + + unsigned int size(); + NodeImpl *elementAt(unsigned int index); + NodeImpl *lastElement(); + void addElement(NodeImpl *); + void insertElementAt(NodeImpl *, unsigned int index); + void setElementAt(NodeImpl *val, unsigned int index); + void removeElementAt(unsigned int index); + void reset(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/DOMStringImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/DOMStringImpl.hpp @@ -0,0 +1,87 @@ +#ifndef DOMStringImpl_HEADER_GUARD_ +#define DOMStringImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DOMStringImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + +class DOMStringData +{ +public: + unsigned int fBufferLength; + int fRefCount; + XMLCh fData[1]; + + static DOMStringData *allocateBuffer(unsigned int length); + inline void addRef(); + inline void removeRef(); +}; + +class DOMStringHandle +{ +public: + unsigned int fLength; // The logical length of the DOMString. + // This may be shorter than the buffer length. + int fRefCount; // The number of DOMString objects pointing to + // this string handle. + DOMStringData *fDSData; // Pointer to the string buffer. May be null. + + void *operator new( size_t sizeToAlloc); // StringHandles have custom, optimized + void operator delete( void *pvMem ); // memory allocation. + + +private: + static void *freeListPtr; // Head of the linked list of unallocated String Handles + + static DOMStringHandle *blockListPtr; // Head of the linked list of memory blocks from which + // string handles are sub-allocated. + +public: + static DOMStringHandle *createNewStringHandle(unsigned int bufLength); + DOMStringHandle *cloneStringHandle(); + inline void addRef(); + inline void removeRef(); + ~DOMStringHandle() {}; + static void DOMStringCleanup(); +private: + inline DOMStringHandle() {}; + static inline XMLMutex &getMutex(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/EntityReferenceImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/EntityReferenceImpl.hpp @@ -0,0 +1,58 @@ +#ifndef EntityReferenceImpl_HEADER_GUARD_ +#define EntityReferenceImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: EntityReferenceImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "ParentNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT EntityReferenceImpl: public ParentNode +{ +private: + DOMString name; + +public: + EntityReferenceImpl(DocumentImpl *ownerDoc, const DOMString &entityName); + EntityReferenceImpl(const EntityReferenceImpl &other, bool deep=false); + virtual ~EntityReferenceImpl(); + virtual NodeImpl * cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual bool isEntityReference(); + virtual void setReadOnly(bool readOnly,bool deep); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NotationImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NotationImpl.hpp @@ -0,0 +1,80 @@ +#ifndef NotationImpl_HEADER_GUARD_ +#define NotationImpl_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: NotationImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#include +#include "NodeImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DocumentImpl; + +class DEPRECATED_DOM_EXPORT NotationImpl: public NodeImpl { +private: + DOMString name; + DOMString publicId; + DOMString systemId; + +public: + NotationImpl(DocumentImpl *, const DOMString &); + NotationImpl(const NotationImpl &other, bool deep=false); + + virtual ~NotationImpl(); + + virtual NodeImpl *cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual NodeImpl * getParentNode(); + + // + // The Public Identifier for this Notation. If no public identifier + // was specified, this will be null. + virtual DOMString getPublicId(); + + // The System Identifier for this Notation. If no system identifier + // was specified, this will be null. + virtual DOMString getSystemId(); + + + // NON-DOM: The Public Identifier for this Notation. If no public + // identifier was specified, this will be null. */ + virtual void setPublicId(const DOMString &arg); + + + // NON-DOM: The System Identifier for this Notation. If no system + // identifier was specified, this will be null. */ + virtual void setSystemId(const DOMString &arg); + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/ProcessingInstructionImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/ProcessingInstructionImpl.hpp @@ -0,0 +1,67 @@ +#ifndef ProcessingInstructionImpl_HEADER_GUARD_ +#define ProcessingInstructionImpl_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: ProcessingInstructionImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "ChildNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DocumentImpl; + + +class DEPRECATED_DOM_EXPORT ProcessingInstructionImpl: public ChildNode { +protected: + DOMString target; + DOMString data; + +public: + ProcessingInstructionImpl(DocumentImpl *ownerDoc, + const DOMString & target, + const DOMString &data); + ProcessingInstructionImpl(const ProcessingInstructionImpl &other, + bool deep=false); + virtual ~ProcessingInstructionImpl(); + virtual NodeImpl *cloneNode(bool deep); + virtual DOMString getNodeValue(); + virtual void setNodeValue(const DOMString &value); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual DOMString getData(); + virtual DOMString getTarget(); + virtual void setData(const DOMString &arg); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/DStringPool.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/DStringPool.hpp @@ -0,0 +1,77 @@ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// +// file DStringPool.hpp +// + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + +#ifndef DStringPool_HEADER_GUARD_ +#define DStringPool_HEADER_GUARD_ + +#include "DOMString.hpp" +#include +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +struct DStringPoolEntry; + +// +// DStringPool is a hash table of DOMStrings. +// Each DOM Document maintains a DStringPool containing a DOMString +// for each Element tag name and Attribute Name that has been added +// to the document. When creating additional elements or attributes, +// if the name has been seen before, the already existing string +// will be reused. +// +class DStringPool : public XMemory +{ +public: + DStringPool(int hashTableSize, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + ~DStringPool(); + + const DOMString &getPooledString(const DOMString &in); + const DOMString &getPooledString(const XMLCh *in); + + static const DOMString &getStaticString(const char *in + , DOMString **loc + , XMLRegisterCleanup::XMLCleanupFn fn + , XMLRegisterCleanup &clnObj); + +private: + DStringPool(const DStringPool &other); // Copy constructor and assignment + DStringPool& operator = (const DStringPool &other); // of DStringPool are not supported. + + DStringPoolEntry **fHashTable; + int fHashTableSize; + MemoryManager* fMemoryManager; +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/RefCountedImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/RefCountedImpl.hpp @@ -0,0 +1,66 @@ +#ifndef RefCountedImpl_HEADER_GUARD_ +#define RefCountedImpl_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: RefCountedImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT RefCountedImpl : public XMemory +{ +public: + int nodeRefCount; + + RefCountedImpl(); + virtual ~RefCountedImpl(); + + static void addRef(RefCountedImpl *thisNode); + static void removeRef(RefCountedImpl *thisNode); + + virtual void referenced(); // This function will be called by + // the reference counting implementation + // whenever the reference count transitions + // from 0 to 1. + + virtual void unreferenced(); // unreferenced() is called whenever the + // the ref count goes from 1 to 0. (Nodes are + // not deleted when the ref count goes to zero + // if they are in the doc tree and the tree + // is still referenced, so a nodes referenced / + // unreferenced state may switch many times + // over its life time.) +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/NodeIDMap.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/NodeIDMap.hpp @@ -0,0 +1,89 @@ +#ifndef NodeIDMap_HEADER_GUARD_ +#define NodeIDMap_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + + +// +// Class NodeIDMap is a hash table that is used in the implementation of +// of DOM_Document::getElementsByID(). +// +// Why Yet Another HashTable implementation? Becuase it can be significantly +// smaller when tuned for this exact usage, and the generic RefHashTableOf +// from the xerces utils project is not a paricularly good fit. +// +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +class AttrImpl; +class DOMString; + + +class NodeIDMap : public XMemory { +public: + + // Create a new hash table, sized to hold "initialSize" + NodeIDMap(int initialSize, + MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); + // Entries. It will automatically grow if need be. + + virtual ~NodeIDMap(); + +private: + NodeIDMap(const NodeIDMap &other); // No copy, assignement, comparison. + NodeIDMap &operator = (const NodeIDMap &other); + bool operator == (const NodeIDMap &other); + +public: + void add(AttrImpl *attr); // Add the specified attribute to the table. + void remove(AttrImpl *other); // Remove the specified attribute. + // Does nothing if the node is not in the table. + AttrImpl *find(const DOMString &ID); // Find the attribute node in the table with this ID + +private: + void growTable(); + +private: + AttrImpl **fTable; + unsigned int fSizeIndex; // Index of the current table size in the + // array of possible table sizes. + unsigned int fSize; // The current size of the table array + // (number of slots, not bytes.) + unsigned int fNumEntries; // The number of entries used. + unsigned int fMaxEntries; // The max number of entries to use before + // growing the table. + MemoryManager* fMemoryManager; + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/CDATASectionImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/CDATASectionImpl.hpp @@ -0,0 +1,59 @@ +#ifndef CDATASectionImpl_HEADER_GUARD_ +#define CDATASectionImpl_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: CDATASectionImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "TextImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DEPRECATED_DOM_EXPORT CDATASectionImpl: public TextImpl { +public: + CDATASectionImpl(DocumentImpl *ownerDoc, const DOMString & data); + CDATASectionImpl(const CDATASectionImpl &other, bool deep = false); + + virtual ~CDATASectionImpl(); + virtual NodeImpl *cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual bool isCDATASectionImpl(); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitCDATASectionImpl(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif + --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/DocumentTypeImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/DocumentTypeImpl.hpp @@ -0,0 +1,90 @@ +#ifndef DocumentTypeImpl_HEADER_GUARD_ +#define DocumentTypeImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: DocumentTypeImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + + +#include +#include "ParentNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class NamedNodeMapImpl; + +class DEPRECATED_DOM_EXPORT DocumentTypeImpl: public ParentNode { +private: + DOMString name; + NamedNodeMapImpl *entities; + NamedNodeMapImpl *notations; + NamedNodeMapImpl *elements; + DOMString publicId; + DOMString systemId; + DOMString internalSubset; + + bool intSubsetReading; + + virtual void setPublicId(const DOMString& value); + virtual void setSystemId(const DOMString& value); + virtual void setInternalSubset(const DOMString &value); + bool isIntSubsetReading(); + + friend class DOMParser; + +public: + DocumentTypeImpl(DocumentImpl *, const DOMString &); + DocumentTypeImpl(DocumentImpl *, + const DOMString &qualifiedName, //DOM Level 2 + const DOMString &publicId, const DOMString &systemId); + DocumentTypeImpl(const DocumentTypeImpl &other, bool deep=false); + virtual ~DocumentTypeImpl(); + virtual bool isDocumentTypeImpl(); + + virtual NodeImpl * cloneNode(bool deep); + virtual void setOwnerDocument(DocumentImpl *doc); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual NamedNodeMapImpl * getEntities(); + virtual DOMString getName(); + virtual NamedNodeMapImpl * getNotations(); + virtual NamedNodeMapImpl * getElements(); + virtual void setReadOnly(bool readOnly, bool deep); + + //Introduced in DOM Level 2 + + virtual DOMString getPublicId(); + virtual DOMString getSystemId(); + virtual DOMString getInternalSubset(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/RangeImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/RangeImpl.hpp @@ -0,0 +1,168 @@ +#ifndef RangeImpl_HEADER_GUARD_ +#define RangeImpl_HEADER_GUARD_ +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + /* + * $Id: RangeImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include "DOM_Node.hpp" +#include "RefCountedImpl.hpp" +#include "DOM_Range.hpp" +#include "DOM_Text.hpp" +#include "DOM_Document.hpp" +#include + +XERCES_CPP_NAMESPACE_BEGIN + + +typedef RefVectorOf Ranges; + +class DEPRECATED_DOM_EXPORT RangeImpl : public RefCountedImpl { +public: + //c'tor + RangeImpl(DOM_Document doc); + RangeImpl(const RangeImpl& other); + + //d'tor + ~RangeImpl(); + + //referencing related functions + virtual void unreferenced(); + + + //getter functions + DOM_Node getStartContainer() const; + unsigned int getStartOffset() const; + DOM_Node getEndContainer() const; + unsigned int getEndOffset() const; + + + + void collapse(bool toStart); + bool getCollapsed() const; + + void setStartBefore(const DOM_Node& node); + void setStartAfter(const DOM_Node& node); + void setEndBefore(const DOM_Node& node); + void setEndAfter(const DOM_Node& node); + + void setStart(const DOM_Node& node, unsigned int offset); + void setEnd(const DOM_Node& node, unsigned int offset); + + void selectNode(const DOM_Node& node); + void selectNodeContents(const DOM_Node& node); + + short compareBoundaryPoints(DOM_Range::CompareHow how, RangeImpl* range) const; + + void detach(); + + void deleteContents(); + + RangeImpl* cloneRange() const; + DOMString toString() const; + + DOM_Document getDocument(); + void surroundContents(DOM_Node& node); + DOM_DocumentFragment extractContents(); + DOM_DocumentFragment cloneContents() const; + void insertNode(DOM_Node& newNode); + const DOM_Node getCommonAncestorContainer() const; + + // functions to inform all existing valid ranges about a change + void updateSplitInfo(TextImpl* oldNode, TextImpl* startNode, unsigned int offset); + void updateRangeForInsertedNode(NodeImpl* node); + void receiveReplacedText(NodeImpl* node); + void updateRangeForDeletedText(DOM_Node& node, unsigned int offset, int count); + void updateRangeForDeletedNode(NodeImpl* node); + +private: + enum TraversalType { + EXTRACT_CONTENTS = 1, + CLONE_CONTENTS = 2, + DELETE_CONTENTS = 3 + }; + + enum TraversePoint { + BEFORE = -1, + START = 0, + AFTER = 1 + }; + + //setter functions + void setStartContainer(const DOM_Node& node); + void setStartOffset(unsigned int offset) ; + void setEndContainer(const DOM_Node& node); + void setEndOffset(unsigned int offset) ; + + //misc functions + void validateNode(const DOM_Node& node) const; + bool isValidAncestorType(const DOM_Node& node) const; + bool hasLegalRootContainer(const DOM_Node& node) const; + bool isLegalContainedNode(const DOM_Node& node ) const; + void checkIndex(const DOM_Node& node, unsigned int offset) const; + static bool isAncestorOf(const DOM_Node& a, const DOM_Node& b); + + unsigned short indexOf(const DOM_Node& child, const DOM_Node& parent) const; + + const DOM_Node commonAncestorOf(const DOM_Node& pointA, const DOM_Node& pointB) const; + DOM_Node nextNode(const DOM_Node& node, bool visitChildren) const; + DOM_DocumentFragment traverseContents(TraversalType type); + void checkReadOnly(DOM_Node& start, DOM_Node& end, + unsigned int starOffset, unsigned int endOffset); + void recurseTreeAndCheck(DOM_Node& start, DOM_Node& end); + DOM_Node removeChild(DOM_Node& parent, DOM_Node& child); + + DOM_DocumentFragment traverseSameContainer( int how ); + DOM_DocumentFragment traverseCommonStartContainer( DOM_Node endAncestor, int how ); + DOM_DocumentFragment traverseCommonEndContainer( DOM_Node startAncestor, int how ); + DOM_DocumentFragment traverseCommonAncestors( DOM_Node startAncestor, DOM_Node endAncestor, int how ); + DOM_Node traverseRightBoundary( DOM_Node root, int how ); + DOM_Node traverseLeftBoundary( DOM_Node root, int how ); + DOM_Node traverseNode( DOM_Node n, bool isFullySelected, bool isLeft, int how ); + DOM_Node traverseFullySelected( DOM_Node n, int how ); + DOM_Node traversePartiallySelected( DOM_Node n, int how ); + DOM_Node traverseTextNode( DOM_Node n, bool isLeft, int how ); + DOM_Node getSelectedNode( DOM_Node container, int offset ); + + + //private data + DOM_Node fStartContainer; + unsigned int fStartOffset; + DOM_Node fEndContainer; + unsigned int fEndOffset; + bool fCollapsed; + DOM_Document fDocument; + bool fDetached; + + DOM_Node fRemoveChild; + +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/AttrNSImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/AttrNSImpl.hpp @@ -0,0 +1,63 @@ +#ifndef AttrNSImpl_HEADER_GUARD_ +#define AttrNSImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: AttrNSImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include "AttrImpl.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + + +class DEPRECATED_DOM_EXPORT AttrNSImpl: public AttrImpl { +protected: + //Introduced in DOM Level 2 + DOMString namespaceURI; //namespace URI of this node + DOMString localName; //local part of qualified name + + +public: + AttrNSImpl(DocumentImpl *ownerDoc, const DOMString &name); + AttrNSImpl(DocumentImpl *ownerDoc, //DOM Level 2 + const DOMString &namespaceURI, const DOMString &qualifiedName); + AttrNSImpl(const AttrNSImpl &other, bool deep=false); + + virtual NodeImpl * cloneNode(bool deep); + //Introduced in DOM Level 2 + virtual DOMString getNamespaceURI(); + virtual DOMString getPrefix(); + virtual DOMString getLocalName(); + virtual void setPrefix(const DOMString &prefix); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/debian/xercesc-private/xercesc/dom/deprecated/ElementImpl.hpp +++ xqilla-2.0.0/debian/xercesc-private/xercesc/dom/deprecated/ElementImpl.hpp @@ -0,0 +1,117 @@ +#ifndef ElementImpl_HEADER_GUARD_ +#define ElementImpl_HEADER_GUARD_ + +/* + * Copyright 1999-2002,2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: ElementImpl.hpp 176026 2004-09-08 13:57:07Z peiyongz $ + */ + +// +// This file is part of the internal implementation of the C++ XML DOM. +// It should NOT be included or used directly by application programs. +// +// Applications should include the file for the entire +// DOM API, or DOM_*.hpp for individual DOM classes, where the class +// name is substituded for the *. +// + + +#include +#include "AttrImpl.hpp" +#include "AttrMapImpl.hpp" +#include "ParentNode.hpp" + +XERCES_CPP_NAMESPACE_BEGIN + + +class DeepNodeListImpl; + +class DEPRECATED_DOM_EXPORT ElementImpl: public ParentNode { +protected: + DOMString name; + AttrMapImpl *attributes; + +public: + ElementImpl(DocumentImpl *ownerDoc, const DOMString &name); + ElementImpl(const ElementImpl &other, bool deep=false); + virtual ~ElementImpl(); + + virtual bool isElementImpl(); + virtual NodeImpl * cloneNode(bool deep); + virtual DOMString getNodeName(); + virtual short getNodeType(); + virtual DOMString getAttribute(const DOMString &name); + virtual AttrImpl *getAttributeNode(const DOMString &name); + virtual NamedNodeMapImpl * getAttributes(); + virtual DeepNodeListImpl * getElementsByTagName(const DOMString &tagname); + virtual DOMString getTagName(); + virtual void removeAttribute(const DOMString &name); + virtual AttrImpl * removeAttributeNode(AttrImpl * oldAttr); + virtual AttrImpl *setAttribute(const DOMString &name, const DOMString &value); + virtual AttrImpl *setAttributeNode(AttrImpl *newAttr); + virtual void setReadOnly(bool readOnly, bool deep); + + //Introduced in DOM Level 2 + virtual DOMString getAttributeNS(const DOMString &namespaceURI, + const DOMString &localName); + virtual AttrImpl *setAttributeNS(const DOMString &namespaceURI, + const DOMString &qualifiedName, const DOMString &value); + virtual void removeAttributeNS(const DOMString &namespaceURI, + const DOMString &localName); + virtual AttrImpl *getAttributeNodeNS(const DOMString &namespaceURI, + const DOMString &localName); + virtual AttrImpl *setAttributeNodeNS(AttrImpl *newAttr); + virtual DeepNodeListImpl *getElementsByTagNameNS(const DOMString &namespaceURI, + const DOMString &localName); + + virtual void setOwnerDocument(DocumentImpl *doc); + virtual bool hasAttributes(); + virtual bool hasAttribute(const DOMString &name); + virtual bool hasAttributeNS(const DOMString &namespaceURI, const DOMString &localName); + + //Utils for the DOM_NamedNodeMap wrapper class + //All NamedNodeMap utils begin with NNM + virtual NamedNodeMapImpl *NNM_cloneMap(NodeImpl *nnm_ownerNode); + virtual int NNM_findNamePoint(const DOMString &nnm_name); + virtual unsigned int NNM_getLength(); + virtual NodeImpl *NNM_getNamedItem(const DOMString &nnm_name); + virtual NodeImpl *NNM_item(unsigned int nnm_index); + virtual void NNM_removeAll(); + virtual NodeImpl *NNM_removeNamedItem(const DOMString &nnm_name); + virtual NodeImpl *NNM_setNamedItem(NodeImpl *nnm_arg); + virtual void NNM_setReadOnly(bool nnm_readOnly, bool nnm_deep); + //Introduced in DOM Level 2 + virtual int NNM_findNamePoint(const DOMString &nnm_namespaceURI, const DOMString &nnm_localName); + virtual NodeImpl *NNM_getNamedItemNS(const DOMString &nnm_namespaceURI, const DOMString &nnm_localName); + virtual NodeImpl *NNM_setNamedItemNS(NodeImpl *nnm_arg); + virtual NodeImpl *NNM_removeNamedItemNS(const DOMString &nnm_namespaceURI, const DOMString &nnm_localName); + virtual void NNM_setOwnerDocument(DocumentImpl *nnm_doc); + + // default attribute helper functions + virtual AttrMapImpl *getDefaultAttributes(); + virtual void setupDefaultAttributes(); + + // ----------------------------------------------------------------------- + // Notification that lazy data has been deleted + // ----------------------------------------------------------------------- + static void reinitElementImpl(); +}; + +XERCES_CPP_NAMESPACE_END + +#endif --- xqilla-2.0.0.orig/include/xqilla/framework/StringPool.hpp +++ xqilla-2.0.0/include/xqilla/framework/StringPool.hpp @@ -26,6 +26,7 @@ #include #include #include +#include class XQILLA_API StringPool {